From a33592b6b42ae4e12fe6e0598f563877e870689a Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Wed, 25 Aug 2021 16:23:02 -0400 Subject: [PATCH] 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 Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart --- .../prog/en/modules/course_reserves/course-details.tt | 4 +++- .../prog/en/modules/course_reserves/course-reserves.tt | 4 +++- .../opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 12efce92bb..06515a6373 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -4,6 +4,8 @@ [% USE ItemTypes %] [% USE Branches %] [% USE TablesSettings %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Course details for [% course.course_name | html %] › Course reserves › Koha @@ -65,7 +67,7 @@
  1. Course name [% course.course_name | html %]
  2. -
  3. Term [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]
  4. +
  5. [% tp('Semester', 'Term') | html %] [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]
  6. Department [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]
  7. Course number [% course.course_number | html %]
  8. Section [% course.section | html %]
  9. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt index d2fcd6b476..43a1103449 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt @@ -3,6 +3,8 @@ [% USE AuthorisedValues %] [% USE TablesSettings %] [% SET footerjs = 1 %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] Course reserves › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -48,7 +50,7 @@ Dept. Course # Section - Term + [% tp('Semester', 'Term') | html %] Instructors Staff note Public note diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt index 7a6bf7ad9f..9ada53ca80 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt @@ -3,6 +3,8 @@ [% USE Koha %] [% USE AuthorisedValues %] [% USE TablesSettings %] +[%# USE the plugin and define some macros %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] Courses › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog @@ -41,7 +43,7 @@ Dept. Course # Section - Term + [% tp('Semester', 'Term') | html %] Instructors Notes -- 2.39.5