Bug 35567 - Host-item in "Show analytics" link can be translated
Summary: Host-item in "Show analytics" link can be translated
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Kevin Carnes
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-14 09:46 UTC by Kevin Carnes
Modified: 2024-01-19 22:34 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02,23.05.08


Attachments
Bug 35567: Prevent translation of Host-item in "Show analytics" link (3.35 KB, patch)
2023-12-14 09:50 UTC, Kevin Carnes
Details | Diff | Splinter Review
Bug 35567: Prevent translation of Host-item in "Show analytics" link (3.41 KB, patch)
2023-12-15 20:38 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 35567: Prevent translation of Host-item in "Show analytics" link (3.46 KB, patch)
2024-01-10 18:34 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Carnes 2023-12-14 09:46:41 UTC
The "Show analytics" link is built using text which can be translated. 

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE
Comment 1 Kevin Carnes 2023-12-14 09:50:12 UTC
Created attachment 159819 [details] [review]
Bug 35567: Prevent translation of Host-item in "Show analytics" link

The "Show analytics" link is built using text which can be translated.

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE

To test:
 1. Install one of the affected languages:
    koha-translate --install sv-SE --dev kohadev
 2. Modify and save the following system preferences:
    language: enable the language
    OPACLanguages: enable the language
    opaclanguagesdisplay: Allow
    EasyAnalyticalRecords: Show
 3. View a record with holdings and copy the barcode of one the items
 4. Select the Edit dropdown menu above the record details and click
    "Link to host record"
 5. Paste the barcode, click Select, and click OK
 6. Return to Normal view of the record and reload the page
 7. There should now be a "Show analytics" link
 8. Hover over the link and note that the link contains "Host-item"
 9. Switch to one of the affected languages and note that "Host-item" is
    translated
10. View the record in the OPAC and confirm that the link is also translated
11. Apply the patch
12. Update the affected language:
    koha-translate --update sv-SE --dev kohadev
13. Restart Koha (restart_all)
14. Notice that the links are no longer translated
15. Sign off
Comment 2 Tomás Cohen Arazi 2023-12-15 20:38:35 UTC
Created attachment 159914 [details] [review]
Bug 35567: Prevent translation of Host-item in "Show analytics" link

The "Show analytics" link is built using text which can be translated.

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE

To test:
 1. Install one of the affected languages:
    koha-translate --install sv-SE --dev kohadev
 2. Modify and save the following system preferences:
    language: enable the language
    OPACLanguages: enable the language
    opaclanguagesdisplay: Allow
    EasyAnalyticalRecords: Show
 3. View a record with holdings and copy the barcode of one the items
 4. Select the Edit dropdown menu above the record details and click
    "Link to host record"
 5. Paste the barcode, click Select, and click OK
 6. Return to Normal view of the record and reload the page
 7. There should now be a "Show analytics" link
 8. Hover over the link and note that the link contains "Host-item"
 9. Switch to one of the affected languages and note that "Host-item" is
    translated
10. View the record in the OPAC and confirm that the link is also translated
11. Apply the patch
12. Update the affected language:
    koha-translate --update sv-SE --dev kohadev
13. Restart Koha (restart_all)
14. Notice that the links are no longer translated
15. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Victor Grousset/tuxayo 2024-01-10 18:34:24 UTC
Created attachment 160782 [details] [review]
Bug 35567: Prevent translation of Host-item in "Show analytics" link

The "Show analytics" link is built using text which can be translated.

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE

To test:
 1. Install one of the affected languages:
    koha-translate --install sv-SE --dev kohadev
 2. Modify and save the following system preferences:
    language: enable the language
    OPACLanguages: enable the language
    opaclanguagesdisplay: Allow
    EasyAnalyticalRecords: Show
 3. View a record with holdings and copy the barcode of one the items
 4. Select the Edit dropdown menu above the record details and click
    "Link to host record"
 5. Paste the barcode, click Select, and click OK
 6. Return to Normal view of the record and reload the page
 7. There should now be a "Show analytics" link
 8. Hover over the link and note that the link contains "Host-item"
 9. Switch to one of the affected languages and note that "Host-item" is
    translated
10. View the record in the OPAC and confirm that the link is also translated
11. Apply the patch
12. Update the affected language:
    koha-translate --update sv-SE --dev kohadev
13. Restart Koha (restart_all)
14. Notice that the links are no longer translated
15. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 4 Victor Grousset/tuxayo 2024-01-10 18:35:17 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 5 Katrin Fischer 2024-01-11 14:50:06 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-01-15 14:15:55 UTC
Pushed to 23.11.x for 23.11.02
Comment 7 Lucas Gass 2024-01-19 22:34:02 UTC
Backported to 23.05.x for upcoming 23.05.08