Created
March 14, 2014 11:24
-
-
Save jjgod/9545982 to your computer and use it in GitHub Desktop.
Patch to CLDR Java tool from unicode.org/cldr/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: org/unicode/cldr/icu/NewLdml2IcuConverter.java | |
=================================================================== | |
--- org/unicode/cldr/icu/NewLdml2IcuConverter.java (revision 9961) | |
+++ org/unicode/cldr/icu/NewLdml2IcuConverter.java (working copy) | |
@@ -84,7 +84,8 @@ | |
.add("filter", 'f', null, null, "Perform filtering on the locale data to be converted.") | |
.add("organization", 'o', ".*", null, "The organization to filter the data for") | |
.add("makefile", 'g', ".*", null, "If set, generates makefiles and alias files for the specified type. " + | |
- "The value to set should be the name of the makefile."); | |
+ "The value to set should be the name of the makefile.") | |
+ .add("draftstatus", 'r', "\\w+", null, "Required draftstatus to gather data from CLDR source."); | |
private static final String LOCALES_DIR = "locales"; | |
@@ -158,7 +159,7 @@ | |
} | |
Type type = Type.valueOf(options.get("type").getValue()); | |
keepTogether = options.get("keeptogether").doesOccur(); | |
- if (!keepTogether && type == Type.supplementalData || type == Type.locales) { | |
+ if (!keepTogether && (type == Type.supplementalData || type == Type.locales)) { | |
if (splitInfos == null) { | |
splitInfos = loadSplitInfoFromFile(); | |
} | |
@@ -231,7 +232,12 @@ | |
throw new IllegalArgumentException("Supplemental directory must be specified."); | |
} | |
- Factory factory = Factory.make(sourceDir, ".*", DraftStatus.contributed); | |
+ DraftStatus draftStatus = DraftStatus.contributed; | |
+ option = options.get("draftstatus"); | |
+ if (option.doesOccur()) | |
+ draftStatus = DraftStatus.forString(option.getValue()); | |
+ | |
+ Factory factory = Factory.make(sourceDir, ".*", draftStatus); | |
String organization = options.get("organization").getValue(); | |
LocaleMapper localeMapper = new LocaleMapper(factory, specialFactory, | |
supplementalDataInfo, options.get("filter").doesOccur(), organization); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment