Skip to content

Commit 7f34bd6

Browse files
author
Luther Tychonievich
committed
remove IANA language collisions
1 parent 72cf285 commit 7f34bd6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

DownloadDefinitions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ private static void downloadIANALanguageSubtagRegistery(String filename) {
3636
else if (line.startsWith("Subtag: ")) tag = line.substring(8);
3737
else if (isLang && line.startsWith("Description: ")) {
3838
String key = line.substring(13);
39+
// key = key.replaceAll(" \\(.*", ""); // change "Modern Greek (1453-)" to "Modern Greek" but also conflates arr "Karo (Brazil)" and kxh "Karo (Ethiopia)" so disabled for now
40+
key = key.replaceAll(" language.*", ""); // change "Bihari languages" to "Bihari"
3941
fos.write((key+"\t"+tag+"\n").getBytes("UTF-8"));
4042
}
4143
}

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ Some parts are ported directly from the C converter (such as the ANSEL Charset a
55

66
# Updating to new versions of GEDCOM
77

8-
The file `edu/virginia/ged5to7/GedcomDefinitions.java` contains preprocessed copies of the TSV files from <https://github.com/FamilySearch/GEDCOM/tree/main/extracted-files>. When a new (minor or major) version of the spec is released, updates to those files will need to be incorporated by running
8+
The file `edu/virginia/ged5to7/config/` contains copies of the TSV files
9+
from <https://github.com/FamilySearch/GEDCOM/>,
10+
<https://github.com/fhiso/legacy-format/>,
11+
and <https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry>.
12+
These can be updated by running
913

1014
```bash
1115
javac DownloadDefinitions.java
1216
java DownloadDefinitions
1317
```
1418

15-
The above will overwrite the file `edu/virginia/ged5to7/GedcomDefinitions.java` with an updated version.
19+
The above will overwrite the files in `edu/virginia/ged5to7/config/` with updated versions.
1620

1721
`DownloadDefinitions.java` is otherwise unneeded, and should not be included in distributions of the ged5to7 package.
1822

0 commit comments

Comments
 (0)