Bug 39032 - "Items selected" in item search untranslatable
Summary: "Items selected" in item search untranslatable
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Caroline Cyr La Rose
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 34227
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-04 20:13 UTC by Caroline Cyr La Rose
Modified: 2025-02-17 14:07 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes a syntax error that prevented the string "Items selected" for the item search from being picked up by the translation tool (the text is shown when items in the item search results are selected).
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39032: "Items selected" in item search untranslatable (2.52 KB, patch)
2025-02-04 20:31 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 39032: "Items selected" in item search untranslatable (2.57 KB, patch)
2025-02-08 19:49 UTC, David Nind
Details | Diff | Splinter Review
Bug 39032: "Items selected" in item search untranslatable (2.66 KB, patch)
2025-02-14 08:44 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 Caroline Cyr La Rose 2025-02-04 20:13:55 UTC
When you select results from the item search page, a small rectangle with "Items selected:" appears. This phrase is not in any translation file (that I could find).

To recreate:
1. Go to Item search
2. Click 'Search'
3. Select one or more results
   --> In the bar at the top of the results there is a rectangle with "Items selected: N XClear"

4. Install another language (e.g. fr-CA)
   4.1. For ktd, do the following commands

        ktd --shell
        gulp po:update --lang fr-CA

        Ctrl+D (exit shell)

        ktd --root --shell
        koha-translate --install fr-CA --dev kohadev
        koha-translate --update fr-CA --dev kohadev

   4.2. Go to Administration > System preferences
   4.3. Search for StaffInterfaceLanguages
   4.4. Check fr-CA
   4.5. Click 'Save all I18N/L10N preferences'

5. Redo steps 1-3 in other language
   --> "Items selected" is not translated
  

`git grep "Items selected" fr-CA*` in the translation git repo returns nothing
Comment 1 Caroline Cyr La Rose 2025-02-04 20:31:45 UTC
Created attachment 177517 [details] [review]
Bug 39032: "Items selected" in item search untranslatable

This patch corrects a syntax error that prevented the string
"Items selected" from being picked up by the translation tool.

To recreate:

1. Go to Item search

2. Click 'Search'

3. Select one or more results
   --> In the bar at the top of the results there is a rectangle with "Items selected: N XClear"

4. Install another language (e.g. fr-CA)
   4.1. For ktd, do the following commands

        ktd --shell
        gulp po:update --lang fr-CA

        Ctrl+D (exit shell)

        ktd --root --shell
        koha-translate --install fr-CA --dev kohadev
        koha-translate --update fr-CA --dev kohadev

   4.2. Go to Administration > System preferences
   4.3. Search for StaffInterfaceLanguages
   4.4. Check fr-CA
   4.5. Click 'Save all I18N/L10N preferences'

5. Redo steps 1-3 in French
   --> "Items selected" is not translated

6. Apply patch

7. Update translations
   (for ktd)
   ktd --shell
   gulp po:update --lang fr-CA

8. Open misc/translator/po/fr-CA-staff-prog.po

9. Search for "Items selected"
   --> It should be there, with a fuzzy flag

10. Translate the phrase in msgstr and remove the line with the fuzzy flag

11. Apply translations
    (for ktd)
    ktd --root --shell
    koha-translate --update fr-CA --dev kohadev

12. Redo steps 1-3 in French
    --> "Items selected" is now translated!
Comment 2 Caroline Cyr La Rose 2025-02-04 20:32:55 UTC
QA please note that I only copied the syntax from a line a bit further down and have no idea what I'm doing... >_<
Comment 3 David Nind 2025-02-08 19:49:28 UTC
Created attachment 177661 [details] [review]
Bug 39032: "Items selected" in item search untranslatable

This patch corrects a syntax error that prevented the string
"Items selected" from being picked up by the translation tool.

To recreate:

1. Go to Item search

2. Click 'Search'

3. Select one or more results
   --> In the bar at the top of the results there is a rectangle with "Items selected: N XClear"

4. Install another language (e.g. fr-CA)
   4.1. For ktd, do the following commands

        ktd --shell
        gulp po:update --lang fr-CA

        Ctrl+D (exit shell)

        ktd --root --shell
        koha-translate --install fr-CA --dev kohadev
        koha-translate --update fr-CA --dev kohadev

   4.2. Go to Administration > System preferences
   4.3. Search for StaffInterfaceLanguages
   4.4. Check fr-CA
   4.5. Click 'Save all I18N/L10N preferences'

5. Redo steps 1-3 in French
   --> "Items selected" is not translated

6. Apply patch

7. Update translations
   (for ktd)
   ktd --shell
   gulp po:update --lang fr-CA

8. Open misc/translator/po/fr-CA-staff-prog.po

9. Search for "Items selected"
   --> It should be there, with a fuzzy flag

10. Translate the phrase in msgstr and remove the line with the fuzzy flag

11. Apply translations
    (for ktd)
    ktd --root --shell
    koha-translate --update fr-CA --dev kohadev

12. Redo steps 1-3 in French
    --> "Items selected" is now translated!

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Marcel de Rooy 2025-02-14 08:44:18 UTC
Created attachment 178085 [details] [review]
Bug 39032: "Items selected" in item search untranslatable

This patch corrects a syntax error that prevented the string
"Items selected" from being picked up by the translation tool.

To recreate:

1. Go to Item search

2. Click 'Search'

3. Select one or more results
   --> In the bar at the top of the results there is a rectangle with "Items selected: N XClear"

4. Install another language (e.g. fr-CA)
   4.1. For ktd, do the following commands

        ktd --shell
        gulp po:update --lang fr-CA

        Ctrl+D (exit shell)

        ktd --root --shell
        koha-translate --install fr-CA --dev kohadev
        koha-translate --update fr-CA --dev kohadev

   4.2. Go to Administration > System preferences
   4.3. Search for StaffInterfaceLanguages
   4.4. Check fr-CA
   4.5. Click 'Save all I18N/L10N preferences'

5. Redo steps 1-3 in French
   --> "Items selected" is not translated

6. Apply patch

7. Update translations
   (for ktd)
   ktd --shell
   gulp po:update --lang fr-CA

8. Open misc/translator/po/fr-CA-staff-prog.po

9. Search for "Items selected"
   --> It should be there, with a fuzzy flag

10. Translate the phrase in msgstr and remove the line with the fuzzy flag

11. Apply translations
    (for ktd)
    ktd --root --shell
    koha-translate --update fr-CA --dev kohadev

12. Redo steps 1-3 in French
    --> "Items selected" is now translated!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Katrin Fischer 2025-02-17 14:07:22 UTC
Pushed for 25.05!

Well done everyone, thank you!