From 2dcf454ce39821ab4d572286ee981b857e9255cf Mon Sep 17 00:00:00 2001 From: Katrin Fischer <katrin.fischer.83@web.de> Date: Sun, 10 Dec 2023 15:45:28 +0000 Subject: [PATCH] Bug 35531: Add context for translating gender option "Other" To test: * Apply patch * Verify the option "Other" for gender is correctly displayed when: * Editing a patron record in the staff interface * Viewing the 'Details' tab of a patron in staff interface * Triggering a "duplicate" patron warning and looking at the details of the existing patron record * Self registering a patron in the OPAC * Viewing 'Personal details' tab in the OPAC for a registered patron * If you are using ktd, run: gulp po:update --lang de-DE * Verify string "gender" appears with the occurences of "Other"and "Other:" in misc/translator/Koha-messages.pot --- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 6 +++--- .../prog/en/modules/members/moremember-brief.tt | 2 +- .../intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index b6b70882e6..f9a034c1e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -438,9 +438,9 @@ legend:hover { <label for="sex-male"><input type="radio" name="sex" id="sex-male" value="M" /><span class="patronsex-male"> Male</span></label> [% END %] [% IF ( other ) %] - <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> Other</span></label> + <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" checked="checked" /><span class="patronsex-other"> [% tp('gender', 'Other') | html %]</span></label> [% ELSE %] - <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> Other</span></label> + <label for="sex-other"><input type="radio" name="sex" id="sex-other" value="O" /><span class="patronsex-other"> [% tp('gender', 'Other') | html %]</span></label> [% END %] [% IF ( none ) %] <label for="sex-none"><input type="radio" name="sex" id="sex-none" value="" checked="checked" /><span class="patronsex-none"> None specified</span></label> @@ -450,7 +450,7 @@ legend:hover { [% ELSE %] <label for="sex-female"><span class="patronsex-female">Female </span></label><input type="radio" name="sex" id="sex-female" value="F" /> <label for="sex-male"><span class="patronsex-male">Male </span></label><input type="radio" name="sex" id="sex-male" value="M" /> - <label for="sex-other"><span class="patronsex-other">Other </span></label><input type="radio" name="sex" id="sex-other" value="O" /> + <label for="sex-other"><span class="patronsex-other">[% tp('gender', 'Other') | html %] </span></label><input type="radio" name="sex" id="sex-other" value="O" /> <label for="sex-none"><span class="patronsex-none">None specified </span></label><input type="radio" name="sex" id="sex-none" value="" checked="checked" /> [% END # /UNLESS ( opduplicate )%] </li> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt index ddaec613c9..bec0c9c4fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt @@ -41,7 +41,7 @@ [% UNLESS ( I ) %] [% IF ( patron.initials ) %]<li><span class="label">Initials: </span>[% patron.initials | html %]</li>[% END %] [% IF ( patron.dateofbirth ) %]<li><span class="label">Date of birth:</span>[% patron.dateofbirth | $KohaDates %]</li>[% END %] - [% IF ( patron.sex ) %]<li><span class="label">Gender:</span>[% IF ( patron.sex == 'F' ) %]<span class="patronsex-female">Female</span>[% ELSIF ( patron.sex == 'M' ) %]<span class="patronsex-male">Male</span>[% ELSIF ( patron.sex == 'O' ) %]<span class="patronsex-other">Other</span>[% ELSE %][% patron.sex | html %][% END %]</li>[% END %] + [% IF ( patron.sex ) %]<li><span class="label">Gender:</span>[% IF ( patron.sex == 'F' ) %]<span class="patronsex-female">Female</span>[% ELSIF ( patron.sex == 'M' ) %]<span class="patronsex-male">Male</span>[% ELSIF ( patron.sex == 'O' ) %]<span class="patronsex-other">[% tp('gender', 'Other') | html %]</span>[% ELSE %][% patron.sex | html %][% END %]</li>[% END %] [% END %] [% IF guarantees %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 3a1278e3cf..96fdd7f7bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -184,7 +184,7 @@ [% IF ( patron.sex ) %] <li> <span class="label">Gender:</span> - [% IF ( patron.sex == 'F' ) %]<span class="patronsex-female">Female</span>[% ELSIF ( patron.sex == 'M' ) %]<span class="patronsex-male">Male</span>[% ELSIF (patron.sex == 'O' ) %]<span class="patronsex-other">Other</span>[% ELSE %][% patron.sex | html %][% END %] + [% IF ( patron.sex == 'F' ) %]<span class="patronsex-female">Female</span>[% ELSIF ( patron.sex == 'M' ) %]<span class="patronsex-male">Male</span>[% ELSIF (patron.sex == 'O' ) %]<span class="patronsex-other">[% tp('gender', 'Other') | html %]</span>[% ELSE %][% patron.sex | html %][% END %] </li> [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 978c592b67..e4a39fbf7d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -7,6 +7,7 @@ [% USE KohaDates %] [% USE Math %] [% USE AdditionalContents %] +[% PROCESS 'i18n.inc' %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET userupdateview = 1 %] @@ -432,7 +433,7 @@ <input type="radio" name="borrower_sex" id="sex-male" value="M" /> [% END %] - <label for="sex-other" class="radio inline"><span class="patronsex-other">Other:</span></label> + <label for="sex-other" class="radio inline"><span class="patronsex-other">[% tp('gender','Other:') | html %]</span></label> [% IF borrower.sex == 'O' %] <input type="radio" name="borrower_sex" id="sex-other" value="O" checked="checked" /> [% ELSE %] -- 2.30.2