forked from leftypol/leftypol
tools/inc/lib/jsgettext/: bundle jsgettext library from https://code.google.com/p/jsgettext
This commit is contained in:
parent
de53ca0f8f
commit
12d1636b40
6 changed files with 334 additions and 0 deletions
27
tools/inc/lib/jsgettext/test.js
Normal file
27
tools/inc/lib/jsgettext/test.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
function _(s) {
|
||||
return typeof l10n[s] != 'undefined' ? l10n[s] : s;
|
||||
}
|
||||
function test(param) {
|
||||
var a = _("Hello world, testing jsgettext");
|
||||
func(_('Test string'));
|
||||
var reg1 = /"[a-z]+"/i;
|
||||
var reg2 = /[a-z]+\+\/"aa"/i;
|
||||
var s1 = _('string 1: single quotes');
|
||||
var s2 = _("string 2: double quotes");
|
||||
var s3 = _("/* comment in string */");
|
||||
var s4 = _("regexp in string: /[a-z]+/i");
|
||||
var s5 = jsgettext( "another function" );
|
||||
var s6 = avoidme("should not see me!");
|
||||
var s7 = _("string 2: \"escaped double quotes\"");
|
||||
var s8 = _('string 2: \'escaped single quotes\'');
|
||||
|
||||
// "string in comment"
|
||||
//;
|
||||
|
||||
/**
|
||||
* multiple
|
||||
* lines
|
||||
* comment
|
||||
* _("Hello world from comment")
|
||||
*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue