From 74be73121e29898ccdb40ef584a5b3039f17fed6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 26 May 2022 08:57:29 +0200 Subject: [PATCH] Bug 32030: Update I18N Note that we are adding an extra space for id and counter, otherwise they got removed in favor of the "simple" string. { Agreement: Agreement } replaced { Agreement: { id: ..., counter: ... } } Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../vue/components/ERM/AgreementDocuments.vue | 4 +- .../vue/components/ERM/AgreementLicenses.vue | 2 +- .../vue/components/ERM/AgreementPeriods.vue | 2 +- .../components/ERM/AgreementRelationships.vue | 2 +- .../vue/components/ERM/AgreementUserRoles.vue | 2 +- .../js/vue/components/ERM/AgreementsShow.vue | 2 +- .../ERM/EHoldingsPackageAgreements.vue | 4 +- .../components/ERM/EHoldingsPackagesShow.vue | 2 +- .../vue/components/ERM/EHoldingsResources.vue | 2 +- .../components/ERM/EHoldingsTitlesFormAdd.vue | 2 +- .../components/ERM/EHoldingsTitlesShow.vue | 2 +- .../js/vue/components/ERM/LicensesFormAdd.vue | 4 +- .../js/vue/components/ERM/LicensesShow.vue | 4 +- .../intranet-tmpl/prog/js/vue/locales/en.json | 54 ++++++++------ .../prog/js/vue/locales/fr-FR.json | 72 ++++++++++++++++--- misc/translate_json.pl | 5 +- 16 files changed, 117 insertions(+), 48 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementDocuments.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementDocuments.vue index ade2a7d71f..986b61f85b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementDocuments.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementDocuments.vue @@ -8,7 +8,7 @@ v-bind:key="counter" > - {{ $t("Document.counter", { counter: counter + 1 }) }} + {{ $t("Document .counter", { counter: counter + 1 }) }} {{ $t("Remove this document") }} \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementLicenses.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementLicenses.vue index c2ef71327f..813faf7b49 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementLicenses.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementLicenses.vue @@ -8,7 +8,7 @@ v-bind:key="counter" > - {{ $t("Agreement license.counter", { counter: counter + 1 }) }} + {{ $t("Agreement license .counter", { counter: counter + 1 }) }} {{ $t("Remove this license") }} - {{ $t("Agreement period.counter", { counter: counter + 1 }) }} + {{ $t("Agreement period .counter", { counter: counter + 1 }) }} {{ $t("Remove this period") }} - {{ $t("Related agreement.counter", { counter: counter + 1 }) }} + {{ $t("Related agreement .counter", { counter: counter + 1 }) }} {{ $t("Remove this relationship") }} - {{ $t("Agreement user.counter", { counter: counter + 1 }) }} + {{ $t("Agreement user .counter", { counter: counter + 1 }) }} {{ $t("Remove this user") }} diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue index 8d49dd26e1..33a3b1eb90 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue @@ -2,7 +2,7 @@
{{ $t("Loading") }}

- {{ $t("Agreement.id", { id: agreement.agreement_id }) }} + {{ $t("Agreement .id", { id: agreement.agreement_id }) }} - {{ $t("Agreement.counter", { counter: counter + 1 }) }} + {{ $t("Agreement .counter", { counter: counter + 1 }) }} {{ $t("Remove this agreement") }} \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue index 18776edb89..9223ed6912 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue @@ -2,7 +2,7 @@
{{ $t("Loading") }}

- {{ $t("Package.id", { id: erm_package.package_id }) }} + {{ $t("Package .id", { id: erm_package.package_id }) }} - {{ $t("Package.counter", { counter: counter + 1 }) }} + {{ $t("Package .counter", { counter: counter + 1 }) }} {{ $t("Remove from this package") }}{{ $t("Loading") }}

- {{ $t("Edit title.id", { id: title.title_id }) }} + {{ $t("Edit title .id", { id: title.title_id }) }}

{{ $t("New title") }}

diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue index 057d0711d3..afe8466462 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsTitlesShow.vue @@ -2,7 +2,7 @@
{{ $t("Loading") }}

- {{ $t("Title.id", { id: title.title_id }) }} + {{ $t("Title .id", { id: title.title_id }) }} {{ $t("Loading") }}

- {{ $t("Edit license.id", { id: license.license_id }) }} + {{ $t("Edit license .id", { id: license.license_id }) }}

{{ $t("New license") }}

@@ -223,4 +223,4 @@ export default { }, name: "LicensesFormAdd", } - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue index 9151f929b2..231ca2bea3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue @@ -2,7 +2,7 @@
{{ $t("Loading") }}

- {{ $t("License.id", { id: license.license_id }) }} + {{ $t("License .id", { id: license.license_id }) }} \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/locales/en.json b/koha-tmpl/intranet-tmpl/prog/js/vue/locales/en.json index b13a1fd19e..e8bafd286f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/locales/en.json +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/locales/en.json @@ -8,21 +8,22 @@ "Add new related agreement" : "Add new related agreement", "Add new user" : "Add new user", "Add to another package" : "Add to another package", - "Agreement" : { + "Agreement" : "Agreement", + "Agreement " : { "counter" : "Agreement %{counter}", "id" : "Agreement #%{id}" }, "Agreement created" : "Agreement created", "Agreement deleted" : "Agreement deleted", - "Agreement license" : { + "Agreement license " : { "counter" : "Agreement license %{counter}" }, "Agreement name" : "Agreement name", - "Agreement period" : { + "Agreement period " : { "counter" : "Agreement period %{counter}" }, "Agreement updated" : "Agreement updated", - "Agreement user" : { + "Agreement user " : { "counter" : "Agreement user %{counter}" }, "Agreements" : "Agreements", @@ -40,33 +41,28 @@ "Date the monograph is first published online" : "Date the monograph is first published online", "Delete" : "Delete", "Delete agreement" : "Delete agreement", - "Delete eHolding" : "Delete eHolding", "Delete license" : "Delete license", "Delete package" : "Delete package", + "Delete title" : "Delete title", "Description" : "Description", - "Document" : { + "Document " : { "counter" : "Document %{counter}" }, "Documents" : "Documents", "E-Resource management" : "E-Resource management", - "EHolding" : { - "id" : "EHolding #%{id}" - }, - "EHolding created" : "EHolding created", - "EHolding updated" : "EHolding updated", "Edit" : "Edit", "Edit agreement" : { "id" : "Edit agreement #%{id}" }, - "Edit eHolding" : { - "id" : "Edit eHolding #%{id}" - }, - "Edit license" : { + "Edit license " : { "id" : "Edit license #%{id}" }, "Edit package" : { "id" : "Edit package #%{id}" }, + "Edit title " : { + "id" : "Edit title #%{id}" + }, "Edition of the monograph" : "Edition of the monograph", "Embargo information" : "Embargo information", "End date" : "End date", @@ -80,6 +76,9 @@ "First editor" : "First editor", "Is perpetual" : "Is perpetual", "License" : "License", + "License " : { + "id" : "License #%{id}" + }, "License created" : "License created", "License deleted" : "License deleted", "License info" : "License info", @@ -89,9 +88,11 @@ "Loading" : "Loading", "Name" : "Name", "New agreement" : "New agreement", - "New eHolding" : "New eHolding", + "New eHolding title" : "New eHolding title", + "New eHoldings package" : "New eHoldings package", "New license" : "New license", "New package" : "New package", + "New title" : "New title", "No, do not delete" : "No, do not delete", "Notes" : "Notes", "Number of first issue available online" : "Number of first issue available online", @@ -101,6 +102,10 @@ "Number of volume for monograph" : "Number of volume for monograph", "Online-format identifier" : "Online-format identifier", "Package" : "Package", + "Package " : { + "counter" : "Package %{counter}", + "id" : "Package #%{id}" + }, "Package created" : "Package created", "Package deleted" : "Package deleted", "Package name" : "Package name", @@ -117,7 +122,8 @@ "Publication title" : "Publication title", "Publication type" : "Publication type", "Publisher name" : "Publisher name", - "Related agreement" : { + "Related agreement" : "Related agreement", + "Related agreement " : { "counter" : "Related agreement %{counter}" }, "Related agreements" : "Related agreements", @@ -134,22 +140,31 @@ "Role" : "Role", "Select a file" : "Select a file", "Select user" : "Select user", + "Show package" : "Show package", "Start date" : "Start date", "Started on" : "Started on", "Status" : "Status", "Submit" : "Submit", "There are no agreements created yet" : "There are no agreements created yet.", "There are no agreements defined" : "There are no agreements defined.", - "There are no eHoldings defined" : "There are no eHoldings defined.", "There are no licenses created yet" : "There are no licenses created yet.", "There are no licenses defined" : "There are no licenses defined.", "There are no other agreements created yet" : "There are no other agreements created yet.", "There are no packages created yet" : "There are no packages created yet.", "There are no packages defined" : "There are no packages defined.", + "There are no titles defined" : "There are no titles defined.", + "Title" : "Title", + "Title " : { + "id" : "Title #%{id}" + }, + "Title created" : "Title created", + "Title deleted" : "Title deleted", "Title identifier" : "Title identifier", "Title identifier of any preceding publication title" : "Title identifier of any preceding publication title", "Title identifier of the parent publication" : "Title identifier of the parent publication", + "Title updated" : "Title updated", "Title-level URL" : "Title-level URL", + "Titles" : "Titles", "Type" : "Type", "URI" : "URI", "Update file" : "Update file", @@ -158,9 +173,6 @@ "Users" : "Users", "Vendor" : "Vendor", "Yes, delete" : "Yes, delete", - "eHolding deleted" : "eHolding deleted", - "eHolding title" : "eHolding title", - "eHoldings" : "eHoldings", "hello" : "hello", "language" : "language", "tos" : "tos" diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/locales/fr-FR.json b/koha-tmpl/intranet-tmpl/prog/js/vue/locales/fr-FR.json index 609dc9b1ec..1057824397 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/locales/fr-FR.json +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/locales/fr-FR.json @@ -35,9 +35,7 @@ "Cancellation deadline": "", "Add new period": "", "Related agreements": "", - "Related agreement": { - "counter": "" - }, + "Related agreement": "", "Remove this relationship": "", "Relationship": "", "Add new related agreement": "", @@ -65,10 +63,7 @@ "No, do not delete": "", "Agreement deleted": "", "There are no agreements defined": "", - "Agreement": { - "id": "", - "counter": "" - }, + "Agreement": "", "Edit": "", "Delete": "", "Status": "", @@ -177,5 +172,66 @@ "tos": "", "language": "", "hello": "", - "/": "" + "/": "", + "New eHoldings package": "", + "Edit title": { + "id": "" + }, + "New title": "", + "Title updated": "", + "Title created": "", + "Delete title": "", + "Title": "", + "Title deleted": "", + "There are no titles defined": "", + "Show package": "", + "New eHolding title": "", + "Titles": "", + "Package_": { + "id": "" + }, + "Title_": { + "id": "" + }, + "License_": { + "id": "" + }, + "Agreement_": { + "id": "" + }, + "Document ": { + "counter": "" + }, + "Agreement license ": { + "counter": "" + }, + "Agreement period ": { + "counter": "" + }, + "Related agreement ": { + "counter": "" + }, + "Agreement ": { + "id": "", + "counter": "" + }, + "Agreement user ": { + "counter": "" + }, + "Package ": { + "counter": "", + "id": "" + }, + "Edit title ": { + "id": "" + }, + "Title ": { + "id": "" + }, + "Edit license ": { + "id": "" + }, + "License ": { + "id": "" + } } \ No newline at end of file diff --git a/misc/translate_json.pl b/misc/translate_json.pl index aa94869dd4..67ecb77924 100644 --- a/misc/translate_json.pl +++ b/misc/translate_json.pl @@ -9,10 +9,11 @@ my $translated = {}; while (my ($k, $v) = each %$h ){ if ( ref($v) ) { for my $kk ( keys %$v ) { + ( my $vv = $k ) =~ s|\s*$||; if ( $kk eq 'counter' ) { - $translated->{$k}->{counter} = "$k \%{counter}"; + $translated->{$k}->{counter} = "$vv \%{counter}"; } elsif ( $kk eq 'id' ) { - $translated->{$k}->{id} = "$k #\%{id}"; + $translated->{$k}->{id} = "$vv #\%{id}"; } else { die "INVALID structure with key " . $kk; } -- 2.39.5