Summary: | Change the IF ELSE values in MARC subfields structure breadcrumbs to facilitate translation | ||
---|---|---|---|
Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Component: | Templates | Assignee: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, fridolin.somers, lucas, victor |
Version: | Main | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement changes the strings in the IF ELSE for the framework name in the breadcrumbs on the marc_subfields_structure.pl page. There is no change to the page in English. However, it will facilitate the translation by having complete strings.
|
Version(s) released in: |
22.11.00
|
Circulation function: | |||
Bug Depends on: | 30733 | ||
Bug Blocks: | |||
Attachments: |
Bug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facilitate translation
Bug 31718: Others facilitate translation in frameworks administration Bug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facilitate translation Bug 31718: Others facilitate translation in frameworks administration Bug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facilitate translation Bug 31718: Others facilitate translation in frameworks administration |
Description
Caroline Cyr La Rose
2022-10-07 20:32:00 UTC
Something like [% IF ( frameworkcode ) %] [% frameworkcode | html %] <span>framework structure</span> [% ELSE %] <span>Default framework structure</span> [% END %] (In reply to Caroline Cyr La Rose from comment #1) > Something like > > [% IF ( frameworkcode ) %] > [% frameworkcode | html %] <span>framework structure</span> > [% ELSE %] > <span>Default framework structure</span> > [% END %] The span needs to be around the [% frameworkcode | html %] part so that we can move it around in the string. <span>[% frameworkcode | html %] framework structure</span> Created attachment 141526 [details] [review] Bug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facilitate translation This patch changes the strings in the IF ELSE for the framework name in the breadcrumbs on the marc_subfields_structure.pl page. To test: 1) Apply patch 2) In the intranet, go to Administration > MARC bibliographic framework 3) Click 'Actions' next to the default framework and choose 'MARC structure' 4) Click 'Actions' next to a MARC tag and choose 'View subfields' 5) Check the breadcrumbs, they should show Home > Administration > MARC frameworks > Default framework structure > ... 6) Redo steps 2-5, using a different framework, e.g. ACQ The breadcrumbs for ACQ should look like Home > Administration > MARC frameworks > ACQ framework structure > ... For Release Maintainers, this is needed as far back as 22.05. Before that it's not needed. For translators, the two strings will now be Default framework structure and %s framework structure In French, the translations will be Structure de la grille par défaut and Structure de la grille %s Created attachment 141536 [details] [review] Bug 31718: Others facilitate translation in frameworks administration Some other IF/ELSE/END can be changed to facilitate translation Test plan : Always test with default framework and with another framework and compare with and without patch 1) View subfields of field => Check the h1 in page 2) Perform actions on a field (create, modify, delete) => Check breadcrumbs and h1 in page 3) View the framework table => Check columns Repeatable, Mandatory, Important I signed first patch and added a new one for some other IF/ELSE/END that can facilitate translation. Like did Bug 30733 Created attachment 141556 [details] [review] Bug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facilitate translation This patch changes the strings in the IF ELSE for the framework name in the breadcrumbs on the marc_subfields_structure.pl page. To test: 1) Apply patch 2) In the intranet, go to Administration > MARC bibliographic framework 3) Click 'Actions' next to the default framework and choose 'MARC structure' 4) Click 'Actions' next to a MARC tag and choose 'View subfields' 5) Check the breadcrumbs, they should show Home > Administration > MARC frameworks > Default framework structure > ... 6) Redo steps 2-5, using a different framework, e.g. ACQ The breadcrumbs for ACQ should look like Home > Administration > MARC frameworks > ACQ framework structure > ... Signed-off-by: David Nind <david@davidnind.com> Created attachment 141557 [details] [review] Bug 31718: Others facilitate translation in frameworks administration Some other IF/ELSE/END can be changed to facilitate translation Test plan : Always test with default framework and with another framework and compare with and without patch 1) View subfields of field => Check the h1 in page 2) Perform actions on a field (create, modify, delete) => Check breadcrumbs and h1 in page 3) View the framework table => Check columns Repeatable, Mandatory, Important Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD) ------------------------- I checked the default framework and the BKS framework. First patch - breadcrumbs when viewing and editing subfields (changes to a single span tag for the framework name): - View the page source - Search for breadcrumbs - Before the patch is applied - default framework: <span>Default</span> <span>framework structure</span> - After the patch is applied - default framework: <span>Default framework structure</span> - Before the patch is applied - BKS framework: BKS <span>framework structure</span> - After the patch is applied - BKS framework: <span>BKS framework structure</span> Second patch - step 1 - view subfields: - View the page source - Search for <h1> - No change to output for h1 before and after the patch is applied: . Default framework: <h1>MARC subfield structure admin for 245 (default framework)</h1> . BKS framework: <h1>MARC subfield structure admin for 245 (framework BKS)</h1> . Updates code for template so that it is consistent with other changes (I think) - Breadcrumbs: changes as per the first patch Second patch - step 2 - add, edit and delete a MARC tag: - View the page source - Search for breadcrumbs - After patch is applied: <span> tags added to breadcrumbs where required Second patch - step 3: Framework table: - View the page source - Search for Repeatable - Check the first row of results: ==> should now have <span> tags around all the Nos and Yeses I also noticed that when deleting a tag from the view subfields page that there is an 'i' added to the breadcrumb, for example: - Home > Administration > MARC frameworks > BKS framework structure > Tag 245 Subfield structure > Confirm deletion of subfield ci - Should be ... Confirm deletion of subfield c I've created bug 31724 for this. Created attachment 141924 [details] [review] Bug 31718: Change the IF ELSE values in marc_subfields_structure breadcrumbs to facilitate translation This patch changes the strings in the IF ELSE for the framework name in the breadcrumbs on the marc_subfields_structure.pl page. To test: 1) Apply patch 2) In the intranet, go to Administration > MARC bibliographic framework 3) Click 'Actions' next to the default framework and choose 'MARC structure' 4) Click 'Actions' next to a MARC tag and choose 'View subfields' 5) Check the breadcrumbs, they should show Home > Administration > MARC frameworks > Default framework structure > ... 6) Redo steps 2-5, using a different framework, e.g. ACQ The breadcrumbs for ACQ should look like Home > Administration > MARC frameworks > ACQ framework structure > ... Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 141925 [details] [review] Bug 31718: Others facilitate translation in frameworks administration Some other IF/ELSE/END can be changed to facilitate translation Test plan : Always test with default framework and with another framework and compare with and without patch 1) View subfields of field => Check the h1 in page 2) Perform actions on a field (create, modify, delete) => Check breadcrumbs and h1 in page 3) View the framework table => Check columns Repeatable, Mandatory, Important Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Release maintainers, this is needed as far back as 22.05, but not before that. Thanks! Thanks for the fix Caroline! In 30733 I used the same trick in a few places where I noticed it would be an issue. I hope librarians aren't too unhappy with this missed case ^^ > Release maintainers, this is needed as far back as 22.05, but not before that. Good that you repeat, because RMaints are unlikely to read all the comment history. But don't worry, having bug 30733 in the "Depends on" field here takes care of ensuring that it's not backported too far. Also the way it will conflict when trying to backport would give a hint that it's missing a dependency. Pushed to master for 22.11. Nice work everyone, thanks! (In reply to Victor Grousset/tuxayo from comment #13) > > Release maintainers, this is needed as far back as 22.05, but not before that. > > Good that you repeat, because RMaints are unlikely to read all the comment > history. > But don't worry, having bug 30733 in the "Depends on" field here takes care > of ensuring that it's not backported too far. Also the way it will conflict > when trying to backport would give a hint that it's missing a dependency. I mainly wanted to let Lucas know that it was important to add it in 22.05 and not skip it :) After that, I figured it wouldn't apply... > After that, I figured it wouldn't apply...
It depends on the conflicts, if they are simple, Lucas will be able to solve them. Otherwise they will call for a backported patch here if someone needs it. You might then need to ask your dev colleagues to try to backport it and solve the conflict if you really need it.
|