Bug 31068 - Context for translation: Print (verb) vs. Print (noun)
Summary: Context for translation: Print (verb) vs. Print (noun)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-29 21:42 UTC by Caroline Cyr La Rose
Modified: 2023-06-08 22:26 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds context for translation purposes to the term 'Print' for notices and slips message transport types (email, print, SMS). (In English, the word "print" is the same whether it is a verb (to print something) or a noun (a print of something), however, for other languages different words may be used. When the word is in a sentence, it's not too difficult to translate, but in cases where the string to translate is simply "Print", it is often used in different cases (noun or verb). For example: in French there are two different spellings, "Imprimer" or "Imprimé".)
Version(s) released in:
22.11.00, 22.05.05


Attachments
Bug 31068: Context for translation: Print (verb) vs. Print (noun) (6.25 KB, patch)
2022-07-04 16:13 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 31068: Context for translation: Print (verb) vs. Print (noun) (6.30 KB, patch)
2022-07-04 23:28 UTC, David Nind
Details | Diff | Splinter Review
Bug 31068: Context for translation: Print (verb) vs. Print (noun) (6.37 KB, patch)
2022-07-15 15:09 UTC, Martin Renvoize
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-06-29 21:42:43 UTC
In English, the word "print" is the same whether it is a verb (to print something) or a noun (a print of something).

In French, these two have different spellings, "Imprimer" or "Imprimé" (almost the same, and pronounced the same, but when one is used instead of the other, it hurts my eyes!)

When the word is in a sentence, it's not too difficult to translate, but in cases where the string to translate is simply "Print", it is often used in different cases (noun or verb).

Here are the strings where "Print" is alone

#: koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt:61
#: koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt:109
#: koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt:111
#: koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tt:39
#: koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:479
#: koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt:98
#: koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc:171
#: koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc:5
#: koha-tmpl/intranet-tmpl/prog/en/includes/modals/cashup_summary.inc:29
#: koha-tmpl/intranet-tmpl/prog/en/includes/str/tinymce_i18n.inc:2
#, c-format
msgid "Print"
msgstr "Imprimer"

#: koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt:118
#: koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc:22
#, c-format
msgid "Print "
msgstr "Imprimer "


In the following pages, it is meant as a verb ("Print" button):
basket.tt
boraccount.tt
routing-preview-slip.tt
cat-toolbar.inc
columns_settings.inc
cashup_summary.inc 
tinymce_i18n.inc
returns.tt
members-toolbar.inc

In the following pages, it is meant as a noun (type of message transport type, as opposed to email or sms):
letter.tt
overduerules.tt

I propose to add some context where the meaning is the type of message transport.
Comment 1 Caroline Cyr La Rose 2022-07-04 16:13:00 UTC
Created attachment 137101 [details] [review]
Bug 31068: Context for translation: Print (verb) vs. Print (noun)

This patch adds context to the term Print in the context of message transport types (as opposed to printing something/print button), for translation purposes.

To test:
0- Apply patch

Check the terms to be changed
1- Go to Tools > Notifications & slips
2- Edit a notification
** 3- In the tabs for different transport types, check the 'Print' term (letter.tt)
4- Go to Tools > Overdue notice/status triggers
** 5- In the transport types, check the 'Print' column heading (overduerules.tt)

Add a new language (fr-CA in the example, change for whatever language code you want)
6- In a terminal, run
gulp po:create --lang fr-CA
7- Then, run
gulp po:update --lang fr-CA
8- In system preferences, enable the new language in language and OpacLanguages
9- Switch the language in staff interface and OPAC

Change the translations
10- In your favourite text editor, open fr-CA-messages.po
11- Find the string msgctxt "Message transport type"
12- Enter a word in msgstr
13- Save the file
14- In a terminal, go to misc/translator
15- Run
./translate install fr-CA

Check the translations
16- Redo the steps to check the terms (steps 1-5) and make sure the terms in steps 3 and 5 are changed for the word you put in step 12.

17- Optionally, check the other pages where the term is supposed to be unchanged and make sure it is unchanged

Check the terms to leave unchanged (optional)
18- Enable the HoldsAutoFill and UseCashRegisters system preferences
19- Go to Administration > Cash registers and create a cash register
20- Go to a patron's account
** 21- Check the 'Print' button in the menu bar or the patron's account (members-toolbar.inc)
22- Go to the 'Accounting' tab
23- Create a manual invoice
** 24- In the 'Transactions' tab, check the 'Print' button in the fee line (boraccount.tt)
25- Pay the fee (make sure to use the cash register)
** 26- In the 'Transactions' tab, check the 'Print' button in the payment line (boraccount.tt)
27- At the top of the transactions table, click the 'Export' option
** 28- Check the 'Print' option (columns_settings.inc)
29- Go to the 'Check out' tab and check out an item
30- Go to the item's bibliographic record
** 31- Check the 'Print' button in the menu bar of the detailed record (cat-toolbar.inc)
32- Add the record to the cart and open the cart
** 33- Check the 'Print' button in the cart (basket.tt)
34- Place a hold on the item
35- In the search bar at the top, click the 'Check in' tab and check in the item
** 36- Check the 'Print' button in the 'Hold filled for' message (returns.tt)
37- Go to Tools > Cash summary for Branch
38- Click 'record cashup' and confirm
39- Click the 'Summary' link in the 'Last cashup' column
** 40- Check the 'Print' button in the cashup summary modal (cashup_summary.inc)
41- Go to Serials
42- Create a subscription (if there aren't any)
43- Receive an issue
44- From the subscription detail page, go to Create routing list
45- Add a recipient to the list
46- Save the routing list
47- Click 'Save and preview routing slip'
** 48- Check the 'Print' button in the routing list preview (routing_preview_slip.tt)

Note: I can't find where the 'Print' from tinymce_i18n.inc is displayed in the staff interface
Comment 2 David Nind 2022-07-04 23:28:04 UTC
Created attachment 137141 [details] [review]
Bug 31068: Context for translation: Print (verb) vs. Print (noun)

This patch adds context to the term Print in the context of message transport types (as opposed to printing something/print button), for translation purposes.

To test:
0- Apply patch

Check the terms to be changed
1- Go to Tools > Notifications & slips
2- Edit a notification
** 3- In the tabs for different transport types, check the 'Print' term (letter.tt)
4- Go to Tools > Overdue notice/status triggers
** 5- In the transport types, check the 'Print' column heading (overduerules.tt)

Add a new language (fr-CA in the example, change for whatever language code you want)
6- In a terminal, run
gulp po:create --lang fr-CA
7- Then, run
gulp po:update --lang fr-CA
8- In system preferences, enable the new language in language and OpacLanguages
9- Switch the language in staff interface and OPAC

Change the translations
10- In your favourite text editor, open fr-CA-messages.po
11- Find the string msgctxt "Message transport type"
12- Enter a word in msgstr
13- Save the file
14- In a terminal, go to misc/translator
15- Run
./translate install fr-CA

Check the translations
16- Redo the steps to check the terms (steps 1-5) and make sure the terms in steps 3 and 5 are changed for the word you put in step 12.

17- Optionally, check the other pages where the term is supposed to be unchanged and make sure it is unchanged

Check the terms to leave unchanged (optional)
18- Enable the HoldsAutoFill and UseCashRegisters system preferences
19- Go to Administration > Cash registers and create a cash register
20- Go to a patron's account
** 21- Check the 'Print' button in the menu bar or the patron's account (members-toolbar.inc)
22- Go to the 'Accounting' tab
23- Create a manual invoice
** 24- In the 'Transactions' tab, check the 'Print' button in the fee line (boraccount.tt)
25- Pay the fee (make sure to use the cash register)
** 26- In the 'Transactions' tab, check the 'Print' button in the payment line (boraccount.tt)
27- At the top of the transactions table, click the 'Export' option
** 28- Check the 'Print' option (columns_settings.inc)
29- Go to the 'Check out' tab and check out an item
30- Go to the item's bibliographic record
** 31- Check the 'Print' button in the menu bar of the detailed record (cat-toolbar.inc)
32- Add the record to the cart and open the cart
** 33- Check the 'Print' button in the cart (basket.tt)
34- Place a hold on the item
35- In the search bar at the top, click the 'Check in' tab and check in the item
** 36- Check the 'Print' button in the 'Hold filled for' message (returns.tt)
37- Go to Tools > Cash summary for Branch
38- Click 'record cashup' and confirm
39- Click the 'Summary' link in the 'Last cashup' column
** 40- Check the 'Print' button in the cashup summary modal (cashup_summary.inc)
41- Go to Serials
42- Create a subscription (if there aren't any)
43- Receive an issue
44- From the subscription detail page, go to Create routing list
45- Add a recipient to the list
46- Save the routing list
47- Click 'Save and preview routing slip'
** 48- Check the 'Print' button in the routing list preview (routing_preview_slip.tt)

Note: I can't find where the 'Print' from tinymce_i18n.inc is displayed in the staff interface

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-07-04 23:31:43 UTC
Testing notes (using koha-testing-docker):

1. I had to do steps 8 and 9 (enable the new language) after step 15 (install the language).

2. It was an interesting exercise navigating around the staff interface in another language - I didn't have to switch back to English very often.

3. All the optional steps (18-48) were all fine.
Comment 4 Martin Renvoize 2022-07-15 15:09:58 UTC
Created attachment 137772 [details] [review]
Bug 31068: Context for translation: Print (verb) vs. Print (noun)

This patch adds context to the term Print in the context of message transport types (as opposed to printing something/print button), for translation purposes.

To test:
0- Apply patch

Check the terms to be changed
1- Go to Tools > Notifications & slips
2- Edit a notification
** 3- In the tabs for different transport types, check the 'Print' term (letter.tt)
4- Go to Tools > Overdue notice/status triggers
** 5- In the transport types, check the 'Print' column heading (overduerules.tt)

Add a new language (fr-CA in the example, change for whatever language code you want)
6- In a terminal, run
gulp po:create --lang fr-CA
7- Then, run
gulp po:update --lang fr-CA
8- In system preferences, enable the new language in language and OpacLanguages
9- Switch the language in staff interface and OPAC

Change the translations
10- In your favourite text editor, open fr-CA-messages.po
11- Find the string msgctxt "Message transport type"
12- Enter a word in msgstr
13- Save the file
14- In a terminal, go to misc/translator
15- Run
./translate install fr-CA

Check the translations
16- Redo the steps to check the terms (steps 1-5) and make sure the terms in steps 3 and 5 are changed for the word you put in step 12.

17- Optionally, check the other pages where the term is supposed to be unchanged and make sure it is unchanged

Check the terms to leave unchanged (optional)
18- Enable the HoldsAutoFill and UseCashRegisters system preferences
19- Go to Administration > Cash registers and create a cash register
20- Go to a patron's account
** 21- Check the 'Print' button in the menu bar or the patron's account (members-toolbar.inc)
22- Go to the 'Accounting' tab
23- Create a manual invoice
** 24- In the 'Transactions' tab, check the 'Print' button in the fee line (boraccount.tt)
25- Pay the fee (make sure to use the cash register)
** 26- In the 'Transactions' tab, check the 'Print' button in the payment line (boraccount.tt)
27- At the top of the transactions table, click the 'Export' option
** 28- Check the 'Print' option (columns_settings.inc)
29- Go to the 'Check out' tab and check out an item
30- Go to the item's bibliographic record
** 31- Check the 'Print' button in the menu bar of the detailed record (cat-toolbar.inc)
32- Add the record to the cart and open the cart
** 33- Check the 'Print' button in the cart (basket.tt)
34- Place a hold on the item
35- In the search bar at the top, click the 'Check in' tab and check in the item
** 36- Check the 'Print' button in the 'Hold filled for' message (returns.tt)
37- Go to Tools > Cash summary for Branch
38- Click 'record cashup' and confirm
39- Click the 'Summary' link in the 'Last cashup' column
** 40- Check the 'Print' button in the cashup summary modal (cashup_summary.inc)
41- Go to Serials
42- Create a subscription (if there aren't any)
43- Receive an issue
44- From the subscription detail page, go to Create routing list
45- Add a recipient to the list
46- Save the routing list
47- Click 'Save and preview routing slip'
** 48- Check the 'Print' button in the routing list preview (routing_preview_slip.tt)

Note: I can't find where the 'Print' from tinymce_i18n.inc is displayed in the staff interface

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2022-07-15 15:10:12 UTC
Nice work, Passing QA
Comment 6 Tomás Cohen Arazi 2022-07-18 17:55:49 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass 2022-08-23 19:22:17 UTC
Backported to 22.05.x for 22.05.05
Comment 8 Arthur Suzuki 2022-08-26 12:51:56 UTC
enhancement, lots of changes (and conflicts on templates) thus not backporting to 21.11.
Ask or provide a backport if needed.