Bug 33916 - Improve translation of title tags: Labels
Summary: Improve translation of title tags: Labels
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 33906
  Show dependency treegraph
 
Reported: 2023-06-06 15:59 UTC by Owen Leonard
Modified: 2023-10-26 06:32 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 33916: Improve translation of title tags: Labels (16.57 KB, patch)
2023-08-22 12:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33916: Improve translation of title tags: Labels (16.63 KB, patch)
2023-09-12 15:20 UTC, Salah Ghedda
Details | Diff | Splinter Review
Bug 33916: (QA follow-up) Remove redundant template code (1.62 KB, patch)
2023-10-09 11:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33916: Improve translation of title tags: Labels (16.68 KB, patch)
2023-10-20 20:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33916: (QA follow-up) Remove redundant template code (1.67 KB, patch)
2023-10-20 20:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33916: (QA follow-up) Correct "Label profiles" (1.15 KB, patch)
2023-10-20 20:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-06-06 15:59:55 UTC
This patch will modify label creator templates in the staff client so that translatable strings in the <title> tag are wrapped in the correct translation function, e.g. [% t('Translate me') %]
Comment 1 Owen Leonard 2023-08-22 12:58:31 UTC
Created attachment 154689 [details] [review]
Bug 33916: Improve translation of title tags: Labels

This patch label creator templates so that title tags can be more easily
translated.

The patch also makes some minor changes to some templates to improve
consistency between page title, breadcrumb navigation, and page heading.

To test, apply the patch and confirm that the following pages have the
correct title tags:

- Cataloging -> Label creator home
  - Manage -> Label batches
    - Edit ->
      - Click the "Add item(s)" button without entering any barcodes or
        item numbers in the form.
        - Test the search form and search results
  - Manage -> Layouts
  - Manage -> Label templates
  - Manage -> Printer profiles
  - New -> Label batch
  - New -> Layout
  - New -> Label template
  - New -> Printer profile
  - New -> Barcode range
- Cataloging -> Barcode image generator
- Cataloging -> Quick spine label creator
Comment 2 Salah Ghedda 2023-09-12 15:20:16 UTC
Created attachment 155556 [details] [review]
Bug 33916: Improve translation of title tags: Labels

This patch label creator templates so that title tags can be more easily
translated.

The patch also makes some minor changes to some templates to improve
consistency between page title, breadcrumb navigation, and page heading.

To test, apply the patch and confirm that the following pages have the
correct title tags:

- Cataloging -> Label creator home
  - Manage -> Label batches
    - Edit ->
      - Click the "Add item(s)" button without entering any barcodes or
        item numbers in the form.
        - Test the search form and search results
  - Manage -> Layouts
  - Manage -> Label templates
  - Manage -> Printer profiles
  - New -> Label batch
  - New -> Layout
  - New -> Label template
  - New -> Printer profile
  - New -> Barcode range
- Cataloging -> Barcode image generator
- Cataloging -> Quick spine label creator

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Comment 3 Katrin Fischer 2023-10-07 14:33:41 UTC
Couldn't this be simplified?

+                    [% IF ( label_element == 'layout' ) %]
+                        <h2>[% PROCESS translate_label_element element=label_element_title %]</h2>
+                    [% ELSIF ( label_element == 'template' ) %]
+                        <h2>[% PROCESS translate_label_element element=label_element_title %]</h2>
+                    [% ELSIF ( label_element == 'profile' ) %]
+                        <h2>[% PROCESS translate_label_element element=label_element_title %]</h2>
+                    [% ELSIF ( label_element == 'batch' ) %]
+                        <h2>[% PROCESS translate_label_element element=label_element_title %]</h2>
+                    [% END %]


To just be?
<h2>[% PROCESS translate_label_element element=label_element_title %]</h2>

If the outcome is always the same, why do the if/else?
Comment 4 Owen Leonard 2023-10-09 11:03:13 UTC
Created attachment 156731 [details] [review]
Bug 33916: (QA follow-up) Remove redundant template code
Comment 5 Katrin Fischer 2023-10-20 20:17:54 UTC
Created attachment 157569 [details] [review]
Bug 33916: Improve translation of title tags: Labels

This patch label creator templates so that title tags can be more easily
translated.

The patch also makes some minor changes to some templates to improve
consistency between page title, breadcrumb navigation, and page heading.

To test, apply the patch and confirm that the following pages have the
correct title tags:

- Cataloging -> Label creator home
  - Manage -> Label batches
    - Edit ->
      - Click the "Add item(s)" button without entering any barcodes or
        item numbers in the form.
        - Test the search form and search results
  - Manage -> Layouts
  - Manage -> Label templates
  - Manage -> Printer profiles
  - New -> Label batch
  - New -> Layout
  - New -> Label template
  - New -> Printer profile
  - New -> Barcode range
- Cataloging -> Barcode image generator
- Cataloging -> Quick spine label creator

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2023-10-20 20:17:56 UTC
Created attachment 157570 [details] [review]
Bug 33916: (QA follow-up) Remove redundant template code

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2023-10-20 20:17:59 UTC
Created attachment 157571 [details] [review]
Bug 33916: (QA follow-up) Correct "Label profiles"

... to "Printer profiles"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi 2023-10-20 20:38:19 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 9 Fridolin Somers 2023-10-26 06:32:19 UTC
Enhancement not pushed to 23.05.x