From e9ffd96a28d9f05fbf4100ea824311f260dbd5f9 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 18 Jul 2013 21:25:07 +0200 Subject: [PATCH] update translation --- tiramisu/config.py | 2 +- tiramisu/option.py | 6 +- tiramisu/setting.py | 12 +-- translations/fr/tiramisu.po | 104 +++++++++++++----------- translations/tiramisu.pot | 153 +++++++++++++++++++----------------- 5 files changed, 150 insertions(+), 127 deletions(-) diff --git a/tiramisu/config.py b/tiramisu/config.py index c6859c8..510d489 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -530,7 +530,7 @@ class MetaConfig(CommonConfig): for child in children: if not isinstance(child, CommonConfig): raise ValueError(_("metaconfig's children must be config, not {0}" - "".format(type(child)))) + "").format(type(child))) if self._impl_descr is None: self._impl_descr = child.cfgimpl_get_description() elif not self._impl_descr is child.cfgimpl_get_description(): diff --git a/tiramisu/option.py b/tiramisu/option.py index 02d1cd8..23cbd27 100644 --- a/tiramisu/option.py +++ b/tiramisu/option.py @@ -671,8 +671,10 @@ class DomainnameOption(Option): raise ValueError(_("invalid value for {0}, must have dot" "").format(self._name)) if len(value) > length: - raise ValueError(_("invalid value's length for {0} (max {1})" - "").format(self._name, length)) + raise ValueError(_("invalid domainname's length for {0} (max {1})").format(self._name, length)) + if len(value) == 1: + raise ValueError(_("invalid domainname's length for {0} (min 2)" + "").format(self._name)) regexp = r'^[a-z]([a-z\d{0}-])*[a-z\d]$'.format(extrachar) if re.match(regexp, value) is None: raise ValueError(_('invalid domainname')) diff --git a/tiramisu/setting.py b/tiramisu/setting.py index e9aa2ac..ded7811 100644 --- a/tiramisu/setting.py +++ b/tiramisu/setting.py @@ -289,13 +289,15 @@ class Setting(object): properties.remove('frozen') if properties != frozenset(): + comment = (opt_or_descr._name, str(list(properties))) if 'frozen' in properties: - raise_text = 'cannot change the value for option {0} this option is frozen' + raise PropertiesOptionError(_('cannot change the value for ' + 'option {0} this option is frozen' + '').format(comment)) else: - raise_text = "trying to access to an option named: {0} with properties {1}" - raise PropertiesOptionError(_(raise_text).format(opt_or_descr._name, - str(list(properties))), - list(properties)) + raise PropertiesOptionError(_("trying to access to an option " + "named: {0} with properties {1}" + "").format(comment, list(properties))) def _get_permissive(self, opt=None): return self._permissives.get(opt, frozenset()) diff --git a/translations/fr/tiramisu.po b/translations/fr/tiramisu.po index 3ef5ce3..7f1c10d 100644 --- a/translations/fr/tiramisu.po +++ b/translations/fr/tiramisu.po @@ -1,7 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-07-18 15:20+CEST\n" "PO-Revision-Date: \n" "Last-Translator: Emmanuel Garette \n" "Language-Team: LANGUAGE \n" @@ -42,32 +43,36 @@ msgid "no optiondescription for this config (may be metaconfig without meta)" msgstr "" "pas d'optiondescription pour cette config (par exemple metaconfig sans meta)" -#: tiramisu/config.py:311 +#: tiramisu/config.py:312 msgid "unknown type_ type {0} for _find" msgstr "type_ type {0} pour _find inconnu" -#: tiramisu/config.py:391 +#: tiramisu/config.py:351 +msgid "no option found in config with these criteria" +msgstr "aucune option trouvée dans la config avec ces critères" + +#: tiramisu/config.py:394 msgid "make_dict can't filtering with value without option" msgstr "make_dict ne peut filtrer sur une valeur mais sans option" -#: tiramisu/config.py:411 +#: tiramisu/config.py:414 msgid "unexpected path {0}, should start with {1}" msgstr "chemin imprévu {0}, devrait commencer par {1}" -#: tiramisu/config.py:524 +#: tiramisu/config.py:527 msgid "metaconfig's children must be a list" msgstr "enfants d'une metaconfig doit être une liste" -#: tiramisu/config.py:529 +#: tiramisu/config.py:532 msgid "metaconfig's children must be config, not {0}" msgstr "enfants d'une metaconfig doit être une config, pas {0}" -#: tiramisu/config.py:534 +#: tiramisu/config.py:537 msgid "all config in metaconfig must have same optiondescription" msgstr "" "toutes les configs d'une metaconfig doivent avoir la même optiondescription" -#: tiramisu/config.py:537 +#: tiramisu/config.py:540 msgid "child has already a metaconfig's" msgstr "enfant a déjà une metaconfig" @@ -112,7 +117,7 @@ msgstr "" "params définit pour une fonction callback mais par de callback défini encore " "pour l'option {0}" -#: tiramisu/option.py:174 tiramisu/option.py:716 +#: tiramisu/option.py:174 tiramisu/option.py:718 msgid "invalid properties type {0} for {1}, must be a tuple" msgstr "type des properties invalide {0} pour {1}, doit être un tuple" @@ -218,73 +223,77 @@ msgid "invalid value for {0}, must have dot" msgstr "valeur invalide pour {0}, doit avoir un point" #: tiramisu/option.py:674 -msgid "invalid value's length for {0} (max {1})" -msgstr "longueur de la valeur invalide pour {0} (maximum {1})" +msgid "invalid domainname's length for {0} (max {1})" +msgstr "longueur du nom de domaine invalide pour {0} (maximum {1})" -#: tiramisu/option.py:678 +#: tiramisu/option.py:676 +msgid "invalid domainname's length for {0} (min 2)" +msgstr "longueur du nom de domaine invalide pour {0} (minimum 2)" + +#: tiramisu/option.py:680 msgid "invalid domainname" msgstr "nom de domaine invalide" -#: tiramisu/option.py:694 +#: tiramisu/option.py:696 msgid "invalid name: {0} for optiondescription" msgstr "nom invalide : {0} pour l'optiondescription" -#: tiramisu/option.py:705 +#: tiramisu/option.py:707 msgid "duplicate option name: {0}" msgstr "nom de l'option dupliqué : {0}" -#: tiramisu/option.py:729 +#: tiramisu/option.py:731 msgid "unknown Option {0} in OptionDescription {1}" msgstr "Option {} inconnue pour l'OptionDescription{}" -#: tiramisu/option.py:793 +#: tiramisu/option.py:795 msgid "duplicate option: {0}" msgstr "option dupliquée : {0}" -#: tiramisu/option.py:803 +#: tiramisu/option.py:805 msgid "no option for path {0}" msgstr "pas d'option pour le chemin {0}" -#: tiramisu/option.py:809 +#: tiramisu/option.py:811 msgid "no option {0} found" msgstr "pas d'option {0} trouvée" -#: tiramisu/option.py:819 +#: tiramisu/option.py:821 msgid "cannot change group_type if already set (old {0}, new {1})" msgstr "ne peut changer group_type si déjà spécifié (ancien {0}, nouveau {1})" -#: tiramisu/option.py:831 +#: tiramisu/option.py:833 msgid "master group {0} shall not have a subgroup" msgstr "groupe maître {0} ne doit pas avoir de sous-groupe" -#: tiramisu/option.py:834 +#: tiramisu/option.py:836 msgid "master group {0} shall not have a symlinkoption" msgstr "groupe maître {0} ne doit pas avoir de symlinkoption" -#: tiramisu/option.py:837 +#: tiramisu/option.py:839 msgid "not allowed option {0} in group {1}: this option is not a multi" msgstr "" "option non autorisée {0} dans le groupe {1} : cette option n'est pas une " "multi" -#: tiramisu/option.py:847 +#: tiramisu/option.py:849 msgid "master group with wrong master name for {0}" msgstr "le groupe maître avec un nom de maître éroné pour {0}" -#: tiramisu/option.py:855 +#: tiramisu/option.py:857 msgid "no child has same nom has master group for: {0}" msgstr "pas d'enfant avec le nom du groupe maître pour {0} " -#: tiramisu/option.py:858 +#: tiramisu/option.py:860 msgid "not allowed group_type : {0}" msgstr "group_type non autorisé : {0}" -#: tiramisu/option.py:887 +#: tiramisu/option.py:889 msgid "malformed requirements type for option: {0}, must be a dict" msgstr "" "type requirements malformé pour l'option : {0}, doit être un dictionnaire" -#: tiramisu/option.py:903 +#: tiramisu/option.py:905 msgid "" "malformed requirements for option: {0} require must have option, expected " "and action keys" @@ -292,59 +301,68 @@ msgstr "" "requirements malformé pour l'option : {0} l'exigence doit avoir les clefs " "option, exptected et action" -#: tiramisu/option.py:908 +#: tiramisu/option.py:910 msgid "malformed requirements for option: {0} inverse must be boolean" msgstr "requirements malformé pour l'option : {0} inverse doit être un booléen" -#: tiramisu/option.py:912 +#: tiramisu/option.py:914 msgid "malformed requirements for option: {0} transitive must be boolean" msgstr "requirements malformé pour l'option : {0} transitive doit être booléen" -#: tiramisu/option.py:916 +#: tiramisu/option.py:918 msgid "malformed requirements for option: {0} same_action must be boolean" msgstr "" "requirements malformé pour l'option : {0} same_action doit être un booléen" -#: tiramisu/option.py:921 +#: tiramisu/option.py:923 msgid "malformed requirements must be an option in option {0}" msgstr "requirements malformé doit être une option dans l'option {0}" -#: tiramisu/option.py:924 +#: tiramisu/option.py:926 msgid "malformed requirements option {0} should not be a multi" msgstr "requirements malformé l'option {0} ne doit pas être une multi" -#: tiramisu/option.py:930 +#: tiramisu/option.py:932 msgid "" "malformed requirements second argument must be valid for option {0}: {1}" msgstr "" "requirements malformé deuxième argument doit être valide pour l'option {0} : " "{1}" -#: tiramisu/option.py:934 +#: tiramisu/option.py:936 msgid "inconsistency in action types for option: {0} action: {1}" msgstr "incohérence dans les types action pour l'option : {0} action {1}" #: tiramisu/setting.py:45 -msgid "Can't rebind group ({})" +msgid "can't rebind group ({})" msgstr "ne peut reconsolider un groupe ({0})" #: tiramisu/setting.py:50 -msgid "Can't unbind group ({})" +msgid "can't unbind group ({})" msgstr "ne peut délier un groupe ({0})" #: tiramisu/setting.py:210 msgid "opt and all_properties must not be set together in reset" msgstr "opt et all_properties ne doit pas être renseigné ensemble dans reset" -#: tiramisu/setting.py:305 +#: tiramisu/setting.py:294 +msgid "cannot change the value for option {0} this option is frozen" +msgstr "" +"ne peut modifié la valeur de l'option {0} cette option n'est pas modifiable" + +#: tiramisu/setting.py:298 +msgid "trying to access to an option named: {0} with properties {1}" +msgstr "tentative d'accès à une option nommée : {0} avec les propriétés {1}" + +#: tiramisu/setting.py:307 msgid "permissive must be a tuple" msgstr "permissive doit être un tuple" -#: tiramisu/setting.py:312 tiramisu/value.py:208 +#: tiramisu/setting.py:314 tiramisu/value.py:208 msgid "invalid generic owner {0}" msgstr "invalide owner générique {0}" -#: tiramisu/setting.py:365 +#: tiramisu/setting.py:367 msgid "" "malformed requirements imbrication detected for option: '{0}' with " "requirement on: '{1}'" @@ -352,11 +370,11 @@ msgstr "" "imbrication de requirements malformé detectée pour l'option : '{0}' avec " "requirement sur : '{1}'" -#: tiramisu/setting.py:375 +#: tiramisu/setting.py:377 msgid "option '{0}' has requirement's property error: {1} {2}" msgstr "l'option '{0}' a une erreur de propriété pour le requirement : {1} {2}" -#: tiramisu/setting.py:381 +#: tiramisu/setting.py:383 msgid "required option not found: {0}" msgstr "option requise non trouvée : {0}" @@ -397,7 +415,3 @@ msgstr "ne peut étendre une option multi {0} pour une maître ou une esclave" #: tiramisu/value.py:381 msgid "cannot pop a value on a multi option {0} which is a slave" msgstr "ne peut supprimer une valeur dans l'option multi {0} qui est esclave" - -#: tiramisu/config.py:351 -msgid "no option found in config with these criteria" -msgstr "aucune option trouvée dans la config avec ces critères" diff --git a/translations/tiramisu.pot b/translations/tiramisu.pot index 2d3c451..faed4f3 100644 --- a/translations/tiramisu.pot +++ b/translations/tiramisu.pot @@ -1,35 +1,30 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# Copyright (C) YEAR ORGANIZATION # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-07-17 21:01+0200\n" +"POT-Creation-Date: 2013-07-18 15:20+CEST\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" +"Content-Transfer-Encoding: ENCODING\n" +"Generated-By: pygettext.py 1.5\n" + #: tiramisu/autolib.py:49 msgid "no config specified but needed" msgstr "" #: tiramisu/autolib.py:56 -msgid "" -"unable to carry out a calculation, option {0} has properties: {1} for: {2}" +msgid "unable to carry out a calculation, option {0} has properties: {1} for: {2}" msgstr "" #: tiramisu/autolib.py:65 -msgid "" -"unable to carry out a calculation, option values with multi types must have " -"same length for: {0}" +msgid "unable to carry out a calculation, option value with multi types must have same length for: {0}" msgstr "" #: tiramisu/config.py:45 @@ -41,39 +36,43 @@ msgid "unknown group_type: {0}" msgstr "" #: tiramisu/config.py:154 -msgid "no optiondescription for this config (may be MetaConfig without meta)" +msgid "no optiondescription for this config (may be metaconfig without meta)" msgstr "" -#: tiramisu/config.py:311 +#: tiramisu/config.py:312 msgid "unknown type_ type {0} for _find" msgstr "" -#: tiramisu/config.py:391 +#: tiramisu/config.py:351 +msgid "no option found in config with these criteria" +msgstr "" + +#: tiramisu/config.py:394 msgid "make_dict can't filtering with value without option" msgstr "" -#: tiramisu/config.py:411 +#: tiramisu/config.py:414 msgid "unexpected path {0}, should start with {1}" msgstr "" -#: tiramisu/config.py:524 +#: tiramisu/config.py:527 msgid "metaconfig's children must be a list" msgstr "" -#: tiramisu/config.py:529 -msgid "metaconfig's children must be Config, not {0}" -msgstr "" - -#: tiramisu/config.py:534 -msgid "all config in MetaConfig must have same optiondescription" +#: tiramisu/config.py:532 +msgid "metaconfig's children must be config, not {0}" msgstr "" #: tiramisu/config.py:537 +msgid "all config in metaconfig must have same optiondescription" +msgstr "" + +#: tiramisu/config.py:540 msgid "child has already a metaconfig's" msgstr "" #: tiramisu/option.py:70 -msgid "{0} instance has no attribute impl_set_information" +msgid "{0} has no attribute impl_set_information" msgstr "" #: tiramisu/option.py:84 @@ -81,7 +80,7 @@ msgid "Information's item not found: {0}" msgstr "" #: tiramisu/option.py:86 -msgid "{0} instance has no attribute impl_get_information" +msgid "{0} has no attribute impl_get_information" msgstr "" #: tiramisu/option.py:124 @@ -101,16 +100,14 @@ msgid "invalid default_multi value {0} for option {1}: {2}" msgstr "" #: tiramisu/option.py:150 -msgid "defaut values not allowed if option: {0} is calculated" +msgid "default value not allowed if option: {0} is calculated" msgstr "" #: tiramisu/option.py:153 -msgid "" -"params defined for a callback function but no callback defined yet for " -"option {0}" +msgid "params defined for a callback function but no callback defined yet for option {0}" msgstr "" -#: tiramisu/option.py:174 tiramisu/option.py:716 +#: tiramisu/option.py:174 tiramisu/option.py:718 msgid "invalid properties type {0} for {1}, must be a tuple" msgstr "" @@ -187,15 +184,15 @@ msgid "network mustn't not be in reserved class" msgstr "" #: tiramisu/option.py:608 -msgid "invalid network {0} ({1}) with netmask {2} ({3}), this network is an ip" +msgid "invalid network {0} ({1}) with netmask {2} ({3}), this network is an IP" msgstr "" #: tiramisu/option.py:612 -msgid "invalid ip {0} ({1}) with netmask {2} ({3}), this ip is a network" +msgid "invalid IP {0} ({1}) with netmask {2} ({3}), this IP is a network" msgstr "" #: tiramisu/option.py:617 -msgid "invalid ip {0} ({1}) with netmask {2} ({3})" +msgid "invalid IP {0} ({1}) with netmask {2} ({3})" msgstr "" #: tiramisu/option.py:619 @@ -215,135 +212,142 @@ msgid "invalid value for {0}, must have dot" msgstr "" #: tiramisu/option.py:674 -msgid "invalid value's length for {0} (max {1})" +msgid "invalid domainname's length for {0} (max {1})" msgstr "" -#: tiramisu/option.py:678 +#: tiramisu/option.py:676 +msgid "invalid domainname's length for {0} (min 2)" +msgstr "" + +#: tiramisu/option.py:680 msgid "invalid domainname" msgstr "" -#: tiramisu/option.py:694 -msgid "invalid name: {0} for option descr" +#: tiramisu/option.py:696 +msgid "invalid name: {0} for optiondescription" msgstr "" -#: tiramisu/option.py:705 +#: tiramisu/option.py:707 msgid "duplicate option name: {0}" msgstr "" -#: tiramisu/option.py:729 +#: tiramisu/option.py:731 msgid "unknown Option {0} in OptionDescription {1}" msgstr "" -#: tiramisu/option.py:793 +#: tiramisu/option.py:795 msgid "duplicate option: {0}" msgstr "" -#: tiramisu/option.py:803 +#: tiramisu/option.py:805 msgid "no option for path {0}" msgstr "" -#: tiramisu/option.py:809 +#: tiramisu/option.py:811 msgid "no option {0} found" msgstr "" -#: tiramisu/option.py:819 +#: tiramisu/option.py:821 msgid "cannot change group_type if already set (old {0}, new {1})" msgstr "" -#: tiramisu/option.py:831 +#: tiramisu/option.py:833 msgid "master group {0} shall not have a subgroup" msgstr "" -#: tiramisu/option.py:834 +#: tiramisu/option.py:836 msgid "master group {0} shall not have a symlinkoption" msgstr "" -#: tiramisu/option.py:837 +#: tiramisu/option.py:839 msgid "not allowed option {0} in group {1}: this option is not a multi" msgstr "" -#: tiramisu/option.py:847 +#: tiramisu/option.py:849 msgid "master group with wrong master name for {0}" msgstr "" -#: tiramisu/option.py:855 -msgid "the master group: {0} has not any master child" +#: tiramisu/option.py:857 +msgid "no child has same nom has master group for: {0}" msgstr "" -#: tiramisu/option.py:858 +#: tiramisu/option.py:860 msgid "not allowed group_type : {0}" msgstr "" -#: tiramisu/option.py:887 +#: tiramisu/option.py:889 msgid "malformed requirements type for option: {0}, must be a dict" msgstr "" -#: tiramisu/option.py:903 -msgid "" -"malformed requirements for option: {0} require must have option, expected " -"and action keys" +#: tiramisu/option.py:905 +msgid "malformed requirements for option: {0} require must have option, expected and action keys" msgstr "" -#: tiramisu/option.py:908 +#: tiramisu/option.py:910 msgid "malformed requirements for option: {0} inverse must be boolean" msgstr "" -#: tiramisu/option.py:912 +#: tiramisu/option.py:914 msgid "malformed requirements for option: {0} transitive must be boolean" msgstr "" -#: tiramisu/option.py:916 +#: tiramisu/option.py:918 msgid "malformed requirements for option: {0} same_action must be boolean" msgstr "" -#: tiramisu/option.py:921 +#: tiramisu/option.py:923 msgid "malformed requirements must be an option in option {0}" msgstr "" -#: tiramisu/option.py:924 +#: tiramisu/option.py:926 msgid "malformed requirements option {0} should not be a multi" msgstr "" -#: tiramisu/option.py:930 -msgid "" -"malformed requirements second argument must be valid for option {0}: {1}" +#: tiramisu/option.py:932 +msgid "malformed requirements second argument must be valid for option {0}: {1}" msgstr "" -#: tiramisu/option.py:934 +#: tiramisu/option.py:936 msgid "inconsistency in action types for option: {0} action: {1}" msgstr "" #: tiramisu/setting.py:45 -msgid "Can't rebind group ({})" +msgid "can't rebind group ({})" msgstr "" #: tiramisu/setting.py:50 -msgid "Can't unbind group ({})" +msgid "can't unbind group ({})" msgstr "" #: tiramisu/setting.py:210 msgid "opt and all_properties must not be set together in reset" msgstr "" -#: tiramisu/setting.py:305 +#: tiramisu/setting.py:294 +msgid "cannot change the value for option {0} this option is frozen" +msgstr "" + +#: tiramisu/setting.py:298 +msgid "trying to access to an option named: {0} with properties {1}" +msgstr "" + +#: tiramisu/setting.py:307 msgid "permissive must be a tuple" msgstr "" -#: tiramisu/setting.py:312 tiramisu/value.py:208 +#: tiramisu/setting.py:314 tiramisu/value.py:208 msgid "invalid generic owner {0}" msgstr "" -#: tiramisu/setting.py:365 -msgid "" -"malformed requirements imbrication detected for option: '{0}' with " -"requirement on: '{1}'" +#: tiramisu/setting.py:367 +msgid "malformed requirements imbrication detected for option: '{0}' with requirement on: '{1}'" msgstr "" -#: tiramisu/setting.py:375 +#: tiramisu/setting.py:377 msgid "option '{0}' has requirement's property error: {1} {2}" msgstr "" -#: tiramisu/setting.py:381 +#: tiramisu/setting.py:383 msgid "required option not found: {0}" msgstr "" @@ -382,3 +386,4 @@ msgstr "" #: tiramisu/value.py:381 msgid "cannot pop a value on a multi option {0} which is a slave" msgstr "" +