Bug 31807 - Context for translation: Filter (verb) vs. Filter (noun)
Summary: Context for translation: Filter (verb) vs. Filter (noun)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-14 20:20 UTC by Caroline Cyr La Rose
Modified: 2023-12-28 20:43 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds some context for translators for the term "Filter" when used as a noun as opposed to a verb.
Version(s) released in:
22.11.00


Attachments
Bug 31807: Context for translation: Filter (verb) vs. Filter (noun) (3.83 KB, patch)
2022-10-14 21:05 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 31807: Context for translation: Filter (verb) vs. Filter (noun) (3.88 KB, patch)
2022-10-16 06:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 31807: Context for translation: Filter (verb) vs. Filter (noun) (3.94 KB, patch)
2022-10-16 14:25 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 Caroline Cyr La Rose 2022-10-14 20:20:37 UTC
In the new MARC overlay rules, there is one instance of 'Filter' that is meant as a noun. In French (and maybe other languages), the noun and the verb are not the same word.

Most instances of 'Filter' are meant as verbs (some are ambiguous and could be both, such as the column headers in Reports > Statistics wizards). MARC overlay rules is the only page where Filter as a verb doesn't really work.

I propose we add some context to separate it from the other ones.
Comment 1 Caroline Cyr La Rose 2022-10-14 21:05:06 UTC
Created attachment 141907 [details] [review]
Bug 31807: Context for translation: Filter (verb) vs. Filter (noun)

This patch add the context 'noun' to the 'Filter' string in
marc-overlay-rules.tt. This will separate that instance of 'Filter' from
the other ones, where it is meant as a verb.

To test:
1. Apply patch
2. Visit Administration > MARC overlay rules, make sure the page works
(no errors) and that there is a column called 'Filter'
3. Update the po files

gulp po:update --lang xx-XX

for example, gulp po:update --lang fr-CA

4. Check the xx-XX-messages.po file (e.g.
misc/translator/po/fr-CA-messages.po), there should be an entry for
'Filter', with a line msgctxt that gives the 'noun' context
5. Update the file with a random word for the 'Filter' translation
for example, I translated 'Filter' by 'Filter as a noun', just to see
the difference

\#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt:83
msgctxt "noun"
msgid "Filter"
msgstr "Filter as a noun"

6. Install a new language
6.1. Run the following commands in the terminal, replacing xx-XX with
the language code (e.g. fr-CA)

cd misc/translator
./translate install xx-XX

6.2. In the Koha staff interface, go to Administration > Global system
preferences
6.3. Search for language
6.4. Check the box next to the new language
6.5. Save

7. View the MARC overlay rules page in the new language, the 'Filter'
column heading should be whatever you put in step 5

Optional test
8. In the staff interface in English, view one or more of these pages,
the 'Filter' should be unchanged
- Acquisitions > Late orders (Filter button)
- Aquisitions > Search for vendor > Receive shipments (Filter heading on
the left and Filter button)
- Acquisitions > Search for vendor > Click vendor's name > Uncertain
prices (Filter button)
- Administration > Budgets > Click budget's name > Planning > Plan by
... (any option) (Filter heading on the left)
- Reports > Use saved (Filter heading on the left)
- Reports > Acquisitions statistics wizard (Filter column heading)
- Reports > Patrons statistics wizard (Filter column heading)
- Reports > Catalog statistics wizard (Filter column heading)
- Reports > Circulation statistics wizard (Filter column heading)
- Reports > Holds statistics wizard (Filter column heading)
- Reports > Average loan time (Filter column heading)
- Tools > News (Filter heading on the left)

9. View these same pages in the other language, the Filter should NOT be
changed to whatever you put in step 5
Comment 2 Caroline Cyr La Rose 2022-10-14 21:10:01 UTC
I only added the noun context to the marc-overlay-rules page. I did not add the 'verb' context to the other pages. Let me know if this would be preferable.

Step 8 contains all the other instances of 'Filter' in the staff interface. The buttons and section headings are certainly verbs, but I wasn't sure for the column headings. It could be both. So I abstained from making a decision.

If someone thinks it's preferable to add the context everywhere, let me know which would be best for the column headings...
Comment 3 David Nind 2022-10-16 06:29:29 UTC
Created attachment 141939 [details] [review]
Bug 31807: Context for translation: Filter (verb) vs. Filter (noun)

This patch add the context 'noun' to the 'Filter' string in
marc-overlay-rules.tt. This will separate that instance of 'Filter' from
the other ones, where it is meant as a verb.

To test:
1. Apply patch
2. Visit Administration > MARC overlay rules, make sure the page works
(no errors) and that there is a column called 'Filter'
3. Update the po files

gulp po:update --lang xx-XX

for example, gulp po:update --lang fr-CA

4. Check the xx-XX-messages.po file (e.g.
misc/translator/po/fr-CA-messages.po), there should be an entry for
'Filter', with a line msgctxt that gives the 'noun' context
5. Update the file with a random word for the 'Filter' translation
for example, I translated 'Filter' by 'Filter as a noun', just to see
the difference

\#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt:83
msgctxt "noun"
msgid "Filter"
msgstr "Filter as a noun"

6. Install a new language
6.1. Run the following commands in the terminal, replacing xx-XX with
the language code (e.g. fr-CA)

cd misc/translator
./translate install xx-XX

6.2. In the Koha staff interface, go to Administration > Global system
preferences
6.3. Search for language
6.4. Check the box next to the new language
6.5. Save

7. View the MARC overlay rules page in the new language, the 'Filter'
column heading should be whatever you put in step 5

Optional test
8. In the staff interface in English, view one or more of these pages,
the 'Filter' should be unchanged
- Acquisitions > Late orders (Filter button)
- Aquisitions > Search for vendor > Receive shipments (Filter heading on
the left and Filter button)
- Acquisitions > Search for vendor > Click vendor's name > Uncertain
prices (Filter button)
- Administration > Budgets > Click budget's name > Planning > Plan by
... (any option) (Filter heading on the left)
- Reports > Use saved (Filter heading on the left)
- Reports > Acquisitions statistics wizard (Filter column heading)
- Reports > Patrons statistics wizard (Filter column heading)
- Reports > Catalog statistics wizard (Filter column heading)
- Reports > Circulation statistics wizard (Filter column heading)
- Reports > Holds statistics wizard (Filter column heading)
- Reports > Average loan time (Filter column heading)
- Tools > News (Filter heading on the left)

9. View these same pages in the other language, the Filter should NOT be
changed to whatever you put in step 5

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Katrin Fischer 2022-10-16 14:25:51 UTC
Created attachment 141944 [details] [review]
Bug 31807: Context for translation: Filter (verb) vs. Filter (noun)

This patch add the context 'noun' to the 'Filter' string in
marc-overlay-rules.tt. This will separate that instance of 'Filter' from
the other ones, where it is meant as a verb.

To test:
1. Apply patch
2. Visit Administration > MARC overlay rules, make sure the page works
(no errors) and that there is a column called 'Filter'
3. Update the po files

gulp po:update --lang xx-XX

for example, gulp po:update --lang fr-CA

4. Check the xx-XX-messages.po file (e.g.
misc/translator/po/fr-CA-messages.po), there should be an entry for
'Filter', with a line msgctxt that gives the 'noun' context
5. Update the file with a random word for the 'Filter' translation
for example, I translated 'Filter' by 'Filter as a noun', just to see
the difference

\#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt:83
msgctxt "noun"
msgid "Filter"
msgstr "Filter as a noun"

6. Install a new language
6.1. Run the following commands in the terminal, replacing xx-XX with
the language code (e.g. fr-CA)

cd misc/translator
./translate install xx-XX

6.2. In the Koha staff interface, go to Administration > Global system
preferences
6.3. Search for language
6.4. Check the box next to the new language
6.5. Save

7. View the MARC overlay rules page in the new language, the 'Filter'
column heading should be whatever you put in step 5

Optional test
8. In the staff interface in English, view one or more of these pages,
the 'Filter' should be unchanged
- Acquisitions > Late orders (Filter button)
- Aquisitions > Search for vendor > Receive shipments (Filter heading on
the left and Filter button)
- Acquisitions > Search for vendor > Click vendor's name > Uncertain
prices (Filter button)
- Administration > Budgets > Click budget's name > Planning > Plan by
... (any option) (Filter heading on the left)
- Reports > Use saved (Filter heading on the left)
- Reports > Acquisitions statistics wizard (Filter column heading)
- Reports > Patrons statistics wizard (Filter column heading)
- Reports > Catalog statistics wizard (Filter column heading)
- Reports > Circulation statistics wizard (Filter column heading)
- Reports > Holds statistics wizard (Filter column heading)
- Reports > Average loan time (Filter column heading)
- Tools > News (Filter heading on the left)

9. View these same pages in the other language, the Filter should NOT be
changed to whatever you put in step 5

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2022-10-17 11:29:21 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!