| changeset 1935: |
2f9be432420b |
| parent 1934: | 39a6c8b9afdc |
| child 1936: | f629de2d240f |
| author: |
loic@dachary.org |
| date: |
Tue Jun 01 19:07:49 2010 +0200 (3 months ago) |
| files: |
jpoker/js/test-gettext.js jpoker/l10n/test-fr.json jpoker/test-gettext.html |
| description: |
test that a duplicate translation file is loaded and overrides the previous one |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jpoker/js/test-gettext.js Tue Jun 01 19:07:49 2010 +0200
@@ -0,0 +1,25 @@
+//
+// Copyright (C) 2010 Loic Dachary <loic@dachary.org>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+module("gettext");
+
+test("gt", function() {
+ expect(2);
+ equals(_("click to sit"), "clique pour t'asseoir");
+ equals(_("% Flop"), "Override");
+ });
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jpoker/l10n/test-fr.json Tue Jun 01 19:07:49 2010 +0200
@@ -0,0 +1,1 @@
+{"% Flop": "Override"}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jpoker/test-gettext.html Tue Jun 01 19:07:49 2010 +0200
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+//
+// Copyright (C) 2010 Loic Dachary <loic@dachary.org>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr" id="html">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>gettext Test Suite</title>
+ <link rel="stylesheet" href="js/testrunner.css"/>
+ <link href="l10n/jpoker-fr.json" lang="fr" rel="gettext"/>
+ <link href="l10n/test-fr.json" lang="fr" rel="gettext"/>
+ <script language="JavaScript" type="text/javascript" src="jquery/jquery-1.2.6.js"></script>
+ <script language="JavaScript" type="text/javascript" src="js/jquery.gettext.js"></script>
+ <script language="JavaScript" type="text/javascript" src="js/testrunner.js"></script>
+ <script language="JavaScript" type="text/javascript" src="js/json2.js"></script>
+ <script language="JavaScript" type="text/javascript" src="js/test-gettext.js"></script>
+</head>
+<body>
+ <blockquote>
+ <h1>gettext Test Suite</h1>
+ <h2 id="banner"></h2>
+ <h2 id="userAgent"></h2>
+ <ol id="tests"></ol>
+ <div id="main"></div>
+ </blockquote>
+</body>
+</html>
+