Bug 15208: Ease translation for shelves messages
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Wed, 18 Nov 2015 13:18:14 +0000 (10:18 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 19 Nov 2015 16:03:26 +0000 (13:03 -0300)
This string patch only puts <span>...</span>
around shelves messages. It split a monster
translation string into its components.
This kind of string to translate is error-prone.

Also fixed a typo on opac, 'deleteing'

To test:
1) Search for 'An error occurred when updating this list'
on your preferred language translation file for staff
or opac
(xx-YY-staff-prog.po or xx-YY-opac-bootstrap.po)
You will see a 'big' string to translate

2) Apply the patch

3) Update translation files for your language

4) Search again, big one is gone and there are
new individual strings to translate.

Sorry for not spotting this before string freeze

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt

index e710e58..fac9ede 100644 (file)
@@ -322,41 +322,41 @@ function placeHold () {
     <div class="dialog [% m.type %]">
         [% SWITCH m.code %]
         [% CASE 'error_on_update' %]
-            An error occurred when updating this list. Perhaps the value already exists.
+            <span>An error occurred when updating this list. Perhaps the value already exists.</span>
         [% CASE 'error_on_insert' %]
-            An error occurred when inserting this list. Perhaps the name already exists.
+            <span>An error occurred when inserting this list. Perhaps the name already exists.</span>
         [% CASE 'error_on_delete' %]
-            An error occurred when deleting this list. Check the logs.
+            <span>An error occurred when deleting this list. Check the logs.</span>
         [% CASE 'error_on_add_biblio' %]
-            The item has not been added to the list. Please check it's not in this list yet.
+           <span>The item has not been added to the list. Please check it's not in this list yet.</span>
         [% CASE 'success_on_update' %]
-            List updated with success.
+            <span>List updated with success.</span>
         [% CASE 'success_on_insert' %]
-            List inserted with success.
+            <span>List inserted with success.</span>
         [% CASE 'success_on_delete' %]
-            List deleted with success.
+            <span>List deleted with success.</span>
         [% CASE 'success_on_add_biblio' %]
-            The item has been added to the list.
+            <span>The item has been added to the list.</span>
         [% CASE 'success_on_remove_biblios' %]
-            The item has been removed from the list.
+            <span>The item has been removed from the list.</span>
         [% CASE 'does_not_exist' %]
-            This list does not exist.
+            <span>This list does not exist.</span>
         [% CASE 'item_does_not_exist' %]
-            This item does not exist.
+            <span>This item does not exist.</span>
         [% CASE 'unauthorized_on_view' %]
-            You do not have permission to view this list.
+            <span>You do not have permission to view this list.</span>
         [% CASE 'unauthorized_on_update' %]
-            You do not have permission to update this list.
+            <span>You do not have permission to update this list.</span>
         [% CASE 'unauthorized_on_delete' %]
-            You do not have permission to delete this list.
+           <span>You do not have permission to delete this list.</span>
         [% CASE 'unauthorized_on_add_biblio' %]
-            You do not have permission to add a biblio to this list.
+            <span>You do not have permission to add a biblio to this list.</span>
         [% CASE 'no_biblio_removed' %]
-            No biblio has been removed.
+            <span>No biblio has been removed.</span>
         [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
-            An error occurred when inserting this list. The name already [% shelfname %] exists.
+            <span>An error occurred when inserting this list. The name already [% shelfname %] exists.</span>
         [% CASE 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' %]
-            List could not be created. (Do not use the database administrator account.).
+            <span>List could not be created. (Do not use the database administrator account.)</span>
         [% CASE 'DBIx::Class::Exception' %]
             [% m.msg %]
         [% CASE %]
index 113c056..ae628fa 100644 (file)
                     [% END %]
                     [% SWITCH m.code %]
                     [% CASE 'error_on_update' %]
-                        An error occurred when updating this list. Perhaps the value already exists.
+                        <span>An error occurred when updating this list. Perhaps the value already exists.</span>
                     [% CASE 'error_on_insert' %]
-                        An error occurred when inserting this list. Perhaps the name already exists.
+                        <span>An error occurred when inserting this list. Perhaps the name already exists.</span>
                     [% CASE 'error_on_delete' %]
-                        An error occurred when deleteing this list. Check the logs.
+                        <span>An error occurred when deleting this list. Check the logs.</span>
                     [% CASE 'error_on_add_biblio' %]
-                        The item has not been added to the list. Please check it's not in this list yet.
+                        <span>The item has not been added to the list. Please check it's not in this list yet.</span>
                     [% CASE 'error_on_remove_share' %]
-                        The share has not been removed.
+                        <span>The share has not been removed.</span>
                     [% CASE 'success_on_update' %]
-                        List updated with success.
+                        <span>List updated with success.</span>
                     [% CASE 'success_on_insert' %]
-                        List inserted with success.
+                        <span>List inserted with success.</span>
                     [% CASE 'success_on_delete' %]
-                        List deleted with success.
+                        <span>List deleted with success.</span>
                     [% CASE 'success_on_add_biblio' %]
-                        The item has been added to the list.
+                        <span>The item has been added to the list.</span>
                     [% CASE 'success_on_remove_biblios' %]
-                        The item has been removed from the list.
+                        <span>The item has been removed from the list.</span>
                     [% CASE 'success_on_remove_share' %]
-                        The share has been removed.
+                        <span>The share has been removed.</span>
                     [% CASE 'does_not_exist' %]
-                        This list does not exist.
+                        <span>This list does not exist.</span>
                     [% CASE 'item_does_not_exist' %]
-                        This item does not exist.
+                        <span>This item does not exist.</span>
                     [% CASE 'unauthorized_on_view' %]
-                        You do not have permission to view this list.
+                        <span>You do not have permission to view this list.</span>
                     [% CASE 'unauthorized_on_insert' %]
-                        You do not have permission to insert a new list.
+                        <span>You do not have permission to insert a new list.</span>
                     [% CASE 'unauthorized_on_update' %]
-                        You do not have permission to update this list.
+                        <span>You do not have permission to update this list.</span>
                     [% CASE 'unauthorized_on_delete' %]
-                        You do not have permission to delete this list.
+                        <span>You do not have permission to delete this list.</span>
                     [% CASE 'unauthorized_on_add_biblio' %]
-                        You do not have permission to add a biblio to this list.
+                        <span>You do not have permission to add a biblio to this list.</span>
                     [% CASE 'no_biblio_removed' %]
-                        No biblio has been removed.
+                        <span>No biblio has been removed.</span>
                     [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
-                        An error occurred when inserting this list. The name already [% shelfname %] exists.
+                        <span>An error occurred when inserting this list. The name already [% shelfname %] exists.</span>
                     [% CASE 'DBIx::Class::Exception' %]
                         [% m.msg %]
                     [% CASE %]