Bugzilla – Attachment 62482 Details for
Bug 18432
Most code comments assume male gender
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18432: code comments assume male gender
Bug-18432-code-comments-assume-male-gender.patch (text/plain), 17.40 KB, created by
Jonathan Druart
on 2017-04-20 16:00:42 UTC
(
hide
)
Description:
Bug 18432: code comments assume male gender
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-04-20 16:00:42 UTC
Size:
17.40 KB
patch
obsolete
>From 3820a0342c95c9df291a564ccf2ef4e8c35307c5 Mon Sep 17 00:00:00 2001 >From: phette23 <phette23@gmail.com> >Date: Thu, 13 Apr 2017 14:26:07 -0700 >Subject: [PATCH] Bug 18432: code comments assume male gender >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Comments throughout the Koha codebase assume that >all librarians or borrowers are male by using the >pronoun 'he' universally. This patch changes to >'he or she' / 'him or hers'. > >Testing plan: > >- ensuring modifying tests still pass: > + C4/SIP/t/06patron_enable.t > + t/db_dependent/Circulation.t > + t/db_dependent/Koha/Patrons.t > + t/db_dependent/Reserves.t > >Sponsored-By: California College of the Arts > >No code changes detected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Auth.pm | 2 +- > C4/Circulation.pm | 4 ++-- > C4/SIP/t/06patron_enable.t | 4 ++-- > C4/Suggestions.pm | 4 ++-- > acqui/addorderiso2709.pl | 2 +- > acqui/neworderempty.pl | 8 ++++---- > acqui/parcel.pl | 2 +- > acqui/parcels.pl | 2 +- > cataloguing/additem.pl | 2 +- > installer/install.pl | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/basketgroup.js | 3 ++- > mainpage.pl | 2 +- > misc/export_borrowers.pl | 2 +- > misc/migration_tools/bulkmarcimport.pl | 2 +- > opac/opac-discharge.pl | 2 +- > opac/opac-user.pl | 2 +- > reserve/request.pl | 2 +- > t/db_dependent/Circulation.t | 6 +++--- > t/db_dependent/Koha/Patrons.t | 2 +- > t/db_dependent/Reserves.t | 4 ++-- > 21 files changed, 31 insertions(+), 30 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index a139bce..c817ffb 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -182,7 +182,7 @@ sub get_template_and_user { > } > > >- # If the user logged in is the SCO user and he tries to go out the SCO module, log the user out removing the CGISESSID cookie >+ # If the user logged in is the SCO user and he or she tries to go out the SCO module, log the user out removing the CGISESSID cookie > if ( $in->{type} eq 'opac' and $in->{template_name} !~ m|sco/| ) { > if ( C4::Context->preference('AutoSelfCheckID') && $user eq C4::Context->preference('AutoSelfCheckID') ) { > $template = C4::Templates::gettemplate( 'opac-auth.tt', 'opac', $in->{query} ); >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e71600d..b305438 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2220,7 +2220,7 @@ C<$datedue> date due DateTime object > C<$return_date> DateTime object representing the return time > > Internal function, called only by AddReturn that calculates and updates >- the user fine days, and debars him if necessary. >+ the user fine days, and debars him or her if necessary. > > Should only be called for overdue returns > >@@ -3853,7 +3853,7 @@ sub IsItemIssued { > my ($ageRestriction, $daysToAgeRestriction) = GetAgeRestriction($record_restrictions, $borrower); > my ($ageRestriction, $daysToAgeRestriction) = GetAgeRestriction($record_restrictions); > >- if($daysToAgeRestriction <= 0) { #Borrower is allowed to access this material, as he is older or as old as the agerestriction } >+ if($daysToAgeRestriction <= 0) { #Borrower is allowed to access this material, as he or she is older or as old as the agerestriction } > if($daysToAgeRestriction > 0) { #Borrower is this many days from meeting the agerestriction } > > @PARAM1 the koha.biblioitems.agerestriction value, like K18, PEGI 13, ... >diff --git a/C4/SIP/t/06patron_enable.t b/C4/SIP/t/06patron_enable.t >index 7e69919..4ed174c 100644 >--- a/C4/SIP/t/06patron_enable.t >+++ b/C4/SIP/t/06patron_enable.t >@@ -31,8 +31,8 @@ my $patron_enable_test_template = { > required => 1, }, > ], }; > >-# We need to disable the valid patron before we can >-# ensure that he was properly enabled. >+# We need to disable the valid patron before we can >+# ensure that he or she was properly enabled. > my $patron_disable_test_template = { > id => 'Patron Enable: block patron (prep to test enabling)', > msg => "01N20060102 084238AO$instid|ALBlocked patron for SIP test.|AA$user_barcode|", >diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm >index 8e76cea..fe0fe36 100644 >--- a/C4/Suggestions.pm >+++ b/C4/Suggestions.pm >@@ -63,7 +63,7 @@ The functions in this module deal with the aqorders in OPAC and in librarian int > > A suggestion is done in the OPAC. It has the status "ASKED" > >-When a librarian manages the suggestion, he can set the status to "REJECTED" or "ACCEPTED". >+When a librarian manages the suggestion, he or she can set the status to "REJECTED" or "ACCEPTED". > > When the book is ordered, the suggestion status becomes "ORDERED" > >@@ -554,7 +554,7 @@ sub ConnectSuggestionAndBiblio { > > &DelSuggestion($borrowernumber,$ordernumber) > >-Delete a suggestion. A borrower can delete a suggestion only if he is its owner. >+Delete a suggestion. A borrower can delete a suggestion only if he or she is its owner. > > =cut > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 24dc8e5..bd0f4eb 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -2,7 +2,7 @@ > > #A script that lets the user populate a basket from an iso2709 file > #the script first displays a list of import batches, then when a batch is selected displays all the biblios in it. >-#The user can then pick which biblios he wants to order >+#The user can then pick which biblios he or she wants to order > > # Copyright 2008 - 2011 BibLibre SARL > # >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 2599f8f..19a2aef 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -153,10 +153,10 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ > #look for duplicates > ($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord); > if($biblionumber && !$input->param('use_external_source')) { >- #if duplicate record found and user did not decide yet, first warn user >- #and let him choose between using new record or existing record >- Load_Duplicate($duplicatetitle); >- exit; >+ #if duplicate record found and user did not decide yet, first warn user >+ #and let him or her choose between using new record or existing record >+ Load_Duplicate($duplicatetitle); >+ exit; > } > #from this point: add a new record > if (C4::Context->preference("BiblioAddsAuthorities")){ >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index f89261f..4ba5b5f 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -28,7 +28,7 @@ parcel.pl > =head1 DESCRIPTION > > This script shows all orders receipt or pending for a given supplier. >-It allows to write an order as 'received' when he arrives. >+It allows to write an order as 'received' when it arrives. > > =head1 CGI PARAMETERS > >diff --git a/acqui/parcels.pl b/acqui/parcels.pl >index 85da683..d0e6e2b 100755 >--- a/acqui/parcels.pl >+++ b/acqui/parcels.pl >@@ -29,7 +29,7 @@ parcels.pl > =head1 DESCRIPTION > > This script shows all orders/parcels receipt or pending for a given supplier. >-It allows to write an order/parcels as 'received' when he arrives. >+It allows to write an order/parcels as 'received' when it arrives. > > =head1 CGI PARAMETERS > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 669fa4a..048d89b 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -528,7 +528,7 @@ if ($op eq "additem") { > my $oldbarcode = $addedolditem->{'barcode'}; > my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode); > >- # If there is a barcode and we can't find him new values, we can't add multiple copies >+ # If there is a barcode and we can't find him or her new values, we can't add multiple copies > my $testbarcode; > $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj; > if ($oldbarcode && !$testbarcode) { >diff --git a/installer/install.pl b/installer/install.pl >index 508496a..8e44dea 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -226,7 +226,7 @@ elsif ( $step && $step == 3 ) { > elsif ( $op && $op eq 'selectframeworks' ) { > # > # >- # 1ST install, 2nd sub-step : show the user the sql datas he can insert in the database. >+ # 1ST install, 2nd sub-step : show the user the sql datas he or she can insert in the database. > # > # > # (note that the term "selectframeworks is not correct. The user can select various files, not only frameworks) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 7eaec91..6501b8d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -316,7 +316,7 @@ function confirm_deletion() { > > <fieldset class="action"> [% IF ( opisadd ) %] > <input type="submit" name="phony_submit" value="phony_submit" id="phony_submit" style="display:none;" onclick="return false;" /> >- <!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe he validated the adding of multiple items >+ <!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe he or she validated the adding of multiple items > when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button. > It is a bit tricky, but necessary in the sake of UI correctness. > --> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js b/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js >index 4d07836..c099258 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js >@@ -241,7 +241,8 @@ function closeandprint(bg){ > } > } > >-//function that lets the user unclose a basketgroup as long as he hasn't submitted the changes to the page. >+//function that lets the user unclose a basketgroup >+//as long as he or she hasn't submitted the changes to the page. > function unclosegroup(bgid){ > var div = document.getElementById('basketgroup-'+bgid+'-closed').parentNode; > var divtodel = document.getElementById('unclose-' + bgid); >diff --git a/mainpage.pl b/mainpage.pl >index 7410247..39915e5 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -85,7 +85,7 @@ $template->param( > ); > > # >-# warn user if he is using mysql/admin login >+# warn user if he or she is using mysql/admin login > # > unless ($loggedinuser) { > $template->param(adminWarning => 1); >diff --git a/misc/export_borrowers.pl b/misc/export_borrowers.pl >index fd9d616..d980cc5 100755 >--- a/misc/export_borrowers.pl >+++ b/misc/export_borrowers.pl >@@ -96,7 +96,7 @@ unless ( $separator ) { > > my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } ); > >-# If the user did not specify any field to export, we assume he wants them all >+# If the user did not specify any field to export, we assume he or she wants them all > # We retrieve the first borrower informations to get field names > my ($borrowernumber) = $sth->fetchrow_array or die "No borrower to export"; > my $member = GetMember($borrowernumber); # FIXME Now is_expired is no longer available >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 34d2b52..dc2cae4 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -694,7 +694,7 @@ If specified, data will be appended to the logfile. If not, the logfile will be > > =item B<-t, -test> > >-Test mode: parses the file, saying what he would do, but doing nothing. >+Test mode: parses the file, saying what it would do, but doing nothing. > > =item B<-s> > >diff --git a/opac/opac-discharge.pl b/opac/opac-discharge.pl >index 3b75166..6848f8e 100755 >--- a/opac/opac-discharge.pl >+++ b/opac/opac-discharge.pl >@@ -92,7 +92,7 @@ else { > pending => 1, > }); > # FIXME looks like $available is not needed >- # If a patron is discharged he has a validated discharge available >+ # If a patron is discharged he or she has a validated discharge available > my $available = Koha::Patron::Discharge::count({ > borrowernumber => $loggedinuser, > validated => 1, >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index c7333e2..f4d2daf 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -102,7 +102,7 @@ if ($debar) { > $borr->{'userdebarreddate'} = $debar; > } > # FIXME looks like $available is not needed >- # If a patron is discharged he has a validated discharge available >+ # If a patron is discharged he or she has a validated discharge available > my $available = Koha::Patron::Discharge::count({ > borrowernumber => $borrowernumber, > validated => 1, >diff --git a/reserve/request.pl b/reserve/request.pl >index 810c904..69e163c 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -136,7 +136,7 @@ if ($borrowernumber_hold && !$action) { > my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold ); > my $diffbranch; > >- # we check the reserves of the borrower, and if he can reserv a document >+ # we check the reserves of the borrower, and if he or she can reserve a document > # FIXME At this time we have a simple count of reservs, but, later, we could improve the infos "title" ... > > my $reserves_count = >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 17b2dbf..486fea4 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1234,7 +1234,7 @@ subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub { > > my ( $error, $question, $alerts ); > >- # Patron cannot issue item_1, he has overdues >+ # Patron cannot issue item_1, he or she has overdues > my $yesterday = DateTime->today( time_zone => C4::Context->tz() )->add( days => -1 ); > my $issue = AddIssue( $patron, $item_1->{barcode}, $yesterday ); # Add an overdue > >@@ -1248,7 +1248,7 @@ subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub { > is( keys(%$question) + keys(%$alerts), 0 ); > is( $error->{USERBLOCKEDOVERDUE}, 1 ); > >- # Patron cannot issue item_1, he is debarred >+ # Patron cannot issue item_1, he or she is debarred > my $tomorrow = DateTime->today( time_zone => C4::Context->tz() )->add( days => 1 ); > Koha::Patron::Debarments::AddDebarment( { borrowernumber => $patron->{borrowernumber}, expiration => $tomorrow } ); > ( $error, $question, $alerts ) = CanBookBeIssued( $patron, $item_2->{barcode} ); >@@ -1478,7 +1478,7 @@ subtest 'AddReturn + CumulativeRestrictionPeriods' => sub { > ); > $rule->store(); > >- # Patron cannot issue item_1, he has overdues >+ # Patron cannot issue item_1, he or she has overdues > my $five_days_ago = dt_from_string->subtract( days => 5 ); > my $ten_days_ago = dt_from_string->subtract( days => 10 ); > AddIssue( $patron, $item_1->{barcode}, $five_days_ago ); # Add an overdue >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 24a4a3d..12efa73 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -412,7 +412,7 @@ subtest 'add_enrolment_fee_if_needed' => sub { > ($total) = C4::Members::GetMemberAccountRecords($borrowernumber); > is( $total, > $enrolmentfee_K + $enrolmentfee_J + $enrolmentfee_YA, >- "Juvenile growing and become an young adult, he should pay " . ( $enrolmentfee_K + $enrolmentfee_J + $enrolmentfee_YA ) >+ "Juvenile growing and become an young adult, he or she should pay " . ( $enrolmentfee_K + $enrolmentfee_J + $enrolmentfee_YA ) > ); > > $patron->delete; >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index ab20156..809b252 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -535,13 +535,13 @@ C4::Biblio::ModBiblio( $record, $bibnum, $frameworkcode ); > > is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblionumber) , 'OK', "Reserving an ageRestricted Biblio without a borrower dateofbirth succeeds" ); > >-#Set the dateofbirth for the Borrower making him "too young". >+#Set the dateofbirth for the Borrower making him or her "too young". > $borrower->{dateofbirth} = DateTime->now->add( years => -15 ); > C4::Members::ModMember( borrowernumber => $borrowernumber, dateofbirth => $borrower->{dateofbirth} ); > > is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblionumber) , 'ageRestricted', "Reserving a 'PEGI 16' Biblio by a 15 year old borrower fails"); > >-#Set the dateofbirth for the Borrower making him "too old". >+#Set the dateofbirth for the Borrower making him or her "too old". > $borrower->{dateofbirth} = DateTime->now->add( years => -30 ); > C4::Members::ModMember( borrowernumber => $borrowernumber, dateofbirth => $borrower->{dateofbirth} ); > >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18432
:
62155
|
62182
|
62184
|
62336
|
62467
|
62468
| 62482 |
62483
|
62484