It's not possible to add a new subscription using translated templates. What I see is: English template: var mana_enabled = [% IF (Koha.Preference('Mana') == 1 && mana_url) %]1[% ELSE %]0[% END %]; de-DE template: var mana_enabled = [% IF (Koha.Preference('Mana') == 1 && mana_url) %]1[% ELSE %][% END %]; We are also missing a semicolon in one of the lines, but this doesn't seem to effect the page functionality: var MSG_PATTERN_IRREG = _("Warning! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid") Thx to Michael Hoffert and Alexander Arlt from koha-de for reporting it initially and figuring out the root of the issue!
To give a bit more info, the Javascript we get from the wrong TT is: var mana_enabled = ; So this implodes. It should be: var mana_enabled = 0;
Created attachment 93385 [details] [review] Bug 23713: Subscription add form broken for translations This patch makes a change to the subscription entry template as a workaround to a translation bug which is causing JavaScript errors when using translated templates. To test, apply the patch and update and install the de-DE template: > cd misc/translator > perl translate update de-DE > perl translate install de-DE - Go to Administration -> System preferences and enable the "Deutsch (de-DE)" language under I18N/L10N preferences -> language. - Switch to the "Deutsch" translation. - Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription) and open the browser console. There should be no errors. - Links which trigger JavaScript events should work correctly: "Lieferant suchen," "Nach Datensatz suchen," etc.
Thx, Owen! Was going to tackle it this morning in a similar fashion!
Great test plan!
Created attachment 93399 [details] [review] Bug 23713: Subscription add form broken for translations This patch makes a change to the subscription entry template as a workaround to a translation bug which is causing JavaScript errors when using translated templates. To test, apply the patch and update and install the de-DE template: > cd misc/translator > perl translate update de-DE > perl translate install de-DE - Go to Administration -> System preferences and enable the "Deutsch (de-DE)" language under I18N/L10N preferences -> language. - Switch to the "Deutsch" translation. - Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription) and open the browser console. There should be no errors. - Links which trigger JavaScript events should work correctly: "Lieferant suchen," "Nach Datensatz suchen," etc.
Created attachment 93400 [details] [review] Bug 23713: (follow-up) Add missing semicolon Adds a missing semicolon to one of the lines with translated messages.
Created attachment 93536 [details] [review] Bug 23713: Subscription add form broken for translations This patch makes a change to the subscription entry template as a workaround to a translation bug which is causing JavaScript errors when using translated templates. To test, apply the patch and update and install the de-DE template: > cd misc/translator > perl translate update de-DE > perl translate install de-DE - Go to Administration -> System preferences and enable the "Deutsch (de-DE)" language under I18N/L10N preferences -> language. - Switch to the "Deutsch" translation. - Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription) and open the browser console. There should be no errors. - Links which trigger JavaScript events should work correctly: "Lieferant suchen," "Nach Datensatz suchen," etc. Reported-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Thanks-to: Michael Hoffert and Alexander Arlt from koha-de for reporting it initially and figuring out the root of the issue Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 93537 [details] [review] Bug 23713: (follow-up) Add missing semicolon Adds a missing semicolon to one of the lines with translated messages. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 93538 [details] [review] Bug 23713: Subscription add form broken for translations This patch makes a change to the subscription entry template as a workaround to a translation bug which is causing JavaScript errors when using translated templates. To test, apply the patch and update and install the de-DE template: > cd misc/translator > perl translate update de-DE > perl translate install de-DE - Go to Administration -> System preferences and enable the "Deutsch (de-DE)" language under I18N/L10N preferences -> language. - Switch to the "Deutsch" translation. - Go to Zeitschriften (Serials) -> Neues Abonnement (New subscription) and open the browser console. There should be no errors. - Links which trigger JavaScript events should work correctly: "Lieferant suchen," "Nach Datensatz suchen," etc. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 93539 [details] [review] Bug 23713: (follow-up) Add missing semicolon Adds a missing semicolon to one of the lines with translated messages. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nice work! Pushed to master for 19.11.00
Thx all!
*** Bug 23703 has been marked as a duplicate of this bug. ***
Hi all, this is a major bug confirmed in 18.11 - can this please be backported?
*** Bug 23973 has been marked as a duplicate of this bug. ***
(In reply to Katrin Fischer from comment #14) > Hi all, this is a major bug confirmed in 18.11 - can this please be > backported? +1 for backporting! :-)
*** Bug 24032 has been marked as a duplicate of this bug. ***
This is weird, and this patch is just cheating. Any ideas how we could avoid that? Upping severity, backport this one urgently!
(In reply to Katrin Fischer from comment #14) > Hi all, this is a major bug confirmed in 18.11 - can this please be > backported? That should read 19.05 - as 18.11 has no Mana, this only needs to go in 19.05
Pushed to 19.05.x for 19.05.05
Can this PLEASE be finally backported to 18.11 too? This bug means the serials module is unsable for everyone not speaking/using English.
(In reply to Katrin Fischer from comment #21) > Can this PLEASE be finally backported to 18.11 too? This bug means the > serials module is unsable for everyone not speaking/using English. I am sorry, but is caused by changes for Mana - but there is no Mana in 18.11.