The markup of authority-information.inc in the OPAC makes entries in the .po file which are cumbersome and could be improved. Better to not have to deal with multiple '%s'.
Created attachment 185159 [details] [review] Bug 40598: Improve translation of OPAC authorities include This patch improves the markup of the OPAC's authority-information.inc so that translatable strings are better isolated for the translation process. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation: > gulp po:update --lang fr-FR > perl misc/translator/translate update fr-FR - Open the corresponding .po file for the strings pulled from the include file, e.g. - misc/translator/po/fr-FR-messages.po - misc/translator/po/fr-FR/fr-FR-opac-bootstrap.po - Locate strings pulled from authority-information.inc for translation, e.g.: #: koha-tmpl/opac-tmpl/bootstrap/en/includes/authority-information.inc:94 msgctxt "A period starting from" msgid "From: " msgstr "" - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation: > perl mis/translator/translate install fr-FR - Now go to Administration -> System preferences in the staff interface and search for OPACAuthorIdentifiersAndInformation and make sure that "Identifiers (024$2$a)" is checked. - Edit a Personal Name authority record to have various personal details: - 024 $a [any value] $2 orcid - 370$a and $b, 372$a, 374$a - Edit a bibliographic record to link 100$a to that authority record. - Switch to your translated language in the OPAC. - In the OPAC, locate the bibliographic record you edited. - Check the detail page -> "Author information" tab - Check the authority detail page in OPAC, under "Author information" in the right-hand column. - Labels for the information you added should be correctly translated. Sponsored-by: Athens County Public Libraries
quick review: - <li> - <span> Place of death: [% info.place_of_death | html %] </span> - </li> + <li> <span>Place of death: </span>[% info.place_of_death | html %] </li> I think you should remove the extra spaces between the tags.
Created attachment 191308 [details] [review] Bug 40598: Improve translation of OPAC authorities include This patch improves the markup of the OPAC's authority-information.inc so that translatable strings are better isolated for the translation process. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation: > gulp po:update --lang fr-FR > perl misc/translator/translate update fr-FR - Open the corresponding .po file for the strings pulled from the include file, e.g. - misc/translator/po/fr-FR-messages.po - misc/translator/po/fr-FR/fr-FR-opac-bootstrap.po - Locate strings pulled from authority-information.inc for translation, e.g.: #: koha-tmpl/opac-tmpl/bootstrap/en/includes/authority-information.inc:94 msgctxt "A period starting from" msgid "From: " msgstr "" - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation: > perl mis/translator/translate install fr-FR - Now go to Administration -> System preferences in the staff interface and search for OPACAuthorIdentifiersAndInformation and make sure that "Identifiers (024$2$a)" is checked. - Edit a Personal Name authority record to have various personal details: - 024 $a [any value] $2 orcid - 370$a and $b, 372$a, 374$a - Edit a bibliographic record to link 100$a to that authority record. - Switch to your translated language in the OPAC. - In the OPAC, locate the bibliographic record you edited. - Check the detail page -> "Author information" tab - Check the authority detail page in OPAC, under "Author information" in the right-hand column. - Labels for the information you added should be correctly translated. Sponsored-by: Athens County Public Libraries Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 191309 [details] [review] Bug 40598: (follow-up) Remove spaces before and after li elements Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Jonathan Druart from comment #2) > quick review: > > - <li> > - <span> Place of death: [% info.place_of_death | html %] > </span> > - </li> > + <li> <span>Place of death: </span>[% info.place_of_death | html > %] </li> > > I think you should remove the extra spaces between the tags. Can you explain? Tidy doesn't seem to complain. I have provided a follow-up that removes the spaces, that can also be discarded if needed.
(In reply to Katrin Fischer from comment #5) > (In reply to Jonathan Druart from comment #2) > > quick review: > > > > - <li> > > - <span> Place of death: [% info.place_of_death | html %] > > </span> > > - </li> > > + <li> <span>Place of death: </span>[% info.place_of_death | html > > %] </li> > > > > I think you should remove the extra spaces between the tags. > > Can you explain? Tidy doesn't seem to complain. I have provided a follow-up > that removes the spaces, that can also be discarded if needed. It's bug 39084. They are not needed and we should remove them.
OK, good to go with the follow-up then. Feel free to squash.