diff --git a/locale/fr/LC_MESSAGES/rougail.po b/locale/fr/LC_MESSAGES/rougail.po index 45efcf3be..22f8bec36 100644 --- a/locale/fr/LC_MESSAGES/rougail.po +++ b/locale/fr/LC_MESSAGES/rougail.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2025-12-22 15:32+0100\n" -"PO-Revision-Date: 2025-12-22 15:35+0100\n" +"POT-Creation-Date: 2025-12-22 19:02+0100\n" +"PO-Revision-Date: 2025-12-22 19:04+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -980,56 +980,50 @@ msgstr "" "la famille {0} est {1}, {2} à l'index \"{3}\", elle a été chargée depuis {4}" #: src/rougail/user_data.py:421 -msgid "variable is {0}, it has been loading from {1}" -msgstr "la variable est {0}, elle a été chargée depuis {1}" +msgid "variable has propery {0}, it has been loading from {1}" +msgstr "la variable a la propriété {0}, elle a été chargée depuis {1}" #: src/rougail/user_data.py:425 -msgid "variable is {0}, it will be ignored when loading from {1}" -msgstr "la variable est {0}, elle sera ignorée lors du chargement depuis {1}" +msgid "variable has property {0}, it will be ignored when loading from {1}" +msgstr "" +"la variable a la propriété {0}, elle sera ignorée lors du chargement depuis " +"{1}" #: src/rougail/user_data.py:435 msgid "" -"family {0} is {1}, so cannot access to {2}, it has been loading from {3}" +"family {0} has property {1}, so cannot access to {2}, it has been loading " +"from {3}" msgstr "" -"la famille {0} est {1}, donc ne peut accéder à {2}, elle a été chargée " -"depuis {3}" +"la famille {0} a la propriété {1}, donc ne peut accéder à {2}, elle a été " +"chargée depuis {3}" #: src/rougail/user_data.py:439 msgid "" -"family {0} is {1}, so cannot access to {2}, it will be ignored when loading " -"from {3}" +"family {0} has property {1}, so cannot access to {2}, it will be ignored " +"when loading from {3}" msgstr "" -"la famille {0} est {1}, donc ne peut accéder à {2}, sera ignorée lors du " -"chargement depuis {3}" +"la famille {0} a la propriété {1}, donc ne peut accéder à {2}, sera ignorée " +"lors du chargement depuis {3}" + +#: src/rougail/user_data.py:459 +msgid "{0}, it has been loading from {1}" +msgstr "{0}, elle a été chargée depuis {1}" #: src/rougail/user_data.py:461 -msgid "" -"the value \"{0}\" is an invalid {1} for {2} at index \"{3}\", {4}, it has " -"been loading from {5}" -msgstr "" -"la valeur \"{0}\" est un {1} invalide pour {2} à l'index \"{3}\", {4}, elle " -"a été chargée depuis {5}" +msgid "{0}, it will be ignored when loading from {1}" +msgstr "{0}, elle sera ignorée lors du chargement depuis {1}" -#: src/rougail/user_data.py:465 -msgid "" -"the value \"{0}\" is an invalid {1} for {2} at index \"{3}\", {4}, it will " -"be ignored when loading from {5}" -msgstr "" -"la valeur \"{0}\" est un {1} invalide pour {2} à l'index \"{3}\", {4}, elle " -"sera ignorée lors du chargement depuis {5}" +#: src/rougail/user_data.py:466 +msgid "the value \"{0}\" is an invalid {1}, {2}" +msgstr "la valeur \"{0}\" est un {1} invalide, {2}" -#: src/rougail/user_data.py:481 -msgid "the value \"{0}\" is an invalid {1}, {2}, it has been loading from {3}" -msgstr "" -"la valeur \"{0}\" est un {1} invalide pour {2}, elle a été chargée depuis {3}" +#: src/rougail/user_data.py:472 +msgid ", it has been loading from {0}" +msgstr ", elle a été chargée depuis {0}" -#: src/rougail/user_data.py:485 -msgid "" -"the value \"{0}\" is an invalid {1}, {2}, it will be ignored when loading " -"from {3}" -msgstr "" -"la valeur \"{0}\" est un {1} invalide pour {2}, elle sera ignorée lors du " -"chargement depuis {3}" +#: src/rougail/user_data.py:474 +msgid ", it will be ignored when loading from {0}" +msgstr ", elle sera ignorée lors du chargement depuis {0}" #: src/rougail/utils.py:56 msgid "" @@ -1063,6 +1057,32 @@ msgstr "unique" msgid "auto modified" msgstr "auto modifiée" +#~ msgid "" +#~ "the value \"{0}\" is an invalid {1} for {2} at index \"{3}\", {4}, it has " +#~ "been loading from {5}" +#~ msgstr "" +#~ "la valeur \"{0}\" est un {1} invalide pour {2} à l'index \"{3}\", {4}, " +#~ "elle a été chargée depuis {5}" + +#~ msgid "" +#~ "the value \"{0}\" is an invalid {1} for {2} at index \"{3}\", {4}, it " +#~ "will be ignored when loading from {5}" +#~ msgstr "" +#~ "la valeur \"{0}\" est un {1} invalide pour {2} à l'index \"{3}\", {4}, " +#~ "elle sera ignorée lors du chargement depuis {5}" + +#~ msgid "" +#~ "the value \"{0}\" is an invalid {1}, {2}, it has been loading from {3}" +#~ msgstr "" +#~ "la valeur \"{0}\" est un {1} invalide, {2}, elle a été chargée depuis {3}" + +#~ msgid "" +#~ "the value \"{0}\" is an invalid {1}, {2}, it will be ignored when loading " +#~ "from {3}" +#~ msgstr "" +#~ "la valeur \"{0}\" est un {1} invalide, {2}, elle sera ignorée lors du " +#~ "chargement depuis {3}" + #~ msgid "The secret pattern to build item name in Bitwarden" #~ msgstr "" #~ "Le patron de secret pour construire le nom de l'élément dans Bitwarden" diff --git a/locale/rougail.pot b/locale/rougail.pot index 48cbdf2f9..c2d7f4532 100644 --- a/locale/rougail.pot +++ b/locale/rougail.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-12-22 15:35+0100\n" +"POT-Creation-Date: 2025-12-22 19:04+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -732,35 +732,39 @@ msgid "family {0} is {1}, {2} at index \"{3}\", it will be ignored when loading msgstr "" #: src/rougail/user_data.py:421 -msgid "variable is {0}, it has been loading from {1}" +msgid "variable has propery {0}, it has been loading from {1}" msgstr "" #: src/rougail/user_data.py:425 -msgid "variable is {0}, it will be ignored when loading from {1}" +msgid "variable has property {0}, it will be ignored when loading from {1}" msgstr "" #: src/rougail/user_data.py:435 -msgid "family {0} is {1}, so cannot access to {2}, it has been loading from {3}" +msgid "family {0} has property {1}, so cannot access to {2}, it has been loading from {3}" msgstr "" #: src/rougail/user_data.py:439 -msgid "family {0} is {1}, so cannot access to {2}, it will be ignored when loading from {3}" +msgid "family {0} has property {1}, so cannot access to {2}, it will be ignored when loading from {3}" +msgstr "" + +#: src/rougail/user_data.py:459 +msgid "{0}, it has been loading from {1}" msgstr "" #: src/rougail/user_data.py:461 -msgid "the value \"{0}\" is an invalid {1} for {2} at index \"{3}\", {4}, it has been loading from {5}" +msgid "{0}, it will be ignored when loading from {1}" msgstr "" -#: src/rougail/user_data.py:465 -msgid "the value \"{0}\" is an invalid {1} for {2} at index \"{3}\", {4}, it will be ignored when loading from {5}" +#: src/rougail/user_data.py:466 +msgid "the value \"{0}\" is an invalid {1}, {2}" msgstr "" -#: src/rougail/user_data.py:481 -msgid "the value \"{0}\" is an invalid {1}, {2}, it has been loading from {3}" +#: src/rougail/user_data.py:472 +msgid ", it has been loading from {0}" msgstr "" -#: src/rougail/user_data.py:485 -msgid "the value \"{0}\" is an invalid {1}, {2}, it will be ignored when loading from {3}" +#: src/rougail/user_data.py:474 +msgid ", it will be ignored when loading from {0}" msgstr "" #: src/rougail/utils.py:56 diff --git a/src/rougail/locale/fr/LC_MESSAGES/rougail.mo b/src/rougail/locale/fr/LC_MESSAGES/rougail.mo index 8189a6188..002ca3047 100644 Binary files a/src/rougail/locale/fr/LC_MESSAGES/rougail.mo and b/src/rougail/locale/fr/LC_MESSAGES/rougail.mo differ diff --git a/src/rougail/user_data.py b/src/rougail/user_data.py index fad17c0e3..bd1e27b1c 100644 --- a/src/rougail/user_data.py +++ b/src/rougail/user_data.py @@ -419,11 +419,11 @@ class UserData: if path == err_path: if self.invalid_user_data_error: msg = _( - "variable is {0}, it has been loading from {1}" + "variable has propery {0}, it has been loading from {1}" ) else: msg = _( - "variable is {0}, it will be ignored when loading from {1}" + "variable has property {0}, it will be ignored when loading from {1}" ) self.unknowns.append({ msg.format( @@ -433,11 +433,11 @@ class UserData: else: if self.invalid_user_data_error: msg = _( - "family {0} is {1}, so cannot access to {2}, it has been loading from {3}" + "family {0} has property {1}, so cannot access to {2}, it has been loading from {3}" ) else: msg = _( - "family {0} is {1}, so cannot access to {2}, it will be ignored when loading from {3}" + "family {0} has property {1}, so cannot access to {2}, it will be ignored when loading from {3}" ) self.unknowns.append({ msg.format( @@ -453,46 +453,26 @@ class UserData: ) except LeadershipError as err: self.unknowns.append({_("{0} in {1}").format(err, options["source"]): option._subconfig}) + except ConfigError as err: + err.prefix = "" + if self.invalid_user_data_error: + msg = _('{0}, it has been loading from {1}').format(err, options["source"]) + else: + msg = _('{0}, it will be ignored when loading from {1}').format(err, options["source"]) + self.invalids.append({msg: option._subconfig}) except ValueError as err: err.prefix = "" - if index is not None: - type_ = option.type(translation=True) - if self.invalid_user_data_error: - msg = _( - 'the value "{0}" is an invalid {1} for {2} at index "{3}", {4}, it has been loading from {5}' + type_ = option.type(translation=True) + msg = _('the value "{0}" is an invalid {1}, {2}').format( + self._display_value(option, value), + type_, + err, ) - else: - msg = _( - 'the value "{0}" is an invalid {1} for {2} at index "{3}", {4}, it will be ignored when loading from {5}' - ) - self.invalids.append({ - msg.format( - self._display_value(option, value), - type_, - option.description(with_quote=True), - index, - err, - options["source"], - ): option._subconfig} - ) + if self.invalid_user_data_error: + msg += _(', it has been loading from {0}').format(options["source"]) else: - type_ = option.type(translation=True) - if self.invalid_user_data_error: - msg = _( - 'the value "{0}" is an invalid {1}, {2}, it has been loading from {3}' - ) - else: - msg = _( - 'the value "{0}" is an invalid {1}, {2}, it will be ignored when loading from {3}' - ) - self.invalids.append({ - msg.format( - self._display_value(option, value), - type_, - err, - options["source"], - ): option._subconfig} - ) + msg += _(', it will be ignored when loading from {0}').format(options["source"]) + self.invalids.append({msg: option._subconfig}) except AttributeOptionError as err: if err.code == "option-dynamic": continue @@ -504,6 +484,7 @@ class UserData: # it's a function params = tuple([ParamValue(val) for val in value[1:]]) value = Calculation(value[0], Params(params, kwargs={"option": ParamValue(option)})) + option = self.config.forcepermissive.option(option.path(), option.index()) option.value.set(value)