The strings in nl-search.tt are picked up for translation, but a lot of those are in Norwegian. The file should either be all in English, or excluded from translation.
Sorry about that! I guess we are talking about strings like "hjemmebibliotek", "opprettet" and "opprettet_av" from lines like these: [% IF ( p.hjemmebibliotek ) %]<li><span class="label">hjemmebibliotek: </span>[% p.hjemmebibliotek | html_entity %]</li>[% END %] [% IF ( p.opprettet ) %]<li><span class="label">opprettet: </span>[% p.opprettet | html_entity %]</li>[% END %] [% IF ( p.opprettet_av ) %]<li><span class="label">opprettet_av: </span>[% p.opprettet_av | html_entity %]</li>[% END %] The trouble is, those Norwegian strings just echo the field names that we get from the Natonal patron database API. (The XML elements have Norwegian names.) So on the one hand translating those field names does not make a lot of sense, but on the other hand we need to be able to translate the page as such, especially when the day comes that someone revives the "nynorsk" translation. So... The ideal would be to be able to exclude just those strings from tranlsation. Since that is not possible, I guess I better translate them into English and make sure I translate them the right way back again.
Created attachment 45512 [details] [review] Bug 15304 - Remove Norwegian strings from nl-search.tt When nl-search.pl gets data from the Norwegian national patron database, it does so in an XML format that has Norwegian element names. nl-search.pl displays the data with the Noregian element names as labels. This means Norwegian words turn up in translations, which is messy. This patch replaces the Norwegian labels with English ones. To test: - Only Norwegian libraries and vendors get access to search against the national patron database, so a proper functional test is not possible - Alternative 1: Just have a look at the nl-search.tt template before and after the patch and verify that after the patch the Norwegian strings that would be visible to a user are gone - Alternative 2: - Verify that e.g. en-GB-staff-prog.po contains the Norwegian string "kjonn" - Apply the patch - Create new .po files with e.g. "./translate create en-GB" - Verify that "kjonn" is now gone from en-GB-staff-prog.po
Created attachment 45514 [details] [review] [SIGNED-OFF]Bug 15304: Remove Norwegian strings from nl-search.tt When nl-search.pl gets data from the Norwegian national patron database, it does so in an XML format that has Norwegian element names. nl-search.pl displays the data with the Noregian element names as labels. This means Norwegian words turn up in translations, which is messy. This patch replaces the Norwegian labels with English ones. To test: - Only Norwegian libraries and vendors get access to search against the national patron database, so a proper functional test is not possible - Alternative 1: Just have a look at the nl-search.tt template before and after the patch and verify that after the patch the Norwegian strings that would be visible to a user are gone - Alternative 2: - Verify that e.g. en-GB-staff-prog.po contains the Norwegian string "kjonn" - Apply the patch - Create new .po files with e.g. "./translate create en-GB" - Verify that "kjonn" is now gone from en-GB-staff-prog.po Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> nl-search.tt translated to English
paxed, do you agree with this patch?
If I eyeballed the patch correctly, all the changed lines are in the format: [% IF ( p.FOO ) %]<li><span class="label">FOO: </span>[% p.FOO | html_entity %]</li>[% END %] So, guessing it could be accomplished with something like this: [%BLOCK output_nlsearch_line %] [% IF ( p.$nlvar ) %]<li><span class="label">[% nlvar %]: </span>[% p.$nlvar | html_entity %]</li>[% END %] [% END %] and then called like [% PROCESS output_nhsearch_line nlvar="hjemmebibliotek" %] [% PROCESS output_nhsearch_line nlvar="opprettet" %] etc. That would prevent the texts from showing for translation up in the first place, and does look a bit cleaner to my eyes. But I haven't tested that, so perhaps it's not possible with Template Toolkit.
Magnus suggested to add the string to the po and you suggest to remove them, it's not the same approach :)
In Norway, we have to versions of Norwegian: bokmål and nynorsk. Currently, only a bokmål translation of Koha is maintained, but hopefully the nynorsk translation will be revived in the not too distant future. I think the approach that makes the most sense is the one I have taken: To translate the humanly visible labels into English, so that they can be translated back into both bokmål and nynorsk. Hiding the labels from translation will mean they are stuck in bokmål, and the nynorsk users will be unhappy some time in the future.
(In reply to Magnus Enger from comment #7) > In Norway, we have to versions of Norwegian: bokmål and nynorsk. Currently, > only a bokmål translation of Koha is maintained, but hopefully the nynorsk > translation will be revived in the not too distant future. That's make a lot of sense and I agree with your patch. But could you please rewrite it to avoid as much as possible new strings in the po files? for instance "Birthdate:" should be "date of birth", so that it will be automatically translated for other languages and translators won't have to translate (unnecessarily) new strings.
(In reply to Jonathan Druart from comment #8) > But could you please rewrite it to avoid as much as possible new strings in > the po files? for instance "Birthdate:" should be "date of birth", so that > it will be automatically translated for other languages and translators > won't have to translate (unnecessarily) new strings. Will do!
Created attachment 45608 [details] [review] Bug 15304 - Remove Norwegian strings from nl-search.tt When nl-search.pl gets data from the Norwegian national patron database, it does so in an XML format that has Norwegian element names. nl-search.pl displays the data with the Noregian element names as labels. This means Norwegian words turn up in translations, which is messy. This patch replaces the Norwegian labels with English ones. To test: - Only Norwegian libraries and vendors get access to search against the national patron database, so a proper functional test is not possible - Alternative 1: Just have a look at the nl-search.tt template before and after the patch and verify that after the patch the Norwegian strings that would be visible to a user are gone - Alternative 2: - Verify that e.g. en-GB-staff-prog.po contains the Norwegian string "kjonn" - Apply the patch - Create new .po files with e.g. "./translate create en-GB" - Verify that "kjonn" is now gone from en-GB-staff-prog.po Version 2: Tweak a couple of labels to be more in line with labels used elsewhere in Koha, to avoid variants when translating.
Hi Magnus, can I make a sugestion? Many of the new strings are already in other parts of the code, so translation will not be an issue, but some of them differs but just a space for example, if you change <span class="label">Address: </span>[% p.m_adresse1 | html_entity %] with <span class="label">Address:</span> [% p.m_adresse1 | html_entity %] i.e., space after </span>, we will have more matches. If not we get many new (but similar) strings like this example #. SCRIPT #: intranet-tmpl/prog/en/includes/cateditor-ui.inc:24 msgid "Last changed:" msgstr "Última actualización:" +#: intranet-tmpl/prog/en/modules/members/nl-search.tt:118 +#, fuzzy, c-format +msgid "Last changed: " +msgstr "Última actualización:" +
Bernardo: Cool, I'll do a followup as soon as I can!
Created attachment 45905 [details] [review] Bug 15304 - Remove Norwegian strings from nl-search.tt When nl-search.pl gets data from the Norwegian national patron database, it does so in an XML format that has Norwegian element names. nl-search.pl displays the data with the Noregian element names as labels. This means Norwegian words turn up in translations, which is messy. This patch replaces the Norwegian labels with English ones. To test: - Only Norwegian libraries and vendors get access to search against the national patron database, so a proper functional test is not possible - Alternative 1: Just have a look at the nl-search.tt template before and after the patch and verify that after the patch the Norwegian strings that would be visible to a user are gone - Alternative 2: - Verify that e.g. en-GB-staff-prog.po contains the Norwegian string "kjonn" - Apply the patch - Create new .po files with e.g. "./translate create en-GB" - Verify that "kjonn" is now gone from en-GB-staff-prog.po Version 2: Tweak a couple of labels to be more in line with labels used elsewhere in Koha, to avoid variants when translating. Version 3: Replace e.g. "Gender: </span>" with "Gender:</span> " to avoid similar-except-for-whitespace strings in translation.
Created attachment 45945 [details] [review] [SIGNED-OFF] Bug 15304: Remove Norwegian strings from nl-search.tt When nl-search.pl gets data from the Norwegian national patron database, it does so in an XML format that has Norwegian element names. nl-search.pl displays the data with the Noregian element names as labels. This means Norwegian words turn up in translations, which is messy. This patch replaces the Norwegian labels with English ones. To test: - Only Norwegian libraries and vendors get access to search against the national patron database, so a proper functional test is not possible - Alternative 1: Just have a look at the nl-search.tt template before and after the patch and verify that after the patch the Norwegian strings that would be visible to a user are gone - Alternative 2: - Verify that e.g. en-GB-staff-prog.po contains the Norwegian string "kjonn" - Apply the patch - Create new .po files with e.g. "./translate create en-GB" - Verify that "kjonn" is now gone from en-GB-staff-prog.po Version 2: Tweak a couple of labels to be more in line with labels used elsewhere in Koha, to avoid variants when translating. Version 3: Replace e.g. "Gender: </span>" with "Gender:</span> " to avoid similar-except-for-whitespace strings in translation. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> A few new strings, all previous removed. No koha-qa errors
Created attachment 45978 [details] [review] Bug 15304: Remove Norwegian strings from nl-search.tt When nl-search.pl gets data from the Norwegian national patron database, it does so in an XML format that has Norwegian element names. nl-search.pl displays the data with the Noregian element names as labels. This means Norwegian words turn up in translations, which is messy. This patch replaces the Norwegian labels with English ones. To test: - Only Norwegian libraries and vendors get access to search against the national patron database, so a proper functional test is not possible - Alternative 1: Just have a look at the nl-search.tt template before and after the patch and verify that after the patch the Norwegian strings that would be visible to a user are gone - Alternative 2: - Verify that e.g. en-GB-staff-prog.po contains the Norwegian string "kjonn" - Apply the patch - Create new .po files with e.g. "./translate create en-GB" - Verify that "kjonn" is now gone from en-GB-staff-prog.po Version 2: Tweak a couple of labels to be more in line with labels used elsewhere in Koha, to avoid variants when translating. Version 3: Replace e.g. "Gender: </span>" with "Gender:</span> " to avoid similar-except-for-whitespace strings in translation. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> A few new strings, all previous removed. No koha-qa errors Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master - Knuckles
Patch pushed to 3.22.x, will be in 3.22.2
This patch has been pushed to 3.20.x, will be in 3.20.8.