Skip to content

Commit f5744ec

Browse files
Fixes #37 (#38)
Some small adjustments to the codebase Some states now have null statecodes (for example Aland Islands), we ignore populating statecode maps for this now Rebuilt location4j.bin
1 parent aea3e41 commit f5744ec

File tree

10 files changed

+25042
-22558
lines changed

10 files changed

+25042
-22558
lines changed

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/csv-editor.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

buildtools/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ mvn exec:java -Dexec.mainClass="com.tomaytotomato.JsonToBinaryConverter"
1919
This will generate a new location4j.bin file in the library's resources
2020
folder - [library/src/main/resources](library/src/main/resources)
2121

22+
## Note
23+
24+
Ivory Coast - Country might not be fixed and will require manual editing as it has a `null` nativename
25+
26+
See this pull request here - https://github.com/dr5hn/countries-states-cities-database/pull/979
27+
2228
## Credits 🙏
2329

2430
Country data sourced

buildtools/src/main/java/com/tomaytotomato/JsonToBinaryConverter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ private static String fixJSONPropertyNames(String jsonString) {
8181
// Use String::replace for simple string replacements
8282
var modifiedJson = jsonString.replace("\"native\"", "\"native_name\"");
8383
modifiedJson = modifiedJson.replace("\"zoneName\"", "\"zone_name\"");
84+
modifiedJson = modifiedJson.replace("\"phonecode\"", "\"phone_code\"");
8485
modifiedJson = modifiedJson.replace("\"gmtOffset\"", "\"gmt_offset\"");
8586
modifiedJson = modifiedJson.replace("\"gmtOffsetName\"", "\"gmt_offset_name\"");
8687
modifiedJson = modifiedJson.replace("\"tzName\"", "\"tz_name\"");

0 commit comments

Comments
 (0)