Commit daa4c1c0 by tonihei Committed by Ian Baker

Add language normalization for "arb" (Standard Arabic)

This is an individual language (ISO 639-3) part of the Arabic
macrolanguage ("ar" in ISO 639-1). Add this mapping to our
existing list similar to other individual to macrolanguage
mappings we have already.

Issue: Issue: google/ExoPlayer#10255
PiperOrigin-RevId: 448911950
parent df1b733d
......@@ -2719,6 +2719,7 @@ public final class Util {
"ji", "yi",
// Individual macrolanguage codes mapped back to full macrolanguage code.
// See https://en.wikipedia.org/wiki/ISO_639_macrolanguage
"arb", "ar-arb",
"in", "ms-ind",
"ind", "ms-ind",
"nb", "no-nob",
......
......@@ -1162,6 +1162,7 @@ public class UtilTest {
assertThat(Util.normalizeLanguageCode("ara-ayl")).isEqualTo("ar-ayl");
// Special case of short codes that are actually part of a macrolanguage.
assertThat(Util.normalizeLanguageCode("arb")).isEqualTo("ar-arb");
assertThat(Util.normalizeLanguageCode("nb")).isEqualTo("no-nob");
assertThat(Util.normalizeLanguageCode("nn")).isEqualTo("no-nno");
assertThat(Util.normalizeLanguageCode("nob")).isEqualTo("no-nob");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment