Skip to content

Commit

Permalink
CLDR-16595 Add DisplayAndInputProcessor to normalize Kashmiri YEH WIT…
Browse files Browse the repository at this point in the history
…H TAIL -> KASHMIRI YEH
  • Loading branch information
Manishearth committed Nov 3, 2023
1 parent 12380e8 commit 81e2656
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public class DisplayAndInputProcessor {
private static final CLDRLocale GERMAN_SWITZERLAND = CLDRLocale.getInstance("de_CH");
private static final CLDRLocale SWISS_GERMAN = CLDRLocale.getInstance("gsw");
private static final CLDRLocale FF_ADLAM = CLDRLocale.getInstance("ff_Adlm");
private static final CLDRLocale KASHMIRI = CLDRLocale.getInstance("ks");
public static final Set<String> LANGUAGES_USING_MODIFIER_APOSTROPHE =
new HashSet<>(
Arrays.asList(
Expand Down Expand Up @@ -223,6 +224,8 @@ public class DisplayAndInputProcessor {

private static final char[][] URDU_PLUS_CONVERSIONS = {{'\u0643', '\u06A9'}}; // wrong char

private static final char[][] KASHMIRI_CONVERSIONS = {{'ۍ', 'ؠ'}}; // wrong char (see CLDR-16595)

private static final ZawgyiDetector detector = new ZawgyiDetector();
private static final Transliterator zawgyiUnicodeTransliterator =
Transliterator.getInstance("Zawgyi-my");
Expand Down Expand Up @@ -598,6 +601,8 @@ private String processLocaleSpecificInput(String path, String value, boolean isU
value = replaceChars(path, value, URDU_PLUS_CONVERSIONS, true);
} else if (locale.childOf(FF_ADLAM) && !isUnicodeSet) {
value = fixAdlamNasalization(value);
} else if (locale.childOf(KASHMIRI)) {
value = replaceChars(path, value, KASHMIRI_CONVERSIONS, false);
}
return value;
}
Expand Down

0 comments on commit 81e2656

Please sign in to comment.