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 0000000..300e24e Binary files /dev/null and b/translations/fr/tiramisu.mo differ 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 ""