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

De-politicize Taiwan's name #83

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2348bfb
De-politicize Taiwan's name
stickfigure May 31, 2021
b0b48e0
Merge branch 'TakahikoKawasaki:master' into master
stickfigure Oct 25, 2021
cd4ab59
Simplify more country names
stickfigure Oct 25, 2021
7acc3ae
Update readme and prepare to publish fork
stickfigure Oct 25, 2021
1c8614f
Build at source level 7
stickfigure Oct 25, 2021
691f800
Fix test that fails due to country rename
stickfigure Oct 25, 2021
c50c0ba
Need new maven javadoc plugin to compile with source 7+
stickfigure Oct 25, 2021
8f37561
Add java version requirement to readme
stickfigure Oct 25, 2021
c6704c8
Use my publishing key, not theirs
stickfigure Oct 25, 2021
489cc23
[maven-release-plugin] prepare release nv-i18n-safe-1.29
stickfigure Oct 25, 2021
69d1a6c
[maven-release-plugin] prepare for next development iteration
stickfigure Oct 25, 2021
710bf65
[maven-release-plugin] rollback the release of nv-i18n-safe-1.29
stickfigure Oct 25, 2021
131c92b
Simplify the release config
stickfigure Oct 25, 2021
28360ba
[maven-release-plugin] prepare release nv-i18n-safe-1.29
stickfigure Oct 25, 2021
279d379
[maven-release-plugin] prepare for next development iteration
stickfigure Oct 25, 2021
f3b08e5
[maven-release-plugin] rollback the release of nv-i18n-safe-1.29
stickfigure Oct 25, 2021
b5d5f49
Bump all build plugins to latest
stickfigure Oct 25, 2021
a50c079
[maven-release-plugin] prepare release nv-i18n-safe-1.29
stickfigure Oct 25, 2021
1a9c8f6
[maven-release-plugin] prepare for next development iteration
stickfigure Oct 25, 2021
9d0f9fa
Record the annoying hack necessary to publish to maven central
stickfigure Oct 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 37 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
nv-i18n
nv-i18n-safe
=======

# Fork

nv-i18n-safe is a fork of the [neovisionaries internationalization library](https://github.com/TakahikoKawasaki/nv-i18n).
The original library uses country names which are unsuitable for display in user interfaces because they are
politically inflammatory, confusing, or excessively wordy. This fork is a drop-in replacement which tracks the origin,
but renames several countries to common names used by english-language Wikipedia. There are no other code changes.

| Old Name | New Name |
|:---------------------|:-------------------------------------------------------------|
| Taiwan, Province of China | Taiwan |
| Bolivia, Plurinational State of | Bolivia |
| Korea, Democratic People's Republic of | North Korea |
| Korea, Republic of | South Korea |
| Iran, Islamic Republic of | Iran |
| Moldova, Republic of | Moldova |
| Saint Martin (French part) | Saint Martin |
| Sint Maarten (Dutch part) | Sint Maarten |
| North Macedonia, Republic of | North Macedonia |
| Palestine, State of | Palestine |
| Russian Federation | Russia |
| Syrian Arab Republic | Syria |
| Tanzania, United Republic of | Tanzania |
| Holy See (Vatican City State) | Vatican City |
| Venezuela, Bolivarian Republic of | Venezuela |
| Kosovo, Republic of | Kosovo |

There is one difference in the build: nv-i18n-safe requires Java 7+ (as opposed to 1.5+)

The fork is maintained at https://github.com/stickfigure/nv-i18n-safe

Overview
--------

Expand Down Expand Up @@ -28,8 +58,8 @@ Maven

```xml
<dependency>
<groupId>com.neovisionaries</groupId>
<artifactId>nv-i18n</artifactId>
<groupId>com.voodoodyne</groupId>
<artifactId>nv-i18n-safe</artifactId>
<version>1.29</version>
</dependency>
```
Expand All @@ -40,22 +70,22 @@ Gradle

```gradle
dependencies {
compile 'com.neovisionaries:nv-i18n:1.28'
compile 'com.voodoodyne:nv-i18n-safe:1.29'
}
```


OSGi
----

Bundle-SymbolicName: com.neovisionaries.i18n
Export-Package: com.neovisionaries.i18n;version="1.28.0"
Bundle-SymbolicName: com.voodoodyne.i18n
Export-Package: com.voodoodyne.i18n;version="1.29.0"


Source Code
-----------

<code>https://github.com/TakahikoKawasaki/nv-i18n.git</code>
<code>https://github.com/stickfigure/nv-i18n-safe.git</code>


JavaDoc
Expand Down
53 changes: 25 additions & 28 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<modelVersion>4.0.0</modelVersion>

<groupId>com.neovisionaries</groupId>
<artifactId>nv-i18n</artifactId>
<groupId>com.voodoodyne</groupId>
<artifactId>nv-i18n-safe</artifactId>
<version>1.30-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Neo Visionaries Internationalization Package</name>
<name>Neo Visionaries Internationalization Package (safe)</name>
<description>Package to support internationalization</description>
<url>https://github.com/TakahikoKawasaki/nv-i18n</url>
<url>https://github.com/stickfigure/nv-i18n-safe</url>

<licenses>
<license>
Expand All @@ -24,9 +24,9 @@
</developers>

<scm>
<connection>scm:git:[email protected]:TakahikoKawasaki/nv-i18n.git</connection>
<developerConnection>scm:git:[email protected]:TakahikoKawasaki/nv-i18n.git</developerConnection>
<url>[email protected]:TakahikoKawasaki/nv-i18n.git</url>
<connection>scm:git:[email protected]:stickfigure/nv-i18n-safe.git</connection>
<developerConnection>scm:git:[email protected]:stickfigure/nv-i18n-safe.git</developerConnection>
<url>[email protected]:stickfigure/nv-i18n-safe.git</url>
<tag>HEAD</tag>
</scm>

Expand Down Expand Up @@ -66,8 +66,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<additionalparam>-Xdoclint:-html</additionalparam>
<doclint>none</doclint>
</configuration>
</plugin>
<plugin>
Expand All @@ -79,7 +80,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:-html</additionalparam>
<doclint>none</doclint>
</configuration>
</plugin>
</reportPlugins>
Expand All @@ -95,18 +96,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<version>3.8.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>7</source>
<target>7</target>
<fork>true</fork>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.3</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -120,7 +121,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<version>3.2.0</version>
<configuration>
<additionalJOption>-J-Duser.language=en</additionalJOption>
</configuration>
Expand All @@ -137,20 +138,25 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<version>3.2.0</version>
<configuration>
<archive>
<manifestEntries>
<Built-By>Neo Visionaries Inc.</Built-By>
<!-- <Built-By>Neo Visionaries Inc.</Built-By>-->
</manifestEntries>
</archive>
</configuration>
</plugin>

<!--
This hack is required to publish to maven central using a modern JDK:
https://issues.sonatype.org/browse/OSSRH-66257
-->

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.4</version>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>darutk</serverId>
Expand All @@ -162,29 +168,20 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
<version>3.0.0-M4</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>E3F58E5C</keyname>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
34 changes: 17 additions & 17 deletions src/main/java/com/neovisionaries/i18n/CountryCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#BO">BO</a>, BOL, 68,
* Officially assigned]
*/
BO("Bolivia, Plurinational State of", "BOL", 68, Assignment.OFFICIALLY_ASSIGNED),
BO("Bolivia", "BOL", 68, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Caribbean_Netherlands">Bonaire, Sint Eustatius and Saba</a>
Expand Down Expand Up @@ -1029,7 +1029,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#IR">IR</a>, IRN, 364,
* Officially assigned]
*/
IR("Iran, Islamic Republic of", "IRN", 364, Assignment.OFFICIALLY_ASSIGNED),
IR("Iran", "IRN", 364, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Iceland">Iceland</a>
Expand Down Expand Up @@ -1134,14 +1134,14 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#KP">KP</a>, PRK, 408,
* Officially assigned]
*/
KP("Korea, Democratic People's Republic of", "PRK", 408, Assignment.OFFICIALLY_ASSIGNED),
KP("North Korea", "PRK", 408, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/South_Korea">Korea, Republic of</a>
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#KR">KR</a>, KOR, 410,
* Officially assigned]
*/
KR("Korea, Republic of", "KOR", 410, Assignment.OFFICIALLY_ASSIGNED)
KR("South Korea", "KOR", 410, Assignment.OFFICIALLY_ASSIGNED)
{
@Override
public Locale toLocale()
Expand Down Expand Up @@ -1267,7 +1267,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#MD">MD</a>, MDA, 498,
* Officially assigned]
*/
MD("Moldova, Republic of", "MDA", 498, Assignment.OFFICIALLY_ASSIGNED),
MD("Moldova", "MDA", 498, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Montenegro">Montenegro</a>
Expand All @@ -1281,7 +1281,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#MF">MF</a>, MAF, 663,
* Officially assigned]
*/
MF("Saint Martin (French part)", "MAF", 663, Assignment.OFFICIALLY_ASSIGNED),
MF("Saint Martin", "MAF", 663, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Madagascar">Madagascar</a>
Expand All @@ -1302,7 +1302,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#MK">MK</a>, MKD, 807,
* Officially assigned]
*/
MK("North Macedonia, Republic of", "MKD", 807, Assignment.OFFICIALLY_ASSIGNED),
MK("North Macedonia", "MKD", 807, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Mali">Mali</a>
Expand Down Expand Up @@ -1589,7 +1589,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#PS">PS</a>, PSE, 275,
* Officially assigned]
*/
PS("Palestine, State of", "PSE", 275, Assignment.OFFICIALLY_ASSIGNED),
PS("Palestine", "PSE", 275, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Portugal">Portugal</a>
Expand Down Expand Up @@ -1645,7 +1645,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#RU">RU</a>, RUS, 643,
* Officially assigned]
*/
RU("Russian Federation", "RUS", 643, Assignment.OFFICIALLY_ASSIGNED),
RU("Russia", "RUS", 643, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Rwanda">Rwanda</a>
Expand Down Expand Up @@ -1805,14 +1805,14 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#SX">SX</a>, SXM, 534,
* Officially assigned]
*/
SX("Sint Maarten (Dutch part)", "SXM", 534, Assignment.OFFICIALLY_ASSIGNED),
SX("Sint Maarten", "SXM", 534, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Syria">Syrian Arab Republic</a>
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#SY">SY</a>, SYR, 760,
* Officially assigned]
*/
SY("Syrian Arab Republic", "SYR", 760, Assignment.OFFICIALLY_ASSIGNED),
SY("Syria", "SYR", 760, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Eswatini">Eswatini</a>
Expand Down Expand Up @@ -1947,11 +1947,11 @@ public Locale toLocale()
TV("Tuvalu", "TUV", 798, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Taiwan">Taiwan, Province of China</a>
* <a href="http://en.wikipedia.org/wiki/Taiwan">Taiwan</a>
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#TW">TW</a>, TWN, 158,
* Officially assigned]
*/
TW("Taiwan, Province of China", "TWN", 158, Assignment.OFFICIALLY_ASSIGNED)
TW("Taiwan", "TWN", 158, Assignment.OFFICIALLY_ASSIGNED)
{
@Override
public Locale toLocale()
Expand All @@ -1965,7 +1965,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#TZ">TZ</a>, TZA, 834,
* Officially assigned]
*/
TZ("Tanzania, United Republic of", "TZA", 834, Assignment.OFFICIALLY_ASSIGNED),
TZ("Tanzania", "TZA", 834, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Ukraine">Ukraine</a>
Expand Down Expand Up @@ -2041,7 +2041,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#VA">VA</a>, VAT, 336,
* Officially assigned]
*/
VA("Holy See (Vatican City State)", "VAT", 336, Assignment.OFFICIALLY_ASSIGNED),
VA("Vatican City", "VAT", 336, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Saint_Vincent_and_the_Grenadines">Saint Vincent and the Grenadines</a>
Expand All @@ -2055,7 +2055,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#VE">VE</a>, VEN, 862,
* Officially assigned]
*/
VE("Venezuela, Bolivarian Republic of", "VEN", 862, Assignment.OFFICIALLY_ASSIGNED),
VE("Venezuela", "VEN", 862, Assignment.OFFICIALLY_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/British_Virgin_Islands">Virgin Islands, British</a>
Expand Down Expand Up @@ -2122,7 +2122,7 @@ public Locale toLocale()
* [<a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#XK">XK</a>, XXK, -1,
* User assigned]
*/
XK("Kosovo, Republic of", "XKX", -1, Assignment.USER_ASSIGNED),
XK("Kosovo", "XKX", -1, Assignment.USER_ASSIGNED),

/**
* <a href="http://en.wikipedia.org/wiki/Yemen">Yemen</a>
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/neovisionaries/i18n/CountryCodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void test1()
{
List<CountryCode> list = CountryCode.findByName(".*United.*");

assertEquals(7, list.size());
assertEquals(6, list.size());

// AE: United Arab Emirates
assertTrue(list.contains(CountryCode.AE));
Expand All @@ -44,7 +44,7 @@ public void test1()
assertTrue(list.contains(CountryCode.GB));

// TZ: Tanzania, United Republic of
assertTrue(list.contains(CountryCode.TZ));
//assertTrue(list.contains(CountryCode.TZ));

// UK: United Kingdom
assertTrue(list.contains(CountryCode.UK));
Expand Down