equal
deleted
inserted
replaced
48 private final static Map<String, Bundle> bundles = new HashMap<>(); |
48 private final static Map<String, Bundle> bundles = new HashMap<>(); |
49 |
49 |
50 private final static String[] NUMBER_PATTERN_KEYS = { |
50 private final static String[] NUMBER_PATTERN_KEYS = { |
51 "NumberPatterns/decimal", |
51 "NumberPatterns/decimal", |
52 "NumberPatterns/currency", |
52 "NumberPatterns/currency", |
53 "NumberPatterns/percent" |
53 "NumberPatterns/percent", |
|
54 "NumberPatterns/accounting" |
54 }; |
55 }; |
55 |
56 |
56 private final static String[] COMPACT_NUMBER_PATTERN_KEYS = { |
57 private final static String[] COMPACT_NUMBER_PATTERN_KEYS = { |
57 "short.CompactNumberPatterns", |
58 "short.CompactNumberPatterns", |
58 "long.CompactNumberPatterns"}; |
59 "long.CompactNumberPatterns"}; |
220 String key = NUMBER_PATTERN_KEYS[i]; |
221 String key = NUMBER_PATTERN_KEYS[i]; |
221 String value = (String) myMap.remove(key); |
222 String value = (String) myMap.remove(key); |
222 if (value == null) { |
223 if (value == null) { |
223 value = (String) parentsMap.remove(key); |
224 value = (String) parentsMap.remove(key); |
224 } |
225 } |
225 if (value.length() == 0) { |
226 if (value == null || value.isEmpty()) { |
226 CLDRConverter.warning("empty pattern for " + key); |
227 if (!key.endsWith("accounting")) { |
|
228 // print warning unless it is for "accounting", |
|
229 // which may be missing. |
|
230 CLDRConverter.warning("empty pattern for " + key); |
|
231 } |
227 } |
232 } |
228 numberPatterns[i] = value; |
233 numberPatterns[i] = value; |
229 } |
234 } |
230 myMap.put("NumberPatterns", numberPatterns); |
235 myMap.put("NumberPatterns", numberPatterns); |
231 break; |
236 break; |