Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 898a319d authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Fix Catalan and Polish hyphenation.

After I7e2ece979181d12ac1adbede14995ec9b7b87d21, the special hyphenation
logic for Catalan and Policy was not working.

Bug: 65024629
Bug: 67702053
Test: N/A
Change-Id: I985253e24cf0ce4e537c01074e75054381a7816a
parent ee1e5ab2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ public class Hyphenator {
            final String patternFilename = "hyph-" + languageTag.toLowerCase(Locale.US) + ".hyb";
            final File patternFile = new File(SYSTEM_HYPHENATOR_LOCATION, patternFilename);
            if (!patternFile.canRead()) {
                Log.e(TAG, "hyphenation patterns for " + patternFile + " not found or unreadable");
                mDataAddress = 0;
            } else {
                long address;
@@ -230,6 +229,11 @@ public class Hyphenator {
            loadData("tk", 2, 2); // Turkmen
            loadData("und-Ethi", 1, 1); // Any language in Ethiopic script

            // Following two hyphenators do not have pattern files but there is some special logic
            // based on language.
            loadData("ca", 2, 2);  // Catalan
            loadData("pl", 2, 2);  // Polish

            // English locales that fall back to en-US. The data is
            // from CLDR. It's all English locales, minus the locales whose
            // parent is en-001 (from supplementalData.xml, under <parentLocales>).
@@ -267,7 +271,7 @@ public class Hyphenator {
        }
    };

    private static native long nBuildHyphenator(/* non-zero */ long dataAddress,
    private static native long nBuildHyphenator(long dataAddress,
            @NonNull String langTag, @IntRange(from = 1) int minPrefix,
            @IntRange(from = 1) int minSuffix);
}