Bug 36876 - In table settings words are split in two and some of them cannot be translated properly
Summary: In table settings words are split in two and some of them cannot be translate...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords: RM_priority
Depends on: 35883
Blocks:
  Show dependency treegraph
 
Reported: 2024-05-16 06:21 UTC by Anneli Österman
Modified: 2024-05-22 13:35 UTC (History)
4 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


Attachments
Bug 36876: Correct <span>s around translatable strings in table settings (3.33 KB, patch)
2024-05-16 12:36 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36876: Correct <span>s around translatable strings in table settings (3.38 KB, patch)
2024-05-16 18:20 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 36876: Correct <span>s around translatable strings in table settings (3.48 KB, patch)
2024-05-17 09:51 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 Anneli Österman 2024-05-16 06:21:20 UTC
I'm translating the main into Finnish and there are new translations for Table settings. The two word headings have been for some reason split into two different strings. One of them can still be translated but for example word "Interlibrary loans" is one word in Finnish, "Kaukolainat", and is hard to split in two. You'd have to put the whole word into the first string and leave the other one empty.

https://translate.koha-community.org/translate/koha/main/staff-prog/fi/?checksum=7f3536ca451413ca

%s %s %s %s %s Interlibrary 

https://translate.koha-community.org/translate/koha/main/staff-prog/fi/?checksum=b87bf29db072c461

 loans


It comes from here https://github.com/Koha-Community/Koha/blob/main/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt#L296C1-L299C46

[% WRAPPER accordion_item %]
[% WRAPPER accordion_heading panel_id="illrequests" %]
Interlibrary <span>loans</span>
[% END %]


Others that have been split too:

[% WRAPPER accordion_item %]
[% WRAPPER accordion_heading panel_id="coursereserves" %]
Course <span>reserves</span>
[% END %]

In Finnish: Kurssivarannot

[% WRAPPER accordion_item %]
[% WRAPPER accordion_heading panel_id="pos" %]
Point of <span>sale</span>
[% END %]

In Finnish: Myyntipiste

[% WRAPPER accordion_item %]
[% WRAPPER accordion_heading panel_id="erm" %]
E-resource <span>management</span>
[% END %]

In Finnish: E-ainestojen hallinta

Could these strings be unsplit?
Comment 1 Katrin Fischer 2024-05-16 07:27:14 UTC
That's been some really good detective work, Anneli! I hope we can have a fix before the end of the week (similar issues for German).
Comment 2 Owen Leonard 2024-05-16 12:36:59 UTC
Created attachment 166820 [details] [review]
Bug 36876: Correct <span>s around translatable strings in table settings

This patch corrects the way translatable strings are handled in the
table settings template. The switch to Bootstrap WRAPPERs for the
accordion widget included several errors.

To test, apply the patch and go to Administration -> Table settings.

- Confirm that the sections expand and collapse correctly.
- Test the translation process with a language, e.g. fr-FR:
  - In KTD, run: gulp po:update --lang fr-FR
  - Check fr-FR-staff-prog.po for the line referring to
    koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt:298
  - It should show the whole string "Interlibrary loans"
Comment 3 Roman Dolny 2024-05-16 18:20:41 UTC
Created attachment 166839 [details] [review]
Bug 36876: Correct <span>s around translatable strings in table settings

This patch corrects the way translatable strings are handled in the
table settings template. The switch to Bootstrap WRAPPERs for the
accordion widget included several errors.

To test, apply the patch and go to Administration -> Table settings.

- Confirm that the sections expand and collapse correctly.
- Test the translation process with a language, e.g. fr-FR:
  - In KTD, run: gulp po:update --lang fr-FR
  - Check fr-FR-staff-prog.po for the line referring to
    koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt:298
  - It should show the whole string "Interlibrary loans"

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 4 Marcel de Rooy 2024-05-17 09:51:15 UTC
Created attachment 166880 [details] [review]
Bug 36876: Correct <span>s around translatable strings in table settings

This patch corrects the way translatable strings are handled in the
table settings template. The switch to Bootstrap WRAPPERs for the
accordion widget included several errors.

To test, apply the patch and go to Administration -> Table settings.

- Confirm that the sections expand and collapse correctly.
- Test the translation process with a language, e.g. fr-FR:
  - In KTD, run: gulp po:update --lang fr-FR
  - Check fr-FR-staff-prog.po for the line referring to
    koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt:298
  - It should show the whole string "Interlibrary loans"

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Katrin Fischer 2024-05-17 10:05:09 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-22 13:35:54 UTC
Bug 35883 not in 23.11.x