Bugzilla – Attachment 82401 Details for
Bug 21736
Localization widget messages are not translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21736: Allow translating the localization widget messages
Bug-21736-Allow-translating-the-localization-widge.patch (text/plain), 4.08 KB, created by
Owen Leonard
on 2018-11-16 13:32:04 UTC
(
hide
)
Description:
Bug 21736: Allow translating the localization widget messages
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-11-16 13:32:04 UTC
Size:
4.08 KB
patch
obsolete
>From 27ca44f9a56880fac5826ed47c56fa7edd239088 Mon Sep 17 00:00:00 2001 >From: Pasi Kallinen <pasi.kallinen@joensuu.fi> >Date: Wed, 31 Oct 2018 14:04:33 +0200 >Subject: [PATCH] Bug 21736: Allow translating the localization widget messages > >The widget used to translate the item type names to other >languages has few javascript messages that cannot be translated. >Add the mechanism to enable their translation. > >Test plan: > >1) Install and update a language >2) Check the po-files, there's no msgid for > "A translation already exists for this language." >3) Apply the patch >4) Install and update a language >5) There should be a msgid for the one in 2, and > couple other messages from localization.tt >6) Translate those messages, update the translated templates >7) Go to Administration -> Item types -> Modify item type -> > Translate into other languages > Add a new translation, check that the message given by the widget > was in correct language. > >Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >https://bugs.koha-community.org/show_bug.cgi?id=21823 >--- > .../intranet-tmpl/prog/en/modules/admin/localization.tt | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt >index 1eb74f9..b60756d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/localization.tt >@@ -64,29 +64,29 @@ > var message; > if ( type == 'success_on_update' ) { > message = $('<div class="dialog message"></div>'); >- message.text("Entity %s (code %s) for lang %s has correctly been updated with '%s'".format(data.entity, data.code, data.lang, data.translation)); >+ message.text(_("Entity %s (code %s) for lang %s has correctly been updated with '%s'").format(data.entity, data.code, data.lang, data.translation)); > } else if ( type == 'error_on_update' ) { > message = $('<div class="dialog alert"></div>'); > if ( data.error_code == 'already_exists' ) { >- message.text("A translation already exists for this language."); >+ message.text(_("A translation already exists for this language.")); > } else { >- message.text("An error occurred when updating this translation."); >+ message.text(_("An error occurred when updating this translation.")); > } > } else if ( type == 'success_on_delete' ) { > message = $('<div class="dialog message"></div>'); >- message.text("The translation (id %s) has been removed successfully".format(data.id)); >+ message.text(_("The translation (id %s) has been removed successfully").format(data.id)); > } else if ( type == 'error_on_delete' ) { > message = $('<div class="dialog alert"></div>'); >- message.text("An error occurred when deleting this translation"); >+ message.text(_("An error occurred when deleting this translation")); > } else if ( type == 'success_on_insert' ) { > message = $('<div class="dialog message"></div>'); >- message.text("Translation (id %s) has been added successfully".format(data.id)); >+ message.text(_("Translation (id %s) has been added successfully").format(data.id)); > } else if ( type == 'error_on_insert' ) { > message = $('<div class="dialog alert"></div>'); > if ( data.error_code == 'already_exists' ) { >- message.text("A translation already exists for this language."); >+ message.text(_("A translation already exists for this language.")); > } else { >- message.text("An error occurred when adding this translation"); >+ message.text(_("An error occurred when adding this translation")); > } > } > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21736
:
81709
|
82401
|
82728