Bugzilla – Attachment 139803 Details for
Bug 24172
Locale is ignored when saving season name in the database
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24172: Allow translation of seasons in serials-edit.tt and subscription-detail.tt
Bug-24172-Allow-translation-of-seasons-in-serials-.patch (text/plain), 7.01 KB, created by
Blou
on 2022-08-25 19:51:11 UTC
(
hide
)
Description:
Bug 24172: Allow translation of seasons in serials-edit.tt and subscription-detail.tt
Filename:
MIME Type:
Creator:
Blou
Created:
2022-08-25 19:51:11 UTC
Size:
7.01 KB
patch
obsolete
>From bf5354ef76a5c288dd243b6485701c11bffa6e9f Mon Sep 17 00:00:00 2001 >From: Blou <blou@inlibro.com> >Date: Wed, 4 Dec 2019 11:49:01 -0500 >Subject: [PATCH] Bug 24172: Allow translation of seasons in serials-edit.tt > and subscription-detail.tt > >Seasons are not handled by locales. Those generated are stored in >English in the database, and the display in serials-collection.tt is >translating them. But once you click on "Edit serials" or if you go >straight to the subscription's display, those are displayed as in the >database: in English. > >This patch reproduces the same trick as in serial-collection.tt and >allow for the display to be translated. > >NOTE: this patch's testing require knowledge of translation tools. > >Reproducing Caroline's test: >0- Make sure you have at least one language other than English installed >1- With staff interface in English, create a subscription with a seasonal numbering pattern and frequency, with locale in your other language >2- Check the prediction pattern, note that the season names are in English not the locale language >3- Change the staff interface to other language, redo the prediction pattern test with locale in other language, note that the season names are in other language >4- Save the subscription >5- Receive an issue, note that the season name in the "Numbered" column on serials-edit.pl is in English >6- Save your issue >7- Switch interface in other language >8- Note that the season name on serials-collection is in other language >9- If you check the database, you will see the season name is in English, even though the subscription.locale is something else >10- validate the different pages: >- serials-collection.pl: display is translated >- serials-edit.pl: name pulled directly from db >- subscription-detail.pl: name pulled directly from db >- detail.pl: name pulled directly from db >- opac-detail.pl: name pulled directly from db >11- APPLY THE PATCH >12- translate the string > a) ./translate update <some locale> > b) find the strings, translate them > c) ./translate install <same locale> >13- restart Plack ? >14- validate the pages again. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/serials/serials-edit.tt | 4 +++- > .../en/modules/serials/subscription-detail.tt | 20 ++++++++++++++++++- > 2 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index d1b93145f4..ca36114302 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -139,7 +139,9 @@ $(document).ready(function() { > <input type="hidden" name="biblionumber" value="[% serialslis.biblionumber | html %]" /> > <input type="hidden" name="itemcount" value="[% serialslis.issuesatonce | html %]" /> > <input type="hidden" name="user" value="[% serialslis.librarian | html %]" /> >- Issue <input type="text" name="serialseq" id="serialseq[% serialslis.serialid | html %]" value="[% serialslis.serialseq | html %]" size="20" maxlength="100" /> >+ Issue <input type="text" name="serialseq" id="serialseq[% serialslis.serialid | html %]" >+ value="[% IF ( matches = serialslis.serialseq.match('(.*)Spring(.*)') ) %][% matches.0 | html %]Spring[% matches.1 | html %][% ELSIF ( matches = serialslis.serialseq.match('(.*)Summer(.*)') ) %][% matches.0 | html %]Summer[% matches.1 | html %][% ELSIF ( matches = serialslis.serialseq.match('(.*)Fall(.*)') ) %][% matches.0 | html %]Fall[% matches.1 | html %][% ELSIF ( matches = serialslis.serialseq.match('(.*)Winter(.*)') ) %][% matches.0 | html %]Winter[% matches.1 | html %][% ELSIF ( matches = serialslis.serialseq.match('(.*)Spr(.*)') ) %][% matches.0 | html %]Spr[% matches.1 | html %][% ELSIF ( matches = serialslis.serialseq.match('(.*)Sum(.*)') ) %][% matches.0 | html %]Sum[% matches.1 | html %][% ELSIF ( matches = serialslis.serialseq.match('(.*)Fal(.*)') ) %][% matches.0 | html %]Fal[% matches.1 | html %][% ELSIF ( matches = serialslis.serialseq.match('(.*)Win(.*)') ) %][% matches.0 | html %]Win[% matches.1 | html %][% ELSE %][% serialslis.serialseq | html %][% END %]" >+ size="20" maxlength="100" /> > </td> > <td> > <input type="text" name="publisheddate" value="[% serialslis.publisheddate | html %]" size="10" maxlength="15" class="flatpickr" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index ee7d25a256..30b2de7e71 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -336,7 +336,25 @@ > [% FOREACH serialslis IN serialslist %] > <tr> > <td> >- [% serialslis.serialseq | html %] >+ [% IF ( matches = serialslis.serialseq.match('(.*)Spring(.*)') ) %] >+ [% matches.0 | html %]Spring[% matches.1 | html %] >+ [% ELSIF ( matches = serialslis.serialseq.match('(.*)Summer(.*)') ) %] >+ [% matches.0 | html %]Summer[% matches.1 | html %] >+ [% ELSIF ( matches = serialslis.serialseq.match('(.*)Fall(.*)') ) %] >+ [% matches.0 | html %]Fall[% matches.1 | html %] >+ [% ELSIF ( matches = serialslis.serialseq.match('(.*)Winter(.*)') ) %] >+ [% matches.0 | html %]Winter[% matches.1 | html %] >+ [% ELSIF ( matches = serialslis.serialseq.match('(.*)Spr(.*)') ) %] >+ [% matches.0 | html %]Spr[% matches.1 | html %] >+ [% ELSIF ( matches = serialslis.serialseq.match('(.*)Sum(.*)') ) %] >+ [% matches.0 | html %]Sum[% matches.1 | html %] >+ [% ELSIF ( matches = serialslis.serialseq.match('(.*)Fal(.*)') ) %] >+ [% matches.0 | html %]Fal[% matches.1 | html %] >+ [% ELSIF ( matches = serialslis.serialseq.match('(.*)Win(.*)') ) %] >+ [% matches.0 | html %]Win[% matches.1 | html %] >+ [% ELSE %] >+ [% serialslis.serialseq | html %] >+ [% END %] > </td> > <td> > [% IF serialslis.planneddate %] >-- >2.25.1
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 24172
:
95996
|
95998
|
96051
|
100331
|
100332
|
100888
|
139803
|
139804
|
139805
|
139806
|
139807
|
139808
|
139809
|
148921
|
151330
|
158671
|
170319
|
171104
|
172223
|
172230
|
174095