Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double-barrelled names #6

Closed
sebastfr opened this issue Jun 25, 2013 · 5 comments
Closed

Double-barrelled names #6

sebastfr opened this issue Jun 25, 2013 · 5 comments
Assignees
Milestone

Comments

@sebastfr
Copy link
Contributor

@sebastfr sebastfr commented Jun 25, 2013

If a name contains a hyphen like “Hans-ulrich” the name part after the hyphen is changed to lower case.

Probably because names are normalised for display and double-barrelled names are not in the regexp. TODO...

@ghost ghost assigned sebastfr Jun 25, 2013
@sebastfr
Copy link
Contributor Author

@sebastfr sebastfr commented Mar 19, 2014

Also, as reported by Matt @usq:

Top Authors grid, within the default ‘main’ report displays first letter capitalised for given and family, Ignoring Initials etc,.

@jiadiyao
Copy link
Contributor

@jiadiyao jiadiyao commented Apr 2, 2014

The following solution renders the author names as the one stored in the creator's field:

In Sets.pm
sub normalise_name
Change:

return EPrints::Utils::is_set( $g ) ? (ucfirst( lc( $f ) ) ).", ".ucfirst( lc( $g ) ) : ucfirst( lc( $f ) );

to
return EPrints::Utils::is_set( $g ) ? (ucfirst( lc( $f ) ) ).", ".$g: ucfirst( lc( $f ) );

This removes the deliberate action of lower casing the tail part of the given name.

Names with two initials, e.g. Hooper, TJ would not rendered as Hooper, Tj

@sebastfr
Copy link
Contributor Author

@sebastfr sebastfr commented May 23, 2014

From Christian / ep-tech:

The patch only deals with given names:

Before applying the patch
Martínez robles, Juan pablo

After
Martínez robles, Juan Pablo

@sebastfr
Copy link
Contributor Author

@sebastfr sebastfr commented May 23, 2014

Following graingert's suggestion, there's also http://search.cpan.org/~summer/Lingua-EN-NameCase-1.15/NameCase.pm (ubuntu: sudo apt-get install liblingua-en-namecase-perl)

Sets.pm - line 9:
use Lingua::EN::NameCase qw( nc );

Sets.pm - line 433:
return nc( "$f, $g" );

Then re-generate the stats' sets (bin/stats/process_stats --sets-only --verbose) and probably restart Apache.

sebastfr pushed a commit that referenced this issue May 30, 2014
@jiadiyao jiadiyao closed this Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants