summaryrefslogtreecommitdiff
path: root/tools/inc/lib/jsgettext/test.js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-07-02 22:48:43 -0400
committerMichael Foster <savetheinternet@tinyboard.org>2013-07-31 15:57:53 -0400
commit12d1636b405e3dd9a700c504956c74b0ef1f6a46 (patch)
tree87f02e01f901603841ae8b090745d9df189cde5a /tools/inc/lib/jsgettext/test.js
parentde53ca0f8fad4074ab20d2bef463e5adf69ecebd (diff)
tools/inc/lib/jsgettext/: bundle jsgettext library from https://code.google.com/p/jsgettext
Diffstat (limited to 'tools/inc/lib/jsgettext/test.js')
-rw-r--r--tools/inc/lib/jsgettext/test.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/inc/lib/jsgettext/test.js b/tools/inc/lib/jsgettext/test.js
new file mode 100644
index 00000000..996e9a8a
--- /dev/null
+++ b/tools/inc/lib/jsgettext/test.js
@@ -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")
+ */
+} \ No newline at end of file