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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Katrin Fischer 2023-12-10 15:45:28 +00:00 committed by Katrin Fischer
parent 39ff256231
commit 5f6c0f0c3e
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
4 changed files with 7 additions and 6 deletions

View file

@ -440,9 +440,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>
@ -452,7 +452,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 ( op == 'duplicate' )%]
</li>

View file

@ -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 %]

View file

@ -185,7 +185,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 %]

View file

@ -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 %]
@ -433,7 +434,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 %]