Bug 17827 - Untranslatable "by" in MARC21slim2intranetResults.xsl
Summary: Untranslatable "by" in MARC21slim2intranetResults.xsl
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Serhij Dubyk
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-29 14:39 UTC by Serhij Dubyk
Modified: 2017-09-15 23:19 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
patch (67 bytes, patch)
2016-12-29 14:39 UTC, Serhij Dubyk
Details | Diff | Splinter Review
New version of patch (git format-patch) (1.45 KB, patch)
2017-01-26 12:39 UTC, Serhij Dubyk
Details | Diff | Splinter Review
new patch (1.45 KB, patch)
2017-08-22 14:31 UTC, Serhij Dubyk
Details | Diff | Splinter Review
Bug 17827 - Untranslatable "by" in MARC21slim2intranetResults.xsl (2.24 KB, patch)
2017-08-27 10:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17827 - Untranslatable "by" in MARC21slim2intranetResults.xsl (2.33 KB, patch)
2017-09-01 06:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Serhij Dubyk 2016-12-29 14:39:33 UTC
Created attachment 58490 [details] [review]
patch

Not translated "by" before the authors in the search results window in staff interface (MARC21).

In attachment  patch for MARC21slim2intranetResults.xsl
Comment 1 Katrin Fischer 2017-01-07 23:14:22 UTC
Hi Serhij, can you please try to make a valid git patch file?
You can use the git format-patch command or tCan you detail the problem a bit more? I am not sure why the mapping should be a problem.he git bz tool described in our wiki.
Maybe the by should still be wrapped in a class? That way we could hide the whole line still without the by remaining.
Comment 2 Serhij Dubyk 2017-01-26 12:39:11 UTC
Created attachment 59578 [details] [review]
New version of patch (git format-patch)
Comment 3 Serhij Dubyk 2017-01-26 12:56:23 UTC
Before this patch in file en-GB-marc-MARC21.po present next paragraph:
  
#: /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl:457
#, fuzzy, c-format
msgid "by "
msgstr " by "

According string "by " in the file MARC21slim2intranetResults.xsl can not be translated (in other languages).

After applying this patch performed the following command:
cd /usr/share/koha/misc/translator
sudo env KOHA_CONF=/etc/koha/sites/mykohainstance/koha-conf.xml PERL5LIB=/usr/share/koha/lib perl -I /usr/share/koha/lib "./translate" update

Now in the file en-GB-marc-MARC21.po present the following (modified) paragraph:

#: /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl:348
#: /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl:457
#, fuzzy, c-format
msgid "by "
msgstr " by "

And the string " by " becomes available for translation in
uk-UA/xslt/MARC21slim2intranetResults.xsl (and other language versions)

This can be checked the command
sudo koha-translate --update uk-UA

In the file uk-UA/xslt/MARC21slim2intranetResults.xsl string 'by <p class = "author">' is now translated.
Comment 4 Serhij Dubyk 2017-01-26 13:18:14 UTC
(In reply to Katrin Fischer from comment #1)
> Hi Serhij, can you please try to make a valid git patch file?
> You can use the git format-patch command or tCan you detail the problem a
> bit more? I am not sure why the mapping should be a problem.he git bz tool
> described in our wiki.
> Maybe the by should still be wrapped in a class? That way we could hide the
> whole line still without the by remaining.

'by' not wrapped in class also in MARC21slim2OPACResults.xsl
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl;h=7349b816a61a7a4e712e2531d4d5b36ccb3b1b75;hb=refs/heads/master#l459
Comment 5 Katrin Fischer 2017-08-18 10:49:22 UTC
Hi Serhij, the patch looks good now, but I have one concern: The class=author was added to make it possible for libraries to hide the information if they want to. That's why the 'by' was inside. Can we find a way that fixes both needs?
Comment 6 Serhij Dubyk 2017-08-22 14:31:50 UTC
Created attachment 66345 [details] [review]
new patch

Perhaps the comment "!-- #13383 --" after the text term removed this term from translation...

Test:

Before this patch in file en-GB-marc-MARC21.po present next paragraph:
  
#: /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl:457
#, fuzzy, c-format
msgid "by "
msgstr " by "

According string "by " in the file MARC21slim2intranetResults.xsl can not be translated (in other languages).

After applying this patch performed next command:
cd /usr/share/koha/misc/translator
sudo env KOHA_CONF=/etc/koha/sites/mykohainstance/koha-conf.xml PERL5LIB=/usr/share/koha/lib perl -I /usr/share/koha/lib "./translate" update

Now in the file en-GB-marc-MARC21.po present the following (modified) paragraph:

#: /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl:349
#: /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl:457
#, fuzzy, c-format
msgid "by "
msgstr " by "
Comment 7 Katrin Fischer 2017-08-27 10:45:16 UTC
Hi Serhij, thx for investigating! 

I have signed off on your patch with some little changes:
- The subject should always start with "Bug xxxx" as this helps our tools to recognize what the patch is for and is used to link all the things together.
- The patch commit message should contain a short description of the problem and the test plan (just copied your test plan in)
Comment 8 Katrin Fischer 2017-08-27 10:45:54 UTC
Created attachment 66510 [details] [review]
Bug 17827 - Untranslatable "by" in MARC21slim2intranetResults.xsl

Signed-off-by: Serhij Dubyk {Сергій Дубик} <serhijdubyk@gmail.com>

The "by" after the title was not translatable in the result
lists of the intranet. This patch fixes it by removing
a comment, that caused a problem with the translation
scripts.

To test:
Test:

Before this patch in file en-GB-marc-MARC21.po present next paragraph:

msgid "by "
msgstr " by "

According string "by " in the file MARC21slim2intranetResults.xsl can not be translated (in other languages).

After applying this patch performed next command:
cd /usr/share/koha/misc/translator
sudo env KOHA_CONF=/etc/koha/sites/mykohainstance/koha-conf.xml PERL5LIB=/usr/share/koha/lib perl -I /usr/share/koha/lib "./translate" update

Now in the file en-GB-marc-MARC21.po present the following (modified) paragraph:

msgid "by "
msgstr " by "

https://bugs.koha-community.org/show_bug.cgi?id=17827
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Marcel de Rooy 2017-09-01 06:47:23 UTC
Created attachment 66687 [details] [review]
Bug 17827 - Untranslatable "by" in MARC21slim2intranetResults.xsl

Signed-off-by: Serhij Dubyk {Сергій Дубик} <serhijdubyk@gmail.com>

The "by" after the title was not translatable in the result
lists of the intranet. This patch fixes it by removing
a comment, that caused a problem with the translation
scripts.

To test:
Test:

Before this patch in file en-GB-marc-MARC21.po present next paragraph:

msgid "by "
msgstr " by "

According string "by " in the file MARC21slim2intranetResults.xsl can not be translated (in other languages).

After applying this patch performed next command:
cd /usr/share/koha/misc/translator
sudo env KOHA_CONF=/etc/koha/sites/mykohainstance/koha-conf.xml PERL5LIB=/usr/share/koha/lib perl -I /usr/share/koha/lib "./translate" update

Now in the file en-GB-marc-MARC21.po present the following (modified) paragraph:

msgid "by "
msgstr " by "

https://bugs.koha-community.org/show_bug.cgi?id=17827
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Jonathan Druart 2017-09-01 16:05:06 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 11 Fridolin SOMERS 2017-09-12 13:17:03 UTC
Pushed to 17.05.x, will be in 17.05.04.
Comment 12 Katrin Fischer 2017-09-15 23:19:46 UTC
This patch has been pushed to 16.11.x and will be in 16.11.12.