Bug 28898 - Context for translation: term (word) vs. term (semester)
Summary: Context for translation: term (word) vs. term (semester)
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-25 18:16 UTC by Caroline Cyr La Rose
Modified: 2021-11-16 14:11 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Text to go in the release notes:
This disambiguates and provides a hint for translating the term "term" used in course reserves, where the meaning is "semester" rather than something like search term. This allows it to be translated, rather than having to use JQuery to change the text displayed for languages other then English.
Version(s) released in:
21.11.00


Attachments
Bug 28898: Context for translation: term (word) vs. term (semester) (5.66 KB, patch)
2021-08-25 20:23 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 28898: Context for translation: term (word) vs. term (semester) (5.74 KB, patch)
2021-08-28 13:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28898: (follow-up) Remove comment lines before PROCESS statements (2.24 KB, patch)
2021-08-28 13:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28898: (follow-up) Add context to some more occurrences of Term in course reserves (3.61 KB, patch)
2021-08-28 13:11 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28898: Context for translation: term (word) vs. term (semester) (5.71 KB, patch)
2021-09-02 21:40 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 28898: (follow-up) Remove comment lines before PROCESS statements (2.21 KB, patch)
2021-09-02 21:41 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 28898: (follow-up) Add context to some more occurrences of Term in course reserves (3.67 KB, patch)
2021-09-02 21:41 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 28898: Context for translation: term (word) vs. term (semester) (5.77 KB, patch)
2021-09-10 09:11 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 28898: (follow-up) Remove comment lines before PROCESS statements (2.27 KB, patch)
2021-09-10 09:11 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 28898: (follow-up) Add context to some more occurrences of Term in course reserves (3.73 KB, patch)
2021-09-10 09:11 UTC, Julian Maurice
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 2021-08-25 18:16:28 UTC
In English, "term" has many different meanings, evidenced here : https://www.merriam-webster.com/dictionary/term

In French, we have different words for these, and the case that mainly interests me here is 

1 : a word or expression that has a precise meaning in some uses or is peculiar to a science, art, profession, or subject

(for example "search term", "broader term", etc.)

vs

3 : division in a school year during which instruction is regularly given to students

(i.e. semester)

in the case of course reserves. 

For example, 

#: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt:43
#: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt:139
#: koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-authorities.inc:14
#, c-format
msgid "Term"
msgstr "Terme"

Here, there are instances of the word in authorities and tags, which presumably have the first meaning. And there is one instance in course reserves where is means semester.

I propose to disambiguate the term "term" specifically for course reserves, where the meaning is "semester".
Comment 1 Katrin Fischer 2021-08-25 18:20:30 UTC
Same problem in German btw.
Comment 2 Caroline Cyr La Rose 2021-08-25 18:26:26 UTC
Good! that means it will benefit more than one language :D
Comment 3 Caroline Cyr La Rose 2021-08-25 20:23:54 UTC
Created attachment 124089 [details] [review]
Bug 28898: Context for translation: term (word) vs. term (semester)

This patch add context to the term Term in the context of course reserves.

To test:
0- Apply patch
Set up course reserves
1- Enable UseCourseReserves
2- Create at least one authorized value for DEPARTMENT
3- Create at least one authorized value for TERM
4- Create a course
5- Add at least one item to the course

Check the terms:
6- Go to the OPAC
7- Go to Course reserves
** 8- In the list of courses, check the Term column heading
9- Go to the staff interface
10- Go to Course reserves
** 11- In the list of courses, check the Term column heading
12- Click on the course name
** 13- Check the Term line in the course description

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

Change the translations
18- In your favourite text editor, open fr-CA-messages.po
19- Find the string 'msgctxt Semester'
20- Enter a word in msgstr
21- Save the file
22- In a terminal, go to misc/translator
23- Run
./translate install fr-CA

Check the translations
24- Redo the steps to check the terms (6-16) and make sure the terms in steps 8, 11, and 13 are changed for the word you put in step 20.
25- Optionally, check the following pages to make sure the terms are not the word you put in step 20 (these pages shouldn't have been changed)
- opac-tags (your account > your tags)
- opac-authorities (search for an authority in Authority search)
- review (tags in staff interface)
Comment 4 Caroline Cyr La Rose 2021-08-25 20:25:03 UTC
I apologize for the gazillion steps in the test plan >_<

I hope I did everything right, it's been a while. Let me know if anything needs changing.

Caroline
Comment 5 Katrin Fischer 2021-08-28 13:11:21 UTC
Created attachment 124212 [details] [review]
Bug 28898: Context for translation: term (word) vs. term (semester)

This patch add context to the term Term in the context of course reserves.

To test:
0- Apply patch
Set up course reserves
1- Enable UseCourseReserves
2- Create at least one authorized value for DEPARTMENT
3- Create at least one authorized value for TERM
4- Create a course
5- Add at least one item to the course

Check the terms:
6- Go to the OPAC
7- Go to Course reserves
** 8- In the list of courses, check the Term column heading
9- Go to the staff interface
10- Go to Course reserves
** 11- In the list of courses, check the Term column heading
12- Click on the course name
** 13- Check the Term line in the course description

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

Change the translations
18- In your favourite text editor, open fr-CA-messages.po
19- Find the string 'msgctxt Semester'
20- Enter a word in msgstr
21- Save the file
22- In a terminal, go to misc/translator
23- Run
./translate install fr-CA

Check the translations
24- Redo the steps to check the terms (6-16) and make sure the terms in steps 8, 11, and 13 are changed for the word you put in step 20.
25- Optionally, check the following pages to make sure the terms are not the word you put in step 20 (these pages shouldn't have been changed)
- opac-tags (your account > your tags)
- opac-authorities (search for an authority in Authority search)
- review (tags in staff interface)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2021-08-28 13:11:26 UTC
Created attachment 124213 [details] [review]
Bug 28898: (follow-up) Remove comment lines before PROCESS statements

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2021-08-28 13:11:30 UTC
Created attachment 124214 [details] [review]
Bug 28898: (follow-up) Add context to some more occurrences of Term in course reserves

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2021-08-28 13:12:31 UTC
Hi Caroline, I used to have to rename these with jQuery, so quite keen on these patches. I have found some more "Term:" in the course reserves templates, would you check my follow-up and maybe sign off on them?
Comment 9 Caroline Cyr La Rose 2021-09-02 21:40:46 UTC
Created attachment 124438 [details] [review]
Bug 28898: Context for translation: term (word) vs. term (semester)

This patch add context to the term Term in the context of course reserves.

To test:
0- Apply patch
Set up course reserves
1- Enable UseCourseReserves
2- Create at least one authorized value for DEPARTMENT
3- Create at least one authorized value for TERM
4- Create a course
5- Add at least one item to the course

Check the terms:
6- Go to the OPAC
7- Go to Course reserves
** 8- In the list of courses, check the Term column heading
9- Go to the staff interface
10- Go to Course reserves
** 11- In the list of courses, check the Term column heading
12- Click on the course name
** 13- Check the Term line in the course description

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

Change the translations
18- In your favourite text editor, open fr-CA-messages.po
19- Find the string 'msgctxt Semester'
20- Enter a word in msgstr
21- Save the file
22- In a terminal, go to misc/translator
23- Run
./translate install fr-CA

Check the translations
24- Redo the steps to check the terms (6-16) and make sure the terms in steps 8, 11, and 13 are changed for the word you put in step 20.
25- Optionally, check the following pages to make sure the terms are not the word you put in step 20 (these pages shouldn't have been changed)
- opac-tags (your account > your tags)
- opac-authorities (search for an authority in Authority search)
- review (tags in staff interface)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Caroline Cyr La Rose 2021-09-02 21:41:56 UTC
Created attachment 124439 [details] [review]
Bug 28898: (follow-up) Remove comment lines before PROCESS statements

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Caroline Cyr La Rose 2021-09-02 21:41:59 UTC
Created attachment 124440 [details] [review]
Bug 28898: (follow-up) Add context to some more occurrences of Term in course reserves

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 12 Caroline Cyr La Rose 2021-09-02 21:43:16 UTC
This was my first time signing off a patch of a set and I ran into errors. I hope I did everything ok.
Comment 13 Julian Maurice 2021-09-10 09:11:09 UTC
Created attachment 124741 [details] [review]
Bug 28898: Context for translation: term (word) vs. term (semester)

This patch add context to the term Term in the context of course reserves.

To test:
0- Apply patch
Set up course reserves
1- Enable UseCourseReserves
2- Create at least one authorized value for DEPARTMENT
3- Create at least one authorized value for TERM
4- Create a course
5- Add at least one item to the course

Check the terms:
6- Go to the OPAC
7- Go to Course reserves
** 8- In the list of courses, check the Term column heading
9- Go to the staff interface
10- Go to Course reserves
** 11- In the list of courses, check the Term column heading
12- Click on the course name
** 13- Check the Term line in the course description

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

Change the translations
18- In your favourite text editor, open fr-CA-messages.po
19- Find the string 'msgctxt Semester'
20- Enter a word in msgstr
21- Save the file
22- In a terminal, go to misc/translator
23- Run
./translate install fr-CA

Check the translations
24- Redo the steps to check the terms (6-16) and make sure the terms in steps 8, 11, and 13 are changed for the word you put in step 20.
25- Optionally, check the following pages to make sure the terms are not the word you put in step 20 (these pages shouldn't have been changed)
- opac-tags (your account > your tags)
- opac-authorities (search for an authority in Authority search)
- review (tags in staff interface)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 14 Julian Maurice 2021-09-10 09:11:13 UTC
Created attachment 124742 [details] [review]
Bug 28898: (follow-up) Remove comment lines before PROCESS statements

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 15 Julian Maurice 2021-09-10 09:11:17 UTC
Created attachment 124743 [details] [review]
Bug 28898: (follow-up) Add context to some more occurrences of Term in course reserves

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 16 Jonathan Druart 2021-09-21 18:19:11 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 17 David Cook 2021-11-14 22:29:12 UTC
I'm a bit confused by this one.

Does it show "Term" in the English UI but "Semester" in the translation file?

While a "semester" is a "term", not all terms are semesters. 

https://en.wikipedia.org/wiki/Academic_term

French should be the same as English with trimestres, semestres, etc.

I'm not across Koha's translation idiosyncrasies but I can't see how "semester" would be the right choice here. Happy for someone to explain it though as I imagine I'm just confused.
Comment 18 David Cook 2021-11-14 22:30:03 UTC
For context, here in Sydney Australia some universities use semesters and others use trimesters for their academic terms. While back in western Canada we had quarter terms in high school.
Comment 19 Katrin Fischer 2021-11-14 22:52:49 UTC
(In reply to David Cook from comment #17)
> I'm a bit confused by this one.
> 
> Does it show "Term" in the English UI but "Semester" in the translation file?

The strings with the same context will be translated together with the context showing as a "hint" when translating. You still see "term". The English GUI is not changed by this patch set at all.

The main point here is not semester vs. term, but more: term vs. search terms. We have "term" showing up in context of search and in the course reserves module. The context is different, but without this patch you can't differentiate. In German the term for 'time' and term for 'words' are completely different words and this patch allows to use different translations.
Comment 20 David Cook 2021-11-15 23:03:56 UTC
(In reply to Katrin Fischer from comment #19)
> (In reply to David Cook from comment #17)
> > I'm a bit confused by this one.
> > 
> > Does it show "Term" in the English UI but "Semester" in the translation file?
> 
> The strings with the same context will be translated together with the
> context showing as a "hint" when translating. You still see "term". The
> English GUI is not changed by this patch set at all.
> 
> The main point here is not semester vs. term, but more: term vs. search
> terms. We have "term" showing up in context of search and in the course
> reserves module. The context is different, but without this patch you can't
> differentiate. In German the term for 'time' and term for 'words' are
> completely different words and this patch allows to use different
> translations.

Thanks for the explanation, Katrin. I figured it must be something like that but it wasn't obvious at a glance.