From 25c84192ecf065f8bc5829c374671c0a37a7fc12 Mon Sep 17 00:00:00 2001 From: Emmanuel Lacour Date: Mon, 9 Nov 2020 16:18:45 +0100 Subject: [PATCH 1/3] Update POT file usin RT extract-message-catalog --- po/mandatoryontransition.pot | 54 +++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/po/mandatoryontransition.pot b/po/mandatoryontransition.pot index c2ba197..95ce1a3 100644 --- a/po/mandatoryontransition.pot +++ b/po/mandatoryontransition.pot @@ -1,6 +1,52 @@ -#. ($cf->Name, $ARGSRef->{Status}) -#. ($label, $ARGSRef->{Status}) -#: lib/RT/Extension/MandatoryOnTransition.pm:363 lib/RT/Extension/MandatoryOnTransition.pm:411 -msgid "%1 is required when changing Status to %2" +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition})) +#. ($role_name, $CurrentUser->loc($transition), $CurrentUser->loc( $args{'To'} )) +#. ($label, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition})) +#: lib/RT/Extension/MandatoryOnTransition.pm:553 lib/RT/Extension/MandatoryOnTransition.pm:774 lib/RT/Extension/MandatoryOnTransition.pm:902 +msgid "%1 is required when changing %2 to %3" +msgstr "" + +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:868 +msgid "%1 must be %4 when changing %2 to %3" +msgstr "" + +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:863 +msgid "%1 must be one of: %4 when changing %2 to %3" +msgstr "" + +#. ($cf->Name, $CurrentUser->loc($transition),$CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:887 +msgid "%1 must not be %4 when changing %2 to %3" +msgstr "" + +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:882 +msgid "%1 must not be one of: %4 when changing %2 to %3" +msgstr "" + +#. ($roles, $role_name) +#: lib/RT/Extension/MandatoryOnTransition.pm:763 +msgid "A member of group %1 is required for role: %2" +msgstr "" + +#. ($role->Name) +#. (loc($role->Name)) +#: html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Elements/EditBasics/MassageFields:45 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked:62 +msgid "Add %1" +msgstr "" + +#. ($role_name) +#: lib/RT/Extension/MandatoryOnTransition.pm:572 +msgid "Could not load object for %1" +msgstr "" + +#. ($value) +#: lib/RT/Extension/MandatoryOnTransition.pm:659 lib/RT/Extension/MandatoryOnTransition.pm:706 lib/RT/Extension/MandatoryOnTransition.pm:729 +msgid "Could not load user: %1" +msgstr "" + +#: lib/RT/Extension/MandatoryOnTransition.pm:627 +msgid "Failed to load role $role for ticket" msgstr "" From ed835040a61e58dd88c12b25e0334ea55076ba60 Mon Sep 17 00:00:00 2001 From: Emmanuel Lacour Date: Mon, 9 Nov 2020 16:24:58 +0100 Subject: [PATCH 2/3] Update FR translation --- po/fr.po | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/po/fr.po b/po/fr.po index fa384ad..280092a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,14 +1,60 @@ msgid "" msgstr "" -"PO-Revision-Date: 2016-03-17 11:51+0200\n" +"PO-Revision-Date: 2020-11-09 16:19+0200\n" "Last-Translator: Emmanuel Lacour \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. ($cf->Name, $ARGSRef->{Status}) -#. ($label, $ARGSRef->{Status}) -#: lib/RT/Extension/MandatoryOnTransition.pm:363 lib/RT/Extension/MandatoryOnTransition.pm:411 +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition})) +#. ($role_name, $CurrentUser->loc($transition), $CurrentUser->loc( $args{'To'} )) +#. ($label, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition})) +#: lib/RT/Extension/MandatoryOnTransition.pm:553 lib/RT/Extension/MandatoryOnTransition.pm:774 lib/RT/Extension/MandatoryOnTransition.pm:902 msgid "%1 is required when changing Status to %2" msgstr "%1 est obligatoire lors du passage en %2" +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:868 +msgid "%1 must be %4 when changing %2 to %3" +msgstr "%1 doit être %4 lorsqu’on passe de %2 à %3" + +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:863 +msgid "%1 must be one of: %4 when changing %2 to %3" +msgstr "%1 doit être parmi : %4 lorsqu’on passe de %2 à %3" + +#. ($cf->Name, $CurrentUser->loc($transition),$CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:887 +msgid "%1 must not be %4 when changing %2 to %3" +msgstr "%1 ne doit pas être %4 lorsqu’on passe de %2 à %3" + +#. ($cf->Name, $CurrentUser->loc($transition), $CurrentUser->loc($field_label{$transition}), $valid_values) +#: lib/RT/Extension/MandatoryOnTransition.pm:882 +msgid "%1 must not be one of: %4 when changing %2 to %3" +msgstr "%1 ne doit pas être parmi :%4 lorsqu’on passe de %2 à %3" + +#. ($roles, $role_name) +#: lib/RT/Extension/MandatoryOnTransition.pm:763 +msgid "A member of group %1 is required for role: %2" +msgstr "Un membre du groupe %1 est requi pour le rôle : %2" + +#. ($role->Name) +#. (loc($role->Name)) +#: html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Elements/EditBasics/MassageFields:45 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked:62 +msgid "Add %1" +msgstr "Ajouter %1" + +#. ($role_name) +#: lib/RT/Extension/MandatoryOnTransition.pm:572 +msgid "Could not load object for %1" +msgstr "Impossible de charger l’objet pour %1" + +#. ($value) +#: lib/RT/Extension/MandatoryOnTransition.pm:659 lib/RT/Extension/MandatoryOnTransition.pm:706 lib/RT/Extension/MandatoryOnTransition.pm:729 +msgid "Could not load user: %1" +msgstr "Impossible de charger l’utilisateur : %1" + +#: lib/RT/Extension/MandatoryOnTransition.pm:627 +msgid "Failed to load role $role for ticket" +msgstr "Impossible de charger le rôle $role" + From 76b54599311c51e0ecd41c59dfc017bf8f957c26 Mon Sep 17 00:00:00 2001 From: Emmanuel Lacour Date: Mon, 9 Nov 2020 16:26:43 +0100 Subject: [PATCH 3/3] Fix wrong loc usage --- lib/RT/Extension/MandatoryOnTransition.pm | 2 +- po/fr.po | 5 +++-- po/mandatoryontransition.pot | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm index b811583..5964ac8 100644 --- a/lib/RT/Extension/MandatoryOnTransition.pm +++ b/lib/RT/Extension/MandatoryOnTransition.pm @@ -624,7 +624,7 @@ sub CheckMandatoryFields { grep { $_->id != $RT::Nobody->id } @{ $role_values->UserMembersObj->ItemsArrayRef }; } else { - push @errors, $CurrentUser->loc("Failed to load role $role for ticket"); + push @errors, $CurrentUser->loc("Failed to load role [_1] for ticket", $role); } } } diff --git a/po/fr.po b/po/fr.po index 280092a..c39eaab 100644 --- a/po/fr.po +++ b/po/fr.po @@ -54,7 +54,8 @@ msgstr "Impossible de charger l’objet pour %1" msgid "Could not load user: %1" msgstr "Impossible de charger l’utilisateur : %1" +#. ($role) #: lib/RT/Extension/MandatoryOnTransition.pm:627 -msgid "Failed to load role $role for ticket" -msgstr "Impossible de charger le rôle $role" +msgid "Failed to load role %1 for ticket" +msgstr "Impossible de charger le rôle « %1 »" diff --git a/po/mandatoryontransition.pot b/po/mandatoryontransition.pot index 95ce1a3..8157644 100644 --- a/po/mandatoryontransition.pot +++ b/po/mandatoryontransition.pot @@ -46,7 +46,8 @@ msgstr "" msgid "Could not load user: %1" msgstr "" +#. ($role) #: lib/RT/Extension/MandatoryOnTransition.pm:627 -msgid "Failed to load role $role for ticket" +msgid "Failed to load role %1 for ticket" msgstr ""