Re: [5/7] [text] salutations: Name constructor is now public for testing.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [5/7] [text] salutations: Name constructor is now public for testing.

Benedikt Ritter-4
Hello Bruno,

it just came to my mind, that it would probably be good to use
java.util.ResourceBundle for defining the salutations et al. This way
translations can easily be added by users.

WDYT?

Benedikt

<[hidden email]> schrieb am So. 20. Nov. 2016 um 07:57:

> salutations: Name constructor is now public for testing.
>
>
> Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/commons-text/commit/cd92a0ea
> Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/cd92a0ea
> Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/cd92a0ea
>
> Branch: refs/heads/master
> Commit: cd92a0eacc7c0f37fe2e52ea94eb41c522012f06
> Parents: f666403
> Author: Tom MacKenzie <[hidden email]>
> Authored: Mon Jun 20 14:53:40 2016 -0500
> Committer: Tom MacKenzie <[hidden email]>
> Committed: Mon Jun 20 14:53:40 2016 -0500
>
> ----------------------------------------------------------------------
>  src/main/java/org/apache/commons/text/names/Name.java | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/commons-text/blob/cd92a0ea/src/main/java/org/apache/commons/text/names/Name.java
> ----------------------------------------------------------------------
> diff --git a/src/main/java/org/apache/commons/text/names/Name.java
> b/src/main/java/org/apache/commons/text/names/Name.java
> index ef3d36a..00850d1 100644
> --- a/src/main/java/org/apache/commons/text/names/Name.java
> +++ b/src/main/java/org/apache/commons/text/names/Name.java
> @@ -33,7 +33,7 @@ public final class Name {
>      private final String lastName;
>      private final String suffix;
>
> -    Name(String leadingInitial, String salutation, String firstName,
> String nickName, String middleName, String lastName, String suffix) {
> +    public Name(String leadingInitial, String salutation, String
> firstName, String nickName, String middleName, String lastName, String
> suffix) {
>          this.leadingInitial = leadingInitial;
>          this.salutation = salutation;
>          this.firstName = firstName;
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [5/7] [text] salutations: Name constructor is now public for testing.

Bruno P. Kinoshita-3
Hello Benedikt,

That sounds like a good idea. I never used java.util.ResourceBundle, but the first paragraph in
the javadoc clearly shows it can be helpful for the salutations, nicknames, etc.

Will add a comment to TEXT-16 with a link to the Javadocs.

Thanks!
Bruno




----- Original Message -----

> From: Benedikt Ritter <[hidden email]>
> To: [hidden email]; [hidden email]
> Sent: Sunday, 20 November 2016 9:57 PM
> Subject: Re: [5/7] [text] salutations: Name constructor is now public for testing.
>
> Hello Bruno,
>
> it just came to my mind, that it would probably be good to use
> java.util.ResourceBundle for defining the salutations et al. This way
> translations can easily be added by users.
>
> WDYT?
>
> Benedikt
>
>
> <[hidden email]> schrieb am So. 20. Nov. 2016 um 07:57:
>
>>  salutations: Name constructor is now public for testing.
>>
>>
>>  Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
>>  Commit:
>>  http://git-wip-us.apache.org/repos/asf/commons-text/commit/cd92a0ea
>>  Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/cd92a0ea
>>  Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/cd92a0ea
>>
>>  Branch: refs/heads/master
>>  Commit: cd92a0eacc7c0f37fe2e52ea94eb41c522012f06
>>  Parents: f666403
>>  Author: Tom MacKenzie <[hidden email]>
>>  Authored: Mon Jun 20 14:53:40 2016 -0500
>>  Committer: Tom MacKenzie <[hidden email]>
>>  Committed: Mon Jun 20 14:53:40 2016 -0500
>>
>>  ----------------------------------------------------------------------
>>   src/main/java/org/apache/commons/text/names/Name.java | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>  ----------------------------------------------------------------------
>>
>>
>>
>>
> http://git-wip-us.apache.org/repos/asf/commons-text/blob/cd92a0ea/src/main/java/org/apache/commons/text/names/Name.java
>>  ----------------------------------------------------------------------
>>  diff --git a/src/main/java/org/apache/commons/text/names/Name.java
>>  b/src/main/java/org/apache/commons/text/names/Name.java
>>  index ef3d36a..00850d1 100644
>>  --- a/src/main/java/org/apache/commons/text/names/Name.java
>>  +++ b/src/main/java/org/apache/commons/text/names/Name.java
>>  @@ -33,7 +33,7 @@ public final class Name {
>>       private final String lastName;
>>       private final String suffix;
>>
>>  -    Name(String leadingInitial, String salutation, String firstName,
>>  String nickName, String middleName, String lastName, String suffix) {
>>  +    public Name(String leadingInitial, String salutation, String
>>  firstName, String nickName, String middleName, String lastName, String
>>  suffix) {
>>           this.leadingInitial = leadingInitial;
>>           this.salutation = salutation;
>>           this.firstName = firstName;
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]