]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
add test_i18n.py
authorChristian Van Wambeke <christian.van-wambeke@cea.fr>
Tue, 9 Jan 2018 09:41:34 +0000 (10:41 +0100)
committerChristian Van Wambeke <christian.van-wambeke@cea.fr>
Tue, 9 Jan 2018 09:41:34 +0000 (10:41 +0100)
src/i18n/fr/LC_MESSAGES/salomeTools.mo
src/i18n/fr/LC_MESSAGES/salomeTools.po
src/i18n/test_i18n.py [new file with mode: 0755]

index 6729bced3d9719d0f332fbe28e59048c33bd70fb..f62038e7e82d0e333e0e6343be0798f27f7cbf2f 100644 (file)
Binary files a/src/i18n/fr/LC_MESSAGES/salomeTools.mo and b/src/i18n/fr/LC_MESSAGES/salomeTools.mo differ
index 99b70ff06d25cfbd2c5c1ec8a1fd121745714747..d16e17017a23f517d24e5aee84d49a0d9962804d 100644 (file)
@@ -13,6 +13,10 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
+# test accentué
+msgid "Georges says '%(1)s' for %(2)s."
+msgstr "pour %(2)s Hervé dit '%(1)s'."
+
 msgid "shows global help or help on a specific command."
 msgstr "affiche l'aide générale ou pour une commande spécifique."
 
diff --git a/src/i18n/test_i18n.py b/src/i18n/test_i18n.py
new file mode 100755 (executable)
index 0000000..a9af31b
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#-*- coding:utf-8 -*-
+
+# %% LICENSE_SALOME_CEA_BEGIN
+# Copyright (C) 2008-2018  CEA/DEN
+# 
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+# 
+# This library 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
+# Lesser General Public License for more details.
+# 
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# 
+# See http://www.salome-platform.org or email : webmaster.salome@opencascade.com
+# %% LICENSE_END
+
+import os
+import gettext
+import unittest
+
+verbose = False
+
+class TestCase(unittest.TestCase):
+  def test_005(self):
+    # load resources for internationalization
+    gettext.install('salomeTools', os.path.realpath(os.path.dirname(__file__))) 
+    res = _("Georges says '%(1)s' for %(2)s.") % {"1": "hello", "2": "test"}
+    if verbose: print(res)
+    self.assertEqual(res, "pour test Hervé dit 'hello'.")
+
+if __name__ == '__main__':
+  verbose = False
+  unittest.main()
+  pass