From e8bc84ab33e02db4e8974b1c3f9000be7fba9676 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Tue, 23 Apr 2013 14:08:17 +0200 Subject: [PATCH] =?UTF-8?q?=20Ajout=20des=20fichiers=20de=20traduction=20e?= =?UTF-8?q?t=20mise=20=C3=A0=20jour=20de=20i18n.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support du chargement des locales --- tiramisu/i18n.py | 30 ++++- translations/fr/tiramisu.mo | Bin 0 -> 1015 bytes translations/fr/tiramisu.po | 239 ++++++++++++++++++++++++++++++++++++ translations/tiramisu.pot | 238 +++++++++++++++++++++++++++++++++++ 4 files changed, 506 insertions(+), 1 deletion(-) create mode 100644 translations/fr/tiramisu.mo create mode 100644 translations/fr/tiramisu.po create mode 100644 translations/tiramisu.pot diff --git a/tiramisu/i18n.py b/tiramisu/i18n.py index a8825b0..a79654c 100644 --- a/tiramisu/i18n.py +++ b/tiramisu/i18n.py @@ -2,5 +2,33 @@ # -*- coding: UTF-8 -*- import gettext -gettext.translation('tiramisu', fallback=True) +import os +import sys +import locale + +# Application Name +APP_NAME = 'tiramisu' + +# Traduction dir +APP_DIR = os.path.join (sys.prefix, 'share') +LOCALE_DIR = os.path.join(APP_DIR, 'locale') + +# Default Lanugage +DEFAULT_LANG = os.environ.get('LANG', '').split(':') +DEFAULT_LANG += ['en_US'] + +lc, encoding = locale.getdefaultlocale() +if lc: + languages = [lc] + +languages += DEFAULT_LANG +mo_location = LOCALE_DIR + +gettext.install(True, localedir=None, unicode=1) +gettext.find(APP_NAME, mo_location) +gettext.textdomain(APP_NAME) +gettext.bind_textdomain_codeset(APP_NAME, "UTF-8") +gettext.translation(APP_NAME, fallback=True) + _ = gettext.gettext + diff --git a/translations/fr/tiramisu.mo b/translations/fr/tiramisu.mo new file mode 100644 index 0000000000000000000000000000000000000000..300e24e615512634bfd7a5a4b811e25a287773d6 GIT binary patch literal 1015 zcmZuv%Wl*#6b(>{H0;>00HMnYq2eK#c3>19LbOvfYpI{sbKy@$Y z!DoTVn89RrvZy%aGO@JpOGi6QQj;m1GP(|{dU}hrada3S1xg>tT&0xAJn^}7oDu?_ z$+GiSV>vW-oS-@o(_wTJXhVt7LzPikaH56^x*hLGGpC#eUcb=hm8SK&7#$vwnk<&8 z-kK&5KT&4Z_+s0=DHsLN)+9p}*{14Sh3j6nhf1fxhBbSfII)t7Ew&}D7gN~oF0?ke zFxH8+GE=E|?6Xn~OiZnf^?_KlEUSkQOSorDoiLgg;ezPQQ?w9Acjm%Q7(ysE`9M_} z|EufVoeLxAR%PkLz)D@>)r>`nRjD&CGZq7u`!S8)zw`=y_t#hZbe~Pmk7OcJwP$pD zXdkxLR@VB{-lKNdS~S|RM%MZn9KUwAi(D#wkCI(!OLh;Q4VFc3s;jCG*^0hSOsaGi zQ*TGP)^qWMHQT1G4a2E&6t%nU?n#R=E#vIyi&Q1ljYK>(-X^@*l!~dTH8xXfkYn`K zSthUfUqewLOYGGDZcFCuEtg|YjgB!L+YGm(0%a(_(RgxdsV(D6O8J1_!c(K;+ElhK n);KLVZ6<^?JUUL*?3{8Ij5ReBYS;3{SbrI+&QLpQA`AWi2Zt`8 literal 0 HcmV?d00001 diff --git a/translations/fr/tiramisu.po b/translations/fr/tiramisu.po new file mode 100644 index 0000000..efce9d3 --- /dev/null +++ b/translations/fr/tiramisu.po @@ -0,0 +1,239 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.54\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-04-23 14:16+0200\n" +"PO-Revision-Date: 2013-04-23 14:27+0100\n" +"Last-Translator: \n" +"Language-Team: Équipe EOLE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.5\n" +"Language: Français\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: config.py:45 +msgid "descr must be an optiondescription, not {0}" +msgstr "descr doit être une optiondescription pas un {0}" + +#: config.py:200 +msgid "unknown group_type: {0}" +msgstr "group_type inconnu: {0}" + +#: config.py:267 +msgid "make_dict can't filtering with value without option" +msgstr "" + +#: config.py:286 +msgid "unexpected path {0}, should start with {1}" +msgstr "" + +#: config.py:414 +msgid "unknown type_ type {0} for _find" +msgstr "type_ type {0} pour _find inconnu" + +#: config.py:448 +msgid "no option found in config with these criteria" +msgstr "" + +#: autolib.py:51 +msgid "no config specified but needed" +msgstr "Vous devez spécifier une config" + +#: value.py:121 +msgid "invalid calculated value returned for option {0}: {1}" +msgstr "Valeures calculées invalident pour l'option {0}: {1}" + +#: value.py:141 +msgid "invalid value {} for option {}" +msgstr "" + +#: value.py:162 +msgid "no value for {1} cannot change owner to {2}" +msgstr "" + +#: value.py:164 setting.py:309 +msgid "invalid generic owner {0}" +msgstr "" + +#: value.py:226 +msgid "invalid len for the slave: {0} which has {1} as master" +msgstr "" + +#: value.py:242 +msgid "invalid len for the master: {0} which has {1} as slave with greater len" +msgstr "" + +#: value.py:262 +msgid "cannot append a value on a multi option {0} which is a slave" +msgstr "" + +#: value.py:277 +msgid "invalid value {0} for option {1}" +msgstr "" + +#: value.py:290 +msgid "cannot pop a value on a multi option {0} which is a slave" +msgstr "" + +#: option.py:77 +msgid "Information's item not found: {0}" +msgstr "" + +#: option.py:113 +msgid "invalid name: {0} for option" +msgstr "" + +#: option.py:123 +msgid "validator must be a function" +msgstr "" + +#: option.py:130 +msgid "a default_multi is set whereas multi is False in option: {0}" +msgstr "" + +#: option.py:133 +msgid "invalid default_multi value {0} for option {1}" +msgstr "" + +#: option.py:136 +msgid "defaut values not allowed if option: {0} is calculated" +msgstr "" + +#: option.py:139 +msgid "" +"params defined for a callback function but no callback defined yet for " +"option {0}" +msgstr "" + +#: option.py:158 option.py:165 +msgid "invalid default value {0} for option {1}" +msgstr "" + +#: option.py:171 option.py:591 +msgid "invalid properties type {0} for {1}, must be a tuple" +msgstr "" + +#: option.py:214 +msgid "invalid value {0} for option {1} which must be a list" +msgstr "" + +#: option.py:315 +msgid "values must be a tuple for {0}" +msgstr "" + +#: option.py:318 +msgid "open_values must be a boolean for {0}" +msgstr "" + +#: option.py:452 +msgid "opt_ip must be a IPOption not {}" +msgstr "" + +#: option.py:469 +msgid "unknown type for opt_ip" +msgstr "" + +#: option.py:535 +msgid "unknown type_ {0} for hostname" +msgstr "" + +#: option.py:571 +msgid "invalid name: {0} for option descr" +msgstr "" + +#: option.py:582 +msgid "duplicate option name: {0}" +msgstr "" + +#: option.py:604 +msgid "unknown Option {} in OptionDescription {}" +msgstr "Option {} inconnue pour l'OptionDescription{}" + +#: option.py:667 +msgid "duplicate option: {0}" +msgstr "" + +#: option.py:677 +msgid "no option for path {}" +msgstr "" + +#: option.py:683 +msgid "no option {} found" +msgstr "" + +#: option.py:693 +msgid "cannot change group_type if already set (old {}, new {})" +msgstr "" + +#: option.py:705 +msgid "master group {} shall not have a subgroup" +msgstr "" + +#: option.py:708 +msgid "not allowed option {0} in group {1}: this option is not a multi" +msgstr "" + +#: option.py:718 +msgid "master group with wrong master name for {}" +msgstr "" + +#: option.py:726 +msgid "the master group: {} has not any master child" +msgstr "" + +#: option.py:729 +msgid "not allowed group_type : {0}" +msgstr "" + +#: option.py:751 +msgid "malformed requirements type for option: {0}, must be a tuple" +msgstr "" + +#: option.py:760 +msgid "malformed requirements for option: {0} invalid len" +msgstr "" + +#: option.py:764 +msgid "inconsistency in action types for option: {0} action: {1}" +msgstr "" + +#: setting.py:43 +msgid "Can't rebind group ({})" +msgstr "" + +#: setting.py:48 +msgid "Can't unbind group ({})" +msgstr "" + +#: setting.py:282 +msgid "trying to access to an option named: {0} with properties {1}" +msgstr "" + +#: setting.py:290 +msgid "cannot change the value for option {0} this option is frozen" +msgstr "" + +#: setting.py:302 +msgid "permissive must be a tuple" +msgstr "" + +#: setting.py:372 +msgid "" +"malformed requirements imbrication detected for option: '{0}' with " +"requirement on: '{1}'" +msgstr "" + +#: setting.py:379 +msgid "option '{0}' has requirement's property error: {1} {2}" +msgstr "" + +#: setting.py:382 +msgid "required option not found: {0}" +msgstr "" diff --git a/translations/tiramisu.pot b/translations/tiramisu.pot new file mode 100644 index 0000000..3a28ce6 --- /dev/null +++ b/translations/tiramisu.pot @@ -0,0 +1,238 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-04-23 14:16+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: config.py:45 +msgid "descr must be an optiondescription, not {0}" +msgstr "" + +#: config.py:200 +msgid "unknown group_type: {0}" +msgstr "" + +#: config.py:267 +msgid "make_dict can't filtering with value without option" +msgstr "" + +#: config.py:286 +msgid "unexpected path {0}, should start with {1}" +msgstr "" + +#: config.py:414 +msgid "unknown type_ type {0} for _find" +msgstr "" + +#: config.py:448 +msgid "no option found in config with these criteria" +msgstr "" + +#: autolib.py:51 +msgid "no config specified but needed" +msgstr "" + +#: value.py:121 +msgid "invalid calculated value returned for option {0}: {1}" +msgstr "" + +#: value.py:141 +msgid "invalid value {} for option {}" +msgstr "" + +#: value.py:162 +msgid "no value for {1} cannot change owner to {2}" +msgstr "" + +#: value.py:164 setting.py:309 +msgid "invalid generic owner {0}" +msgstr "" + +#: value.py:226 +msgid "invalid len for the slave: {0} which has {1} as master" +msgstr "" + +#: value.py:242 +msgid "invalid len for the master: {0} which has {1} as slave with greater len" +msgstr "" + +#: value.py:262 +msgid "cannot append a value on a multi option {0} which is a slave" +msgstr "" + +#: value.py:277 +msgid "invalid value {0} for option {1}" +msgstr "" + +#: value.py:290 +msgid "cannot pop a value on a multi option {0} which is a slave" +msgstr "" + +#: option.py:77 +msgid "Information's item not found: {0}" +msgstr "" + +#: option.py:113 +msgid "invalid name: {0} for option" +msgstr "" + +#: option.py:123 +msgid "validator must be a function" +msgstr "" + +#: option.py:130 +msgid "a default_multi is set whereas multi is False in option: {0}" +msgstr "" + +#: option.py:133 +msgid "invalid default_multi value {0} for option {1}" +msgstr "" + +#: option.py:136 +msgid "defaut values not allowed if option: {0} is calculated" +msgstr "" + +#: option.py:139 +msgid "" +"params defined for a callback function but no callback defined yet for " +"option {0}" +msgstr "" + +#: option.py:158 option.py:165 +msgid "invalid default value {0} for option {1}" +msgstr "" + +#: option.py:171 option.py:591 +msgid "invalid properties type {0} for {1}, must be a tuple" +msgstr "" + +#: option.py:214 +msgid "invalid value {0} for option {1} which must be a list" +msgstr "" + +#: option.py:315 +msgid "values must be a tuple for {0}" +msgstr "" + +#: option.py:318 +msgid "open_values must be a boolean for {0}" +msgstr "" + +#: option.py:452 +msgid "opt_ip must be a IPOption not {}" +msgstr "" + +#: option.py:469 +msgid "unknown type for opt_ip" +msgstr "" + +#: option.py:535 +msgid "unknown type_ {0} for hostname" +msgstr "" + +#: option.py:571 +msgid "invalid name: {0} for option descr" +msgstr "" + +#: option.py:582 +msgid "duplicate option name: {0}" +msgstr "" + +#: option.py:604 +msgid "unknown Option {} in OptionDescription {}" +msgstr "" + +#: option.py:667 +msgid "duplicate option: {0}" +msgstr "" + +#: option.py:677 +msgid "no option for path {}" +msgstr "" + +#: option.py:683 +msgid "no option {} found" +msgstr "" + +#: option.py:693 +msgid "cannot change group_type if already set (old {}, new {})" +msgstr "" + +#: option.py:705 +msgid "master group {} shall not have a subgroup" +msgstr "" + +#: option.py:708 +msgid "not allowed option {0} in group {1}: this option is not a multi" +msgstr "" + +#: option.py:718 +msgid "master group with wrong master name for {}" +msgstr "" + +#: option.py:726 +msgid "the master group: {} has not any master child" +msgstr "" + +#: option.py:729 +msgid "not allowed group_type : {0}" +msgstr "" + +#: option.py:751 +msgid "malformed requirements type for option: {0}, must be a tuple" +msgstr "" + +#: option.py:760 +msgid "malformed requirements for option: {0} invalid len" +msgstr "" + +#: option.py:764 +msgid "inconsistency in action types for option: {0} action: {1}" +msgstr "" + +#: setting.py:43 +msgid "Can't rebind group ({})" +msgstr "" + +#: setting.py:48 +msgid "Can't unbind group ({})" +msgstr "" + +#: setting.py:282 +msgid "trying to access to an option named: {0} with properties {1}" +msgstr "" + +#: setting.py:290 +msgid "cannot change the value for option {0} this option is frozen" +msgstr "" + +#: setting.py:302 +msgid "permissive must be a tuple" +msgstr "" + +#: setting.py:372 +msgid "" +"malformed requirements imbrication detected for option: '{0}' with " +"requirement on: '{1}'" +msgstr "" + +#: setting.py:379 +msgid "option '{0}' has requirement's property error: {1} {2}" +msgstr "" + +#: setting.py:382 +msgid "required option not found: {0}" +msgstr ""