language: use internal/language/compact This exposes all the internal compact IDs within x/text but not outside. Change-Id: I3c5e63f26a3e2774e70fdb48390522f444a850ae Reviewed-on: https://go-review.googlesource.com/96639 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ross Light <light@google.com>
diff --git a/internal/language/compact/language.go b/internal/language/compact/language.go index 415b55e..ecae6dd 100644 --- a/internal/language/compact/language.go +++ b/internal/language/compact/language.go
@@ -19,6 +19,7 @@ // specific language or locale. All language tag values are guaranteed to be // well-formed. type Tag struct { + // NOTE: exported tags will become part of the public API. language ID locale ID full fullTag // always a language.Tag for now. @@ -135,9 +136,6 @@ return t.language, t.full == nil } -// TODO: make these functions and methods public once we settle on the API and -// - // RegionalID returns the ID for the regional variant of this tag. This index is // used to indicate region-specific overrides, such as default currency, default // calendar and week data, default time cycle, and default measurement system
diff --git a/internal/language/compact/language_test.go b/internal/language/compact/language_test.go index 4b1eea1..57fd13f 100644 --- a/internal/language/compact/language_test.go +++ b/internal/language/compact/language_test.go
@@ -27,6 +27,22 @@ } } +func TestNoPublic(t *testing.T) { + noExportedField(t, reflect.TypeOf(Tag{})) +} + +func noExportedField(t *testing.T, typ reflect.Type) { + for i := 0; i < typ.NumField(); i++ { + f := typ.Field(i) + if f.PkgPath == "" { + t.Errorf("Tag may not have exported fields, but has field %q", f.Name) + } + if f.Anonymous { + noExportedField(t, f.Type) + } + } +} + func TestEquality(t *testing.T) { for i, tt := range parseTests() { s := tt.in
diff --git a/language/compact.go b/language/compact.go deleted file mode 100644 index a9941cc..0000000 --- a/language/compact.go +++ /dev/null
@@ -1,45 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package language - -import ( - "sort" - "strings" - - "golang.org/x/text/internal/language" -) - -type compactID uint16 - -func getCoreIndex(t language.Tag) (id compactID, ok bool) { - cci, ok := language.GetCompactCore(t) - if !ok { - return 0, false - } - i := sort.Search(len(coreTags), func(i int) bool { - return cci <= coreTags[i] - }) - if i == len(coreTags) || coreTags[i] != cci { - return 0, false - } - return compactID(i), true -} - -func (c compactID) tag() language.Tag { - if int(c) >= len(coreTags) { - return specialTags[int(c)-len(coreTags)] - } - return coreTags[c].Tag() -} - -var specialTags []language.Tag - -func init() { - tags := strings.Split(specialTagsStr, " ") - specialTags = make([]language.Tag, len(tags)) - for i, t := range tags { - specialTags[i] = language.MustParse(t) - } -}
diff --git a/language/gen.go b/language/gen.go index b1a35da..3004eb4 100644 --- a/language/gen.go +++ b/language/gen.go
@@ -38,13 +38,10 @@ w := gen.NewCodeWriter() defer w.WriteGoFile("tables.go", "language") - fmt.Fprintln(w, `import "golang.org/x/text/internal/language"`) - b := newBuilder(w) gen.WriteCLDRVersion(w) b.writeConstants() - b.writeCompactIndex() b.writeMatchData() }
diff --git a/language/gen_index.go b/language/gen_index.go deleted file mode 100644 index 2a84a91..0000000 --- a/language/gen_index.go +++ /dev/null
@@ -1,108 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -// This file generates derivative tables based on the language package itself. - -import ( - "fmt" - "log" - "sort" - "strings" - - "golang.org/x/text/internal/language" -) - -// Compact indices: -// Note -va-X variants only apply to localization variants. -// BCP variants only ever apply to language. -// The only ambiguity between tags is with regions. - -func (b *builder) writeCompactIndex() { - // Collect all language tags for which we have any data in CLDR. - m := map[language.Tag]bool{} - for _, lang := range b.data.Locales() { - // We include all locales unconditionally to be consistent with en_US. - // We want en_US, even though it has no data associated with it. - - // TODO: put any of the languages for which no data exists at the end - // of the index. This allows all components based on ICU to use that - // as the cutoff point. - // if x := data.RawLDML(lang); false || - // x.LocaleDisplayNames != nil || - // x.Characters != nil || - // x.Delimiters != nil || - // x.Measurement != nil || - // x.Dates != nil || - // x.Numbers != nil || - // x.Units != nil || - // x.ListPatterns != nil || - // x.Collations != nil || - // x.Segmentations != nil || - // x.Rbnf != nil || - // x.Annotations != nil || - // x.Metadata != nil { - - // TODO: support POSIX natively, albeit non-standard. - tag := language.Make(strings.Replace(lang, "_POSIX", "-u-va-posix", 1)) - m[tag] = true - // } - } - // Include locales for plural rules, which uses a different structure. - for _, plurals := range b.supp.Plurals { - for _, rules := range plurals.PluralRules { - for _, lang := range strings.Split(rules.Locales, " ") { - m[language.Make(lang)] = true - } - } - } - - var coreTags []language.CompactCoreInfo - var special []string - - for t := range m { - if x := t.Extensions(); len(x) != 0 && fmt.Sprint(x) != "[u-va-posix]" { - log.Fatalf("Unexpected extension %v in %v", x, t) - } - if len(t.Variants()) == 0 && len(t.Extensions()) == 0 { - cci, ok := language.GetCompactCore(t) - if !ok { - log.Fatalf("Locale for non-basic language %q", t) - } - coreTags = append(coreTags, cci) - } else { - special = append(special, t.String()) - } - } - - w := b.w - - sort.Slice(coreTags, func(i, j int) bool { return coreTags[i] < coreTags[j] }) - sort.Strings(special) - - w.WriteComment(` - NumCompactTags is the number of common tags. The maximum tag is - NumCompactTags-1.`) - w.WriteConst("NumCompactTags", len(m)) - - fmt.Fprintln(w, "const (") - for i, t := range coreTags { - fmt.Fprintf(w, "%s compactID = %d\n", ident(t.Tag().String()), i) - } - for i, t := range special { - fmt.Fprintf(w, "%s compactID = %d\n", ident(t), i+len(coreTags)) - } - fmt.Fprintln(w, ")") - - w.WriteVar("coreTags", coreTags) - - w.WriteConst("specialTagsStr", strings.Join(special, " ")) -} - -func ident(s string) string { - return strings.Replace(s, "-", "", -1) + "Index" -}
diff --git a/language/language.go b/language/language.go index 25fd210..f892354 100644 --- a/language/language.go +++ b/language/language.go
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:generate go run gen.go gen_index.go -output tables.go +//go:generate go run gen.go -output tables.go package language @@ -13,67 +13,24 @@ "strings" "golang.org/x/text/internal/language" + "golang.org/x/text/internal/language/compact" ) // Tag represents a BCP 47 language tag. It is used to specify an instance of a // specific language or locale. All language tag values are guaranteed to be // well-formed. -type Tag struct { - language compactID - locale compactID - full fullTag // always a language.Tag for now. -} - -type fullTag interface { - IsRoot() bool - Parent() language.Tag -} +type Tag compact.Tag func makeTag(t language.Tag) (tag Tag) { - if region := t.TypeForKey("rg"); len(region) == 6 && region[2:] == "zzzz" { - if r, err := language.ParseRegion(region[:2]); err == nil { - tFull := t - t, _ = t.SetTypeForKey("rg", "") - // TODO: should we not consider "va" for the language tag? - var exact1, exact2 bool - tag.language, exact1 = compactIndex(t) - t.RegionID = r - tag.locale, exact2 = compactIndex(t) - if !exact1 || !exact2 { - tag.full = tFull - } - return tag - } - } - lang, ok := compactIndex(t) - tag.language = lang - tag.locale = lang - if !ok { - tag.full = t - } - return tag + return Tag(compact.Make(t)) } func (t *Tag) tag() language.Tag { - if t.full != nil { - return t.full.(language.Tag) - } - tag := t.language.tag() - if t.language != t.locale { - loc := t.locale.tag() - tag, _ = tag.SetTypeForKey("rg", strings.ToLower(loc.RegionID.String())+"zzzz") - } - return tag + return (*compact.Tag)(t).Tag() } -func (t *Tag) mayHaveVariants() bool { - return t.full != nil || int(t.language) >= len(coreTags) -} - -func (t *Tag) mayHaveExtensions() bool { - return t.full != nil || - int(t.language) >= len(coreTags) || - t.language != t.locale +func (t *Tag) isCompact() bool { + return (*compact.Tag)(t).IsCompact() } // TODO: improve performance. @@ -103,10 +60,7 @@ // IsRoot returns true if t is equal to language "und". func (t Tag) IsRoot() bool { - if t.full != nil { - return t.full.IsRoot() - } - return t.language == _und + return compact.Tag(t).IsRoot() } // CanonType can be used to enable or disable various types of canonicalization. @@ -233,8 +187,8 @@ // Canonicalize returns the canonicalized equivalent of the tag. func (c CanonType) Canonicalize(t Tag) (Tag, error) { // First try fast path. - if t.full == nil { - if _, changed := canonicalize(c, t.language.tag()); !changed { + if t.isCompact() { + if _, changed := canonicalize(c, compact.Tag(t).Tag()); !changed { return t, nil } } @@ -366,7 +320,7 @@ // Variants returns the variants specified explicitly for this language tag. // or nil if no variant was specified. func (t Tag) Variants() []Variant { - if !t.mayHaveVariants() { + if !compact.Tag(t).MayHaveVariants() { return nil } v := []Variant{} @@ -382,19 +336,7 @@ // specific language are substituted with fields from the parent language. // The parent for a language may change for newer versions of CLDR. func (t Tag) Parent() Tag { - if t.full != nil { - return makeTag(t.full.Parent()) - } - if t.language != t.locale { - // Simulate stripping -u-rg-xxxxxx - return Tag{language: t.language, locale: t.language} - } - // TODO: use parent lookup table once cycle from internal package is - // removed. Probably by internalizing the table and declaring this fast - // enough. - // lang := compactID(internal.Parent(uint16(t.language))) - lang, _ := compactIndex(t.language.tag().Parent()) - return Tag{language: lang, locale: lang} + return Tag(compact.Tag(t).Parent()) } // returns token t and the rest of the string. @@ -442,7 +384,7 @@ // false for ok if t does not have the requested extension. The returned // extension will be invalid in this case. func (t Tag) Extension(x byte) (ext Extension, ok bool) { - if !t.mayHaveExtensions() { + if !compact.Tag(t).MayHaveExtensions() { return Extension{}, false } e, ok := t.tag().Extension(x) @@ -451,7 +393,7 @@ // Extensions returns all extensions of t. func (t Tag) Extensions() []Extension { - if !t.mayHaveExtensions() { + if !compact.Tag(t).MayHaveExtensions() { return nil } e := []Extension{} @@ -466,7 +408,7 @@ // http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers. // TypeForKey will traverse the inheritance chain to get the correct value. func (t Tag) TypeForKey(key string) string { - if !t.mayHaveExtensions() { + if !compact.Tag(t).MayHaveExtensions() { if key != "rg" && key != "va" { return "" } @@ -483,126 +425,18 @@ return makeTag(tt), err } +// NumCompactTags is the number of compact tags. The maximum tag is +// NumCompactTags-1. +const NumCompactTags = compact.NumCompactTags + // CompactIndex returns an index, where 0 <= index < NumCompactTags, for tags // for which data exists in the text repository.The index will change over time // and should not be stored in persistent storage. If t does not match a compact // index, exact will be false and the compact index will be returned for the // first match after repeatedly taking the Parent of t. func CompactIndex(t Tag) (index int, exact bool) { - return int(t.language), t.full == nil -} - -// TODO: make these functions and methods public once we settle on the API and -// - -// regionalCompactIndex returns the CompactIndex for the regional variant of -// this tag. This index is used to indicate region-specific overrides, such as -// default currency, default calendar and week data, default time cycle, and -// default measurement system and unit preferences. -// -// For instance, the tag en-GB-u-rg-uszzzz specifies British English with US -// settings for currency, number formatting, etc. The CompactIndex for this tag -// will be that for en-GB, while the regionalCompactIndex will be the one -// corresponding to en-US. -func regionalCompactIndex(t Tag) (index int, exact bool) { - return int(t.locale), t.full == nil -} - -// languageTag returns t stripped of regional variant indicators. -// -// At the moment this means it is stripped of a regional and variant subtag "rg" -// and "va" in the "u" extension. -func (t Tag) languageTag() Tag { - if t.full == nil { - return Tag{language: t.language, locale: t.language} - } - tt := t.tag() - tt.SetTypeForKey("rg", "") - tt.SetTypeForKey("va", "") - return makeTag(tt) -} - -// regionalTag returns the regional variant of the tag. -// -// At the moment this means that the region is set from the regional subtag -// "rg" in the "u" extension. -func (t Tag) regionalTag() Tag { - rt := Tag{language: t.locale, locale: t.locale} - if t.full == nil { - return rt - } - t, _ = Raw.Compose(rt, t.Variants(), t.Extensions()) - t, _ = t.SetTypeForKey("rg", "") - return t -} - -func compactIndex(t language.Tag) (index compactID, exact bool) { - // TODO: perhaps give more frequent tags a lower index. - // TODO: we could make the indexes stable. This will excluded some - // possibilities for optimization, so don't do this quite yet. - exact = true - - b, s, r := t.Raw() - switch { - case t.HasString(): - if t.IsPrivateUse() { - // We have no entries for user-defined tags. - return 0, false - } - hasExtra := false - if t.HasVariants() { - if t.HasExtensions() { - build := language.Builder{} - build.SetTag(language.Tag{LangID: b, ScriptID: s, RegionID: r}) - build.AddVariant(t.Variants()) - exact = false - t = build.Make() - } - hasExtra = true - } else if _, ok := t.Extension('u'); ok { - // TODO: va may mean something else. Consider not considering it. - // Strip all but the 'va' entry. - old := t - variant := t.TypeForKey("va") - t = language.Tag{LangID: b, ScriptID: s, RegionID: r} - if variant != "" { - t, _ = t.SetTypeForKey("va", variant) - hasExtra = true - } - exact = old == t - } else { - exact = false - } - if hasExtra { - // We have some variants. - for i, s := range specialTags { - if s == t { - return compactID(i + len(coreTags)), exact - } - } - exact = false - } - } - if x, ok := getCoreIndex(t); ok { - return x, exact - } - exact = false - if r != 0 && s == 0 { - // Deal with cases where an extra script is inserted for the region. - t, _ := t.Maximize() - if x, ok := getCoreIndex(t); ok { - return x, exact - } - } - for t = t.Parent(); t != root; t = t.Parent() { - // No variants specified: just compare core components. - // The key has the form lllssrrr, where l, s, and r are nibbles for - // respectively the langID, scriptID, and regionID. - if x, ok := getCoreIndex(t); ok { - return x, exact - } - } - return 0, exact + id, exact := compact.LanguageID(compact.Tag(t)) + return int(id), exact } var root = language.Tag{}
diff --git a/language/language_test.go b/language/language_test.go index 168af38..f7711ba 100644 --- a/language/language_test.go +++ b/language/language_test.go
@@ -58,77 +58,6 @@ } } -type compactTest struct { - tag string - index compactID - ok bool -} - -var compactTests = []compactTest{ - // TODO: these values will change with each CLDR update. This issue - // will be solved if we decide to fix the indexes. - {"und", undIndex, true}, - {"ca-ES-valencia", caESvalenciaIndex, true}, - {"ca-ES-valencia-u-va-posix", caESvalenciaIndex, false}, - {"ca-ES-valencia-u-co-phonebk", caESvalenciaIndex, false}, - {"ca-ES-valencia-u-co-phonebk-va-posix", caESvalenciaIndex, false}, - {"x-klingon", 0, false}, - {"en-US", enUSIndex, true}, - {"en-US-u-va-posix", enUSuvaposixIndex, true}, - {"en", enIndex, true}, - {"en-u-co-phonebk", enIndex, false}, - {"en-001", en001Index, true}, - {"zh-Hant-HK", zhHantHKIndex, true}, - {"zh-HK", zhHantHKIndex, false}, // maximized to zh-Hant-HK - {"nl-Beng", 0, false}, // parent skips script - {"nl-NO", nlIndex, false}, // region is ignored - {"nl-Latn-NO", nlIndex, false}, - {"nl-Latn-NO-u-co-phonebk", nlIndex, false}, - {"nl-Latn-NO-valencia", nlIndex, false}, - {"nl-Latn-NO-oxendict", nlIndex, false}, - {"sh", shIndex, true}, // From plural rules. -} - -func TestCompactIndex(t *testing.T) { - tests := append(compactTests, []compactTest{ - {"en-GB", enGBIndex, true}, - {"en-GB-u-rg-uszzzz", enGBIndex, true}, - {"en-GB-u-rg-USZZZZ", enGBIndex, true}, - {"en-GB-u-rg-uszzzz-va-posix", enGBIndex, false}, - {"en-GB-u-co-phonebk-rg-uszzzz", enGBIndex, false}, - // Invalid region specifications are ignored. - {"en-GB-u-rg-usz-va-posix", enGBIndex, false}, - {"en-GB-u-co-phonebk-rg-usz", enGBIndex, false}, - }...) - for _, tt := range tests { - x, ok := CompactIndex(Raw.MustParse(tt.tag)) - if compactID(x) != tt.index || ok != tt.ok { - t.Errorf("%s: got %d, %v; want %d %v", tt.tag, x, ok, tt.index, tt.ok) - } - } -} - -func TestRegionalCompactIndex(t *testing.T) { - tests := append(compactTests, []compactTest{ - {"en-GB", enGBIndex, true}, - {"en-GB-u-rg-uszzzz", enUSIndex, true}, - {"en-GB-u-rg-USZZZZ", enUSIndex, true}, - // TODO: use different exact values for language and regional tag? - {"en-GB-u-rg-uszzzz-va-posix", enUSuvaposixIndex, false}, - {"en-GB-u-co-phonebk-rg-uszzzz-va-posix", enUSuvaposixIndex, false}, - {"en-GB-u-co-phonebk-rg-uszzzz", enUSIndex, false}, - // Invalid region specifications are ignored. - {"en-GB-u-rg-usz-va-posix", enGBIndex, false}, - {"en-GB-u-co-phonebk-rg-usz", enGBIndex, false}, - }...) - for _, tt := range tests { - x, ok := regionalCompactIndex(Raw.MustParse(tt.tag)) - if compactID(x) != tt.index || ok != tt.ok { - t.Errorf("%s: got %d, %v; want %d %v", tt.tag, x, ok, tt.index, tt.ok) - } - } -} - func TestMarshal(t *testing.T) { testCases := []string{ // TODO: these values will change with each CLDR update. This issue
diff --git a/language/tables.go b/language/tables.go index 1825af6..e228077 100644 --- a/language/tables.go +++ b/language/tables.go
@@ -2,8 +2,6 @@ package language -import "golang.org/x/text/internal/language" - // CLDRVersion is the CLDR version from which the tables in this package are derived. const CLDRVersion = "32" @@ -49,1011 +47,6 @@ _Zzzz = 242 ) -// NumCompactTags is the number of common tags. The maximum tag is -// NumCompactTags-1. -const NumCompactTags = 775 -const ( - undIndex compactID = 0 - afIndex compactID = 1 - afNAIndex compactID = 2 - afZAIndex compactID = 3 - agqIndex compactID = 4 - agqCMIndex compactID = 5 - akIndex compactID = 6 - akGHIndex compactID = 7 - amIndex compactID = 8 - amETIndex compactID = 9 - arIndex compactID = 10 - ar001Index compactID = 11 - arAEIndex compactID = 12 - arBHIndex compactID = 13 - arDJIndex compactID = 14 - arDZIndex compactID = 15 - arEGIndex compactID = 16 - arEHIndex compactID = 17 - arERIndex compactID = 18 - arILIndex compactID = 19 - arIQIndex compactID = 20 - arJOIndex compactID = 21 - arKMIndex compactID = 22 - arKWIndex compactID = 23 - arLBIndex compactID = 24 - arLYIndex compactID = 25 - arMAIndex compactID = 26 - arMRIndex compactID = 27 - arOMIndex compactID = 28 - arPSIndex compactID = 29 - arQAIndex compactID = 30 - arSAIndex compactID = 31 - arSDIndex compactID = 32 - arSOIndex compactID = 33 - arSSIndex compactID = 34 - arSYIndex compactID = 35 - arTDIndex compactID = 36 - arTNIndex compactID = 37 - arYEIndex compactID = 38 - arsIndex compactID = 39 - asIndex compactID = 40 - asINIndex compactID = 41 - asaIndex compactID = 42 - asaTZIndex compactID = 43 - astIndex compactID = 44 - astESIndex compactID = 45 - azIndex compactID = 46 - azCyrlIndex compactID = 47 - azCyrlAZIndex compactID = 48 - azLatnIndex compactID = 49 - azLatnAZIndex compactID = 50 - basIndex compactID = 51 - basCMIndex compactID = 52 - beIndex compactID = 53 - beBYIndex compactID = 54 - bemIndex compactID = 55 - bemZMIndex compactID = 56 - bezIndex compactID = 57 - bezTZIndex compactID = 58 - bgIndex compactID = 59 - bgBGIndex compactID = 60 - bhIndex compactID = 61 - bmIndex compactID = 62 - bmMLIndex compactID = 63 - bnIndex compactID = 64 - bnBDIndex compactID = 65 - bnINIndex compactID = 66 - boIndex compactID = 67 - boCNIndex compactID = 68 - boINIndex compactID = 69 - brIndex compactID = 70 - brFRIndex compactID = 71 - brxIndex compactID = 72 - brxINIndex compactID = 73 - bsIndex compactID = 74 - bsCyrlIndex compactID = 75 - bsCyrlBAIndex compactID = 76 - bsLatnIndex compactID = 77 - bsLatnBAIndex compactID = 78 - caIndex compactID = 79 - caADIndex compactID = 80 - caESIndex compactID = 81 - caFRIndex compactID = 82 - caITIndex compactID = 83 - ccpIndex compactID = 84 - ccpBDIndex compactID = 85 - ccpINIndex compactID = 86 - ceIndex compactID = 87 - ceRUIndex compactID = 88 - cggIndex compactID = 89 - cggUGIndex compactID = 90 - chrIndex compactID = 91 - chrUSIndex compactID = 92 - ckbIndex compactID = 93 - ckbIQIndex compactID = 94 - ckbIRIndex compactID = 95 - csIndex compactID = 96 - csCZIndex compactID = 97 - cuIndex compactID = 98 - cuRUIndex compactID = 99 - cyIndex compactID = 100 - cyGBIndex compactID = 101 - daIndex compactID = 102 - daDKIndex compactID = 103 - daGLIndex compactID = 104 - davIndex compactID = 105 - davKEIndex compactID = 106 - deIndex compactID = 107 - deATIndex compactID = 108 - deBEIndex compactID = 109 - deCHIndex compactID = 110 - deDEIndex compactID = 111 - deITIndex compactID = 112 - deLIIndex compactID = 113 - deLUIndex compactID = 114 - djeIndex compactID = 115 - djeNEIndex compactID = 116 - dsbIndex compactID = 117 - dsbDEIndex compactID = 118 - duaIndex compactID = 119 - duaCMIndex compactID = 120 - dvIndex compactID = 121 - dyoIndex compactID = 122 - dyoSNIndex compactID = 123 - dzIndex compactID = 124 - dzBTIndex compactID = 125 - ebuIndex compactID = 126 - ebuKEIndex compactID = 127 - eeIndex compactID = 128 - eeGHIndex compactID = 129 - eeTGIndex compactID = 130 - elIndex compactID = 131 - elCYIndex compactID = 132 - elGRIndex compactID = 133 - enIndex compactID = 134 - en001Index compactID = 135 - en150Index compactID = 136 - enAGIndex compactID = 137 - enAIIndex compactID = 138 - enASIndex compactID = 139 - enATIndex compactID = 140 - enAUIndex compactID = 141 - enBBIndex compactID = 142 - enBEIndex compactID = 143 - enBIIndex compactID = 144 - enBMIndex compactID = 145 - enBSIndex compactID = 146 - enBWIndex compactID = 147 - enBZIndex compactID = 148 - enCAIndex compactID = 149 - enCCIndex compactID = 150 - enCHIndex compactID = 151 - enCKIndex compactID = 152 - enCMIndex compactID = 153 - enCXIndex compactID = 154 - enCYIndex compactID = 155 - enDEIndex compactID = 156 - enDGIndex compactID = 157 - enDKIndex compactID = 158 - enDMIndex compactID = 159 - enERIndex compactID = 160 - enFIIndex compactID = 161 - enFJIndex compactID = 162 - enFKIndex compactID = 163 - enFMIndex compactID = 164 - enGBIndex compactID = 165 - enGDIndex compactID = 166 - enGGIndex compactID = 167 - enGHIndex compactID = 168 - enGIIndex compactID = 169 - enGMIndex compactID = 170 - enGUIndex compactID = 171 - enGYIndex compactID = 172 - enHKIndex compactID = 173 - enIEIndex compactID = 174 - enILIndex compactID = 175 - enIMIndex compactID = 176 - enINIndex compactID = 177 - enIOIndex compactID = 178 - enJEIndex compactID = 179 - enJMIndex compactID = 180 - enKEIndex compactID = 181 - enKIIndex compactID = 182 - enKNIndex compactID = 183 - enKYIndex compactID = 184 - enLCIndex compactID = 185 - enLRIndex compactID = 186 - enLSIndex compactID = 187 - enMGIndex compactID = 188 - enMHIndex compactID = 189 - enMOIndex compactID = 190 - enMPIndex compactID = 191 - enMSIndex compactID = 192 - enMTIndex compactID = 193 - enMUIndex compactID = 194 - enMWIndex compactID = 195 - enMYIndex compactID = 196 - enNAIndex compactID = 197 - enNFIndex compactID = 198 - enNGIndex compactID = 199 - enNLIndex compactID = 200 - enNRIndex compactID = 201 - enNUIndex compactID = 202 - enNZIndex compactID = 203 - enPGIndex compactID = 204 - enPHIndex compactID = 205 - enPKIndex compactID = 206 - enPNIndex compactID = 207 - enPRIndex compactID = 208 - enPWIndex compactID = 209 - enRWIndex compactID = 210 - enSBIndex compactID = 211 - enSCIndex compactID = 212 - enSDIndex compactID = 213 - enSEIndex compactID = 214 - enSGIndex compactID = 215 - enSHIndex compactID = 216 - enSIIndex compactID = 217 - enSLIndex compactID = 218 - enSSIndex compactID = 219 - enSXIndex compactID = 220 - enSZIndex compactID = 221 - enTCIndex compactID = 222 - enTKIndex compactID = 223 - enTOIndex compactID = 224 - enTTIndex compactID = 225 - enTVIndex compactID = 226 - enTZIndex compactID = 227 - enUGIndex compactID = 228 - enUMIndex compactID = 229 - enUSIndex compactID = 230 - enVCIndex compactID = 231 - enVGIndex compactID = 232 - enVIIndex compactID = 233 - enVUIndex compactID = 234 - enWSIndex compactID = 235 - enZAIndex compactID = 236 - enZMIndex compactID = 237 - enZWIndex compactID = 238 - eoIndex compactID = 239 - eo001Index compactID = 240 - esIndex compactID = 241 - es419Index compactID = 242 - esARIndex compactID = 243 - esBOIndex compactID = 244 - esBRIndex compactID = 245 - esBZIndex compactID = 246 - esCLIndex compactID = 247 - esCOIndex compactID = 248 - esCRIndex compactID = 249 - esCUIndex compactID = 250 - esDOIndex compactID = 251 - esEAIndex compactID = 252 - esECIndex compactID = 253 - esESIndex compactID = 254 - esGQIndex compactID = 255 - esGTIndex compactID = 256 - esHNIndex compactID = 257 - esICIndex compactID = 258 - esMXIndex compactID = 259 - esNIIndex compactID = 260 - esPAIndex compactID = 261 - esPEIndex compactID = 262 - esPHIndex compactID = 263 - esPRIndex compactID = 264 - esPYIndex compactID = 265 - esSVIndex compactID = 266 - esUSIndex compactID = 267 - esUYIndex compactID = 268 - esVEIndex compactID = 269 - etIndex compactID = 270 - etEEIndex compactID = 271 - euIndex compactID = 272 - euESIndex compactID = 273 - ewoIndex compactID = 274 - ewoCMIndex compactID = 275 - faIndex compactID = 276 - faAFIndex compactID = 277 - faIRIndex compactID = 278 - ffIndex compactID = 279 - ffCMIndex compactID = 280 - ffGNIndex compactID = 281 - ffMRIndex compactID = 282 - ffSNIndex compactID = 283 - fiIndex compactID = 284 - fiFIIndex compactID = 285 - filIndex compactID = 286 - filPHIndex compactID = 287 - foIndex compactID = 288 - foDKIndex compactID = 289 - foFOIndex compactID = 290 - frIndex compactID = 291 - frBEIndex compactID = 292 - frBFIndex compactID = 293 - frBIIndex compactID = 294 - frBJIndex compactID = 295 - frBLIndex compactID = 296 - frCAIndex compactID = 297 - frCDIndex compactID = 298 - frCFIndex compactID = 299 - frCGIndex compactID = 300 - frCHIndex compactID = 301 - frCIIndex compactID = 302 - frCMIndex compactID = 303 - frDJIndex compactID = 304 - frDZIndex compactID = 305 - frFRIndex compactID = 306 - frGAIndex compactID = 307 - frGFIndex compactID = 308 - frGNIndex compactID = 309 - frGPIndex compactID = 310 - frGQIndex compactID = 311 - frHTIndex compactID = 312 - frKMIndex compactID = 313 - frLUIndex compactID = 314 - frMAIndex compactID = 315 - frMCIndex compactID = 316 - frMFIndex compactID = 317 - frMGIndex compactID = 318 - frMLIndex compactID = 319 - frMQIndex compactID = 320 - frMRIndex compactID = 321 - frMUIndex compactID = 322 - frNCIndex compactID = 323 - frNEIndex compactID = 324 - frPFIndex compactID = 325 - frPMIndex compactID = 326 - frREIndex compactID = 327 - frRWIndex compactID = 328 - frSCIndex compactID = 329 - frSNIndex compactID = 330 - frSYIndex compactID = 331 - frTDIndex compactID = 332 - frTGIndex compactID = 333 - frTNIndex compactID = 334 - frVUIndex compactID = 335 - frWFIndex compactID = 336 - frYTIndex compactID = 337 - furIndex compactID = 338 - furITIndex compactID = 339 - fyIndex compactID = 340 - fyNLIndex compactID = 341 - gaIndex compactID = 342 - gaIEIndex compactID = 343 - gdIndex compactID = 344 - gdGBIndex compactID = 345 - glIndex compactID = 346 - glESIndex compactID = 347 - gswIndex compactID = 348 - gswCHIndex compactID = 349 - gswFRIndex compactID = 350 - gswLIIndex compactID = 351 - guIndex compactID = 352 - guINIndex compactID = 353 - guwIndex compactID = 354 - guzIndex compactID = 355 - guzKEIndex compactID = 356 - gvIndex compactID = 357 - gvIMIndex compactID = 358 - haIndex compactID = 359 - haGHIndex compactID = 360 - haNEIndex compactID = 361 - haNGIndex compactID = 362 - hawIndex compactID = 363 - hawUSIndex compactID = 364 - heIndex compactID = 365 - heILIndex compactID = 366 - hiIndex compactID = 367 - hiINIndex compactID = 368 - hrIndex compactID = 369 - hrBAIndex compactID = 370 - hrHRIndex compactID = 371 - hsbIndex compactID = 372 - hsbDEIndex compactID = 373 - huIndex compactID = 374 - huHUIndex compactID = 375 - hyIndex compactID = 376 - hyAMIndex compactID = 377 - idIndex compactID = 378 - idIDIndex compactID = 379 - igIndex compactID = 380 - igNGIndex compactID = 381 - iiIndex compactID = 382 - iiCNIndex compactID = 383 - inIndex compactID = 384 - ioIndex compactID = 385 - isIndex compactID = 386 - isISIndex compactID = 387 - itIndex compactID = 388 - itCHIndex compactID = 389 - itITIndex compactID = 390 - itSMIndex compactID = 391 - itVAIndex compactID = 392 - iuIndex compactID = 393 - iwIndex compactID = 394 - jaIndex compactID = 395 - jaJPIndex compactID = 396 - jboIndex compactID = 397 - jgoIndex compactID = 398 - jgoCMIndex compactID = 399 - jiIndex compactID = 400 - jmcIndex compactID = 401 - jmcTZIndex compactID = 402 - jvIndex compactID = 403 - jwIndex compactID = 404 - kaIndex compactID = 405 - kaGEIndex compactID = 406 - kabIndex compactID = 407 - kabDZIndex compactID = 408 - kajIndex compactID = 409 - kamIndex compactID = 410 - kamKEIndex compactID = 411 - kcgIndex compactID = 412 - kdeIndex compactID = 413 - kdeTZIndex compactID = 414 - keaIndex compactID = 415 - keaCVIndex compactID = 416 - khqIndex compactID = 417 - khqMLIndex compactID = 418 - kiIndex compactID = 419 - kiKEIndex compactID = 420 - kkIndex compactID = 421 - kkKZIndex compactID = 422 - kkjIndex compactID = 423 - kkjCMIndex compactID = 424 - klIndex compactID = 425 - klGLIndex compactID = 426 - klnIndex compactID = 427 - klnKEIndex compactID = 428 - kmIndex compactID = 429 - kmKHIndex compactID = 430 - knIndex compactID = 431 - knINIndex compactID = 432 - koIndex compactID = 433 - koKPIndex compactID = 434 - koKRIndex compactID = 435 - kokIndex compactID = 436 - kokINIndex compactID = 437 - ksIndex compactID = 438 - ksINIndex compactID = 439 - ksbIndex compactID = 440 - ksbTZIndex compactID = 441 - ksfIndex compactID = 442 - ksfCMIndex compactID = 443 - kshIndex compactID = 444 - kshDEIndex compactID = 445 - kuIndex compactID = 446 - kwIndex compactID = 447 - kwGBIndex compactID = 448 - kyIndex compactID = 449 - kyKGIndex compactID = 450 - lagIndex compactID = 451 - lagTZIndex compactID = 452 - lbIndex compactID = 453 - lbLUIndex compactID = 454 - lgIndex compactID = 455 - lgUGIndex compactID = 456 - lktIndex compactID = 457 - lktUSIndex compactID = 458 - lnIndex compactID = 459 - lnAOIndex compactID = 460 - lnCDIndex compactID = 461 - lnCFIndex compactID = 462 - lnCGIndex compactID = 463 - loIndex compactID = 464 - loLAIndex compactID = 465 - lrcIndex compactID = 466 - lrcIQIndex compactID = 467 - lrcIRIndex compactID = 468 - ltIndex compactID = 469 - ltLTIndex compactID = 470 - luIndex compactID = 471 - luCDIndex compactID = 472 - luoIndex compactID = 473 - luoKEIndex compactID = 474 - luyIndex compactID = 475 - luyKEIndex compactID = 476 - lvIndex compactID = 477 - lvLVIndex compactID = 478 - masIndex compactID = 479 - masKEIndex compactID = 480 - masTZIndex compactID = 481 - merIndex compactID = 482 - merKEIndex compactID = 483 - mfeIndex compactID = 484 - mfeMUIndex compactID = 485 - mgIndex compactID = 486 - mgMGIndex compactID = 487 - mghIndex compactID = 488 - mghMZIndex compactID = 489 - mgoIndex compactID = 490 - mgoCMIndex compactID = 491 - mkIndex compactID = 492 - mkMKIndex compactID = 493 - mlIndex compactID = 494 - mlINIndex compactID = 495 - mnIndex compactID = 496 - mnMNIndex compactID = 497 - moIndex compactID = 498 - mrIndex compactID = 499 - mrINIndex compactID = 500 - msIndex compactID = 501 - msBNIndex compactID = 502 - msMYIndex compactID = 503 - msSGIndex compactID = 504 - mtIndex compactID = 505 - mtMTIndex compactID = 506 - muaIndex compactID = 507 - muaCMIndex compactID = 508 - myIndex compactID = 509 - myMMIndex compactID = 510 - mznIndex compactID = 511 - mznIRIndex compactID = 512 - nahIndex compactID = 513 - naqIndex compactID = 514 - naqNAIndex compactID = 515 - nbIndex compactID = 516 - nbNOIndex compactID = 517 - nbSJIndex compactID = 518 - ndIndex compactID = 519 - ndZWIndex compactID = 520 - ndsIndex compactID = 521 - ndsDEIndex compactID = 522 - ndsNLIndex compactID = 523 - neIndex compactID = 524 - neINIndex compactID = 525 - neNPIndex compactID = 526 - nlIndex compactID = 527 - nlAWIndex compactID = 528 - nlBEIndex compactID = 529 - nlBQIndex compactID = 530 - nlCWIndex compactID = 531 - nlNLIndex compactID = 532 - nlSRIndex compactID = 533 - nlSXIndex compactID = 534 - nmgIndex compactID = 535 - nmgCMIndex compactID = 536 - nnIndex compactID = 537 - nnNOIndex compactID = 538 - nnhIndex compactID = 539 - nnhCMIndex compactID = 540 - noIndex compactID = 541 - nqoIndex compactID = 542 - nrIndex compactID = 543 - nsoIndex compactID = 544 - nusIndex compactID = 545 - nusSSIndex compactID = 546 - nyIndex compactID = 547 - nynIndex compactID = 548 - nynUGIndex compactID = 549 - omIndex compactID = 550 - omETIndex compactID = 551 - omKEIndex compactID = 552 - orIndex compactID = 553 - orINIndex compactID = 554 - osIndex compactID = 555 - osGEIndex compactID = 556 - osRUIndex compactID = 557 - paIndex compactID = 558 - paArabIndex compactID = 559 - paArabPKIndex compactID = 560 - paGuruIndex compactID = 561 - paGuruINIndex compactID = 562 - papIndex compactID = 563 - plIndex compactID = 564 - plPLIndex compactID = 565 - prgIndex compactID = 566 - prg001Index compactID = 567 - psIndex compactID = 568 - psAFIndex compactID = 569 - ptIndex compactID = 570 - ptAOIndex compactID = 571 - ptBRIndex compactID = 572 - ptCHIndex compactID = 573 - ptCVIndex compactID = 574 - ptGQIndex compactID = 575 - ptGWIndex compactID = 576 - ptLUIndex compactID = 577 - ptMOIndex compactID = 578 - ptMZIndex compactID = 579 - ptPTIndex compactID = 580 - ptSTIndex compactID = 581 - ptTLIndex compactID = 582 - quIndex compactID = 583 - quBOIndex compactID = 584 - quECIndex compactID = 585 - quPEIndex compactID = 586 - rmIndex compactID = 587 - rmCHIndex compactID = 588 - rnIndex compactID = 589 - rnBIIndex compactID = 590 - roIndex compactID = 591 - roMDIndex compactID = 592 - roROIndex compactID = 593 - rofIndex compactID = 594 - rofTZIndex compactID = 595 - ruIndex compactID = 596 - ruBYIndex compactID = 597 - ruKGIndex compactID = 598 - ruKZIndex compactID = 599 - ruMDIndex compactID = 600 - ruRUIndex compactID = 601 - ruUAIndex compactID = 602 - rwIndex compactID = 603 - rwRWIndex compactID = 604 - rwkIndex compactID = 605 - rwkTZIndex compactID = 606 - sahIndex compactID = 607 - sahRUIndex compactID = 608 - saqIndex compactID = 609 - saqKEIndex compactID = 610 - sbpIndex compactID = 611 - sbpTZIndex compactID = 612 - sdIndex compactID = 613 - sdPKIndex compactID = 614 - sdhIndex compactID = 615 - seIndex compactID = 616 - seFIIndex compactID = 617 - seNOIndex compactID = 618 - seSEIndex compactID = 619 - sehIndex compactID = 620 - sehMZIndex compactID = 621 - sesIndex compactID = 622 - sesMLIndex compactID = 623 - sgIndex compactID = 624 - sgCFIndex compactID = 625 - shIndex compactID = 626 - shiIndex compactID = 627 - shiLatnIndex compactID = 628 - shiLatnMAIndex compactID = 629 - shiTfngIndex compactID = 630 - shiTfngMAIndex compactID = 631 - siIndex compactID = 632 - siLKIndex compactID = 633 - skIndex compactID = 634 - skSKIndex compactID = 635 - slIndex compactID = 636 - slSIIndex compactID = 637 - smaIndex compactID = 638 - smiIndex compactID = 639 - smjIndex compactID = 640 - smnIndex compactID = 641 - smnFIIndex compactID = 642 - smsIndex compactID = 643 - snIndex compactID = 644 - snZWIndex compactID = 645 - soIndex compactID = 646 - soDJIndex compactID = 647 - soETIndex compactID = 648 - soKEIndex compactID = 649 - soSOIndex compactID = 650 - sqIndex compactID = 651 - sqALIndex compactID = 652 - sqMKIndex compactID = 653 - sqXKIndex compactID = 654 - srIndex compactID = 655 - srCyrlIndex compactID = 656 - srCyrlBAIndex compactID = 657 - srCyrlMEIndex compactID = 658 - srCyrlRSIndex compactID = 659 - srCyrlXKIndex compactID = 660 - srLatnIndex compactID = 661 - srLatnBAIndex compactID = 662 - srLatnMEIndex compactID = 663 - srLatnRSIndex compactID = 664 - srLatnXKIndex compactID = 665 - ssIndex compactID = 666 - ssyIndex compactID = 667 - stIndex compactID = 668 - svIndex compactID = 669 - svAXIndex compactID = 670 - svFIIndex compactID = 671 - svSEIndex compactID = 672 - swIndex compactID = 673 - swCDIndex compactID = 674 - swKEIndex compactID = 675 - swTZIndex compactID = 676 - swUGIndex compactID = 677 - syrIndex compactID = 678 - taIndex compactID = 679 - taINIndex compactID = 680 - taLKIndex compactID = 681 - taMYIndex compactID = 682 - taSGIndex compactID = 683 - teIndex compactID = 684 - teINIndex compactID = 685 - teoIndex compactID = 686 - teoKEIndex compactID = 687 - teoUGIndex compactID = 688 - tgIndex compactID = 689 - tgTJIndex compactID = 690 - thIndex compactID = 691 - thTHIndex compactID = 692 - tiIndex compactID = 693 - tiERIndex compactID = 694 - tiETIndex compactID = 695 - tigIndex compactID = 696 - tkIndex compactID = 697 - tkTMIndex compactID = 698 - tlIndex compactID = 699 - tnIndex compactID = 700 - toIndex compactID = 701 - toTOIndex compactID = 702 - trIndex compactID = 703 - trCYIndex compactID = 704 - trTRIndex compactID = 705 - tsIndex compactID = 706 - ttIndex compactID = 707 - ttRUIndex compactID = 708 - twqIndex compactID = 709 - twqNEIndex compactID = 710 - tzmIndex compactID = 711 - tzmMAIndex compactID = 712 - ugIndex compactID = 713 - ugCNIndex compactID = 714 - ukIndex compactID = 715 - ukUAIndex compactID = 716 - urIndex compactID = 717 - urINIndex compactID = 718 - urPKIndex compactID = 719 - uzIndex compactID = 720 - uzArabIndex compactID = 721 - uzArabAFIndex compactID = 722 - uzCyrlIndex compactID = 723 - uzCyrlUZIndex compactID = 724 - uzLatnIndex compactID = 725 - uzLatnUZIndex compactID = 726 - vaiIndex compactID = 727 - vaiLatnIndex compactID = 728 - vaiLatnLRIndex compactID = 729 - vaiVaiiIndex compactID = 730 - vaiVaiiLRIndex compactID = 731 - veIndex compactID = 732 - viIndex compactID = 733 - viVNIndex compactID = 734 - voIndex compactID = 735 - vo001Index compactID = 736 - vunIndex compactID = 737 - vunTZIndex compactID = 738 - waIndex compactID = 739 - waeIndex compactID = 740 - waeCHIndex compactID = 741 - woIndex compactID = 742 - woSNIndex compactID = 743 - xhIndex compactID = 744 - xogIndex compactID = 745 - xogUGIndex compactID = 746 - yavIndex compactID = 747 - yavCMIndex compactID = 748 - yiIndex compactID = 749 - yi001Index compactID = 750 - yoIndex compactID = 751 - yoBJIndex compactID = 752 - yoNGIndex compactID = 753 - yueIndex compactID = 754 - yueHansIndex compactID = 755 - yueHansCNIndex compactID = 756 - yueHantIndex compactID = 757 - yueHantHKIndex compactID = 758 - zghIndex compactID = 759 - zghMAIndex compactID = 760 - zhIndex compactID = 761 - zhHansIndex compactID = 762 - zhHansCNIndex compactID = 763 - zhHansHKIndex compactID = 764 - zhHansMOIndex compactID = 765 - zhHansSGIndex compactID = 766 - zhHantIndex compactID = 767 - zhHantHKIndex compactID = 768 - zhHantMOIndex compactID = 769 - zhHantTWIndex compactID = 770 - zuIndex compactID = 771 - zuZAIndex compactID = 772 - caESvalenciaIndex compactID = 773 - enUSuvaposixIndex compactID = 774 -) - -var coreTags = []language.CompactCoreInfo{ // 773 elements - // Entry 0 - 1F - 0x00000000, 0x01600000, 0x016000d2, 0x01600161, - 0x01c00000, 0x01c00052, 0x02100000, 0x02100080, - 0x02700000, 0x0270006f, 0x03a00000, 0x03a00001, - 0x03a00023, 0x03a00039, 0x03a00062, 0x03a00067, - 0x03a0006b, 0x03a0006c, 0x03a0006d, 0x03a00097, - 0x03a0009b, 0x03a000a1, 0x03a000a8, 0x03a000ac, - 0x03a000b0, 0x03a000b9, 0x03a000ba, 0x03a000c9, - 0x03a000e1, 0x03a000ed, 0x03a000f3, 0x03a00108, - // Entry 20 - 3F - 0x03a0010b, 0x03a00115, 0x03a00117, 0x03a0011c, - 0x03a00120, 0x03a00128, 0x03a0015e, 0x04000000, - 0x04300000, 0x04300099, 0x04400000, 0x0440012f, - 0x04800000, 0x0480006e, 0x05800000, 0x0581f000, - 0x0581f032, 0x05857000, 0x05857032, 0x05e00000, - 0x05e00052, 0x07100000, 0x07100047, 0x07500000, - 0x07500162, 0x07900000, 0x0790012f, 0x07e00000, - 0x07e00038, 0x08200000, 0x0a000000, 0x0a0000c3, - // Entry 40 - 5F - 0x0a500000, 0x0a500035, 0x0a500099, 0x0a900000, - 0x0a900053, 0x0a900099, 0x0b200000, 0x0b200078, - 0x0b500000, 0x0b500099, 0x0b700000, 0x0b71f000, - 0x0b71f033, 0x0b757000, 0x0b757033, 0x0d700000, - 0x0d700022, 0x0d70006e, 0x0d700078, 0x0d70009e, - 0x0db00000, 0x0db00035, 0x0db00099, 0x0dc00000, - 0x0dc00106, 0x0df00000, 0x0df00131, 0x0e500000, - 0x0e500135, 0x0e900000, 0x0e90009b, 0x0e90009c, - // Entry 60 - 7F - 0x0fa00000, 0x0fa0005e, 0x0fe00000, 0x0fe00106, - 0x10000000, 0x1000007b, 0x10100000, 0x10100063, - 0x10100082, 0x10800000, 0x108000a4, 0x10d00000, - 0x10d0002e, 0x10d00036, 0x10d0004e, 0x10d00060, - 0x10d0009e, 0x10d000b2, 0x10d000b7, 0x11700000, - 0x117000d4, 0x11f00000, 0x11f00060, 0x12400000, - 0x12400052, 0x12800000, 0x12b00000, 0x12b00114, - 0x12d00000, 0x12d00043, 0x12f00000, 0x12f000a4, - // Entry 80 - 9F - 0x13000000, 0x13000080, 0x13000122, 0x13600000, - 0x1360005d, 0x13600087, 0x13900000, 0x13900001, - 0x1390001a, 0x13900025, 0x13900026, 0x1390002d, - 0x1390002e, 0x1390002f, 0x13900034, 0x13900036, - 0x1390003a, 0x1390003d, 0x13900042, 0x13900046, - 0x13900048, 0x13900049, 0x1390004a, 0x1390004e, - 0x13900050, 0x13900052, 0x1390005c, 0x1390005d, - 0x13900060, 0x13900061, 0x13900063, 0x13900064, - // Entry A0 - BF - 0x1390006d, 0x13900072, 0x13900073, 0x13900074, - 0x13900075, 0x1390007b, 0x1390007c, 0x1390007f, - 0x13900080, 0x13900081, 0x13900083, 0x1390008a, - 0x1390008c, 0x1390008d, 0x13900096, 0x13900097, - 0x13900098, 0x13900099, 0x1390009a, 0x1390009f, - 0x139000a0, 0x139000a4, 0x139000a7, 0x139000a9, - 0x139000ad, 0x139000b1, 0x139000b4, 0x139000b5, - 0x139000bf, 0x139000c0, 0x139000c6, 0x139000c7, - // Entry C0 - DF - 0x139000ca, 0x139000cb, 0x139000cc, 0x139000ce, - 0x139000d0, 0x139000d2, 0x139000d5, 0x139000d6, - 0x139000d9, 0x139000dd, 0x139000df, 0x139000e0, - 0x139000e6, 0x139000e7, 0x139000e8, 0x139000eb, - 0x139000ec, 0x139000f0, 0x13900107, 0x13900109, - 0x1390010a, 0x1390010b, 0x1390010c, 0x1390010d, - 0x1390010e, 0x1390010f, 0x13900112, 0x13900117, - 0x1390011b, 0x1390011d, 0x1390011f, 0x13900125, - // Entry E0 - FF - 0x13900129, 0x1390012c, 0x1390012d, 0x1390012f, - 0x13900131, 0x13900133, 0x13900135, 0x13900139, - 0x1390013c, 0x1390013d, 0x1390013f, 0x13900142, - 0x13900161, 0x13900162, 0x13900164, 0x13c00000, - 0x13c00001, 0x13e00000, 0x13e0001f, 0x13e0002c, - 0x13e0003f, 0x13e00041, 0x13e00048, 0x13e00051, - 0x13e00054, 0x13e00056, 0x13e00059, 0x13e00065, - 0x13e00068, 0x13e00069, 0x13e0006e, 0x13e00086, - // Entry 100 - 11F - 0x13e00089, 0x13e0008f, 0x13e00094, 0x13e000cf, - 0x13e000d8, 0x13e000e2, 0x13e000e4, 0x13e000e7, - 0x13e000ec, 0x13e000f1, 0x13e0011a, 0x13e00135, - 0x13e00136, 0x13e0013b, 0x14000000, 0x1400006a, - 0x14500000, 0x1450006e, 0x14600000, 0x14600052, - 0x14800000, 0x14800024, 0x1480009c, 0x14e00000, - 0x14e00052, 0x14e00084, 0x14e000c9, 0x14e00114, - 0x15100000, 0x15100072, 0x15300000, 0x153000e7, - // Entry 120 - 13F - 0x15800000, 0x15800063, 0x15800076, 0x15e00000, - 0x15e00036, 0x15e00037, 0x15e0003a, 0x15e0003b, - 0x15e0003c, 0x15e00049, 0x15e0004b, 0x15e0004c, - 0x15e0004d, 0x15e0004e, 0x15e0004f, 0x15e00052, - 0x15e00062, 0x15e00067, 0x15e00078, 0x15e0007a, - 0x15e0007e, 0x15e00084, 0x15e00085, 0x15e00086, - 0x15e00091, 0x15e000a8, 0x15e000b7, 0x15e000ba, - 0x15e000bb, 0x15e000be, 0x15e000bf, 0x15e000c3, - // Entry 140 - 15F - 0x15e000c8, 0x15e000c9, 0x15e000cc, 0x15e000d3, - 0x15e000d4, 0x15e000e5, 0x15e000ea, 0x15e00102, - 0x15e00107, 0x15e0010a, 0x15e00114, 0x15e0011c, - 0x15e00120, 0x15e00122, 0x15e00128, 0x15e0013f, - 0x15e00140, 0x15e0015f, 0x16900000, 0x1690009e, - 0x16d00000, 0x16d000d9, 0x16e00000, 0x16e00096, - 0x17e00000, 0x17e0007b, 0x19000000, 0x1900006e, - 0x1a300000, 0x1a30004e, 0x1a300078, 0x1a3000b2, - // Entry 160 - 17F - 0x1a400000, 0x1a400099, 0x1a900000, 0x1ab00000, - 0x1ab000a4, 0x1ac00000, 0x1ac00098, 0x1b400000, - 0x1b400080, 0x1b4000d4, 0x1b4000d6, 0x1b800000, - 0x1b800135, 0x1bc00000, 0x1bc00097, 0x1be00000, - 0x1be00099, 0x1d100000, 0x1d100033, 0x1d100090, - 0x1d200000, 0x1d200060, 0x1d500000, 0x1d500092, - 0x1d700000, 0x1d700028, 0x1e100000, 0x1e100095, - 0x1e700000, 0x1e7000d6, 0x1ea00000, 0x1ea00053, - // Entry 180 - 19F - 0x1f300000, 0x1f500000, 0x1f800000, 0x1f80009d, - 0x1f900000, 0x1f90004e, 0x1f90009e, 0x1f900113, - 0x1f900138, 0x1fa00000, 0x1fb00000, 0x20000000, - 0x200000a2, 0x20300000, 0x20700000, 0x20700052, - 0x20800000, 0x20a00000, 0x20a0012f, 0x20e00000, - 0x20f00000, 0x21000000, 0x2100007d, 0x21200000, - 0x21200067, 0x21600000, 0x21700000, 0x217000a4, - 0x21f00000, 0x22300000, 0x2230012f, 0x22700000, - // Entry 1A0 - 1BF - 0x2270005a, 0x23400000, 0x234000c3, 0x23900000, - 0x239000a4, 0x24200000, 0x242000ae, 0x24400000, - 0x24400052, 0x24500000, 0x24500082, 0x24600000, - 0x246000a4, 0x24a00000, 0x24a000a6, 0x25100000, - 0x25100099, 0x25400000, 0x254000aa, 0x254000ab, - 0x25600000, 0x25600099, 0x26a00000, 0x26a00099, - 0x26b00000, 0x26b0012f, 0x26d00000, 0x26d00052, - 0x26e00000, 0x26e00060, 0x27400000, 0x28100000, - // Entry 1C0 - 1DF - 0x2810007b, 0x28a00000, 0x28a000a5, 0x29100000, - 0x2910012f, 0x29500000, 0x295000b7, 0x2a300000, - 0x2a300131, 0x2af00000, 0x2af00135, 0x2b500000, - 0x2b50002a, 0x2b50004b, 0x2b50004c, 0x2b50004d, - 0x2b800000, 0x2b8000af, 0x2bf00000, 0x2bf0009b, - 0x2bf0009c, 0x2c000000, 0x2c0000b6, 0x2c200000, - 0x2c20004b, 0x2c400000, 0x2c4000a4, 0x2c500000, - 0x2c5000a4, 0x2c700000, 0x2c7000b8, 0x2d100000, - // Entry 1E0 - 1FF - 0x2d1000a4, 0x2d10012f, 0x2e900000, 0x2e9000a4, - 0x2ed00000, 0x2ed000cc, 0x2f100000, 0x2f1000bf, - 0x2f200000, 0x2f2000d1, 0x2f400000, 0x2f400052, - 0x2ff00000, 0x2ff000c2, 0x30400000, 0x30400099, - 0x30b00000, 0x30b000c5, 0x31000000, 0x31b00000, - 0x31b00099, 0x31f00000, 0x31f0003e, 0x31f000d0, - 0x31f0010d, 0x32000000, 0x320000cb, 0x32500000, - 0x32500052, 0x33100000, 0x331000c4, 0x33a00000, - // Entry 200 - 21F - 0x33a0009c, 0x34100000, 0x34500000, 0x345000d2, - 0x34700000, 0x347000da, 0x34700110, 0x34e00000, - 0x34e00164, 0x35000000, 0x35000060, 0x350000d9, - 0x35100000, 0x35100099, 0x351000db, 0x36700000, - 0x36700030, 0x36700036, 0x36700040, 0x3670005b, - 0x367000d9, 0x36700116, 0x3670011b, 0x36800000, - 0x36800052, 0x36a00000, 0x36a000da, 0x36c00000, - 0x36c00052, 0x36f00000, 0x37500000, 0x37600000, - // Entry 220 - 23F - 0x37a00000, 0x38000000, 0x38000117, 0x38700000, - 0x38900000, 0x38900131, 0x39000000, 0x3900006f, - 0x390000a4, 0x39500000, 0x39500099, 0x39800000, - 0x3980007d, 0x39800106, 0x39d00000, 0x39d05000, - 0x39d050e8, 0x39d33000, 0x39d33099, 0x3a100000, - 0x3b300000, 0x3b3000e9, 0x3bd00000, 0x3bd00001, - 0x3be00000, 0x3be00024, 0x3c000000, 0x3c00002a, - 0x3c000041, 0x3c00004e, 0x3c00005a, 0x3c000086, - // Entry 240 - 25F - 0x3c00008b, 0x3c0000b7, 0x3c0000c6, 0x3c0000d1, - 0x3c0000ee, 0x3c000118, 0x3c000126, 0x3c400000, - 0x3c40003f, 0x3c400069, 0x3c4000e4, 0x3d400000, - 0x3d40004e, 0x3d900000, 0x3d90003a, 0x3dc00000, - 0x3dc000bc, 0x3dc00104, 0x3de00000, 0x3de0012f, - 0x3e200000, 0x3e200047, 0x3e2000a5, 0x3e2000ae, - 0x3e2000bc, 0x3e200106, 0x3e200130, 0x3e500000, - 0x3e500107, 0x3e600000, 0x3e60012f, 0x3eb00000, - // Entry 260 - 27F - 0x3eb00106, 0x3ec00000, 0x3ec000a4, 0x3f300000, - 0x3f30012f, 0x3fa00000, 0x3fa000e8, 0x3fc00000, - 0x3fd00000, 0x3fd00072, 0x3fd000da, 0x3fd0010c, - 0x3ff00000, 0x3ff000d1, 0x40100000, 0x401000c3, - 0x40200000, 0x4020004c, 0x40700000, 0x40800000, - 0x40857000, 0x408570ba, 0x408dc000, 0x408dc0ba, - 0x40c00000, 0x40c000b3, 0x41200000, 0x41200111, - 0x41600000, 0x4160010f, 0x41c00000, 0x41d00000, - // Entry 280 - 29F - 0x41e00000, 0x41f00000, 0x41f00072, 0x42200000, - 0x42300000, 0x42300164, 0x42900000, 0x42900062, - 0x4290006f, 0x429000a4, 0x42900115, 0x43100000, - 0x43100027, 0x431000c2, 0x4310014d, 0x43200000, - 0x4321f000, 0x4321f033, 0x4321f0bd, 0x4321f105, - 0x4321f14d, 0x43257000, 0x43257033, 0x432570bd, - 0x43257105, 0x4325714d, 0x43700000, 0x43a00000, - 0x43b00000, 0x44400000, 0x44400031, 0x44400072, - // Entry 2A0 - 2BF - 0x4440010c, 0x44500000, 0x4450004b, 0x445000a4, - 0x4450012f, 0x44500131, 0x44e00000, 0x45000000, - 0x45000099, 0x450000b3, 0x450000d0, 0x4500010d, - 0x46100000, 0x46100099, 0x46400000, 0x464000a4, - 0x46400131, 0x46700000, 0x46700124, 0x46b00000, - 0x46b00123, 0x46f00000, 0x46f0006d, 0x46f0006f, - 0x47100000, 0x47600000, 0x47600127, 0x47a00000, - 0x48000000, 0x48200000, 0x48200129, 0x48a00000, - // Entry 2C0 - 2DF - 0x48a0005d, 0x48a0012b, 0x48e00000, 0x49400000, - 0x49400106, 0x4a400000, 0x4a4000d4, 0x4a900000, - 0x4a9000ba, 0x4ac00000, 0x4ac00053, 0x4ae00000, - 0x4ae00130, 0x4b400000, 0x4b400099, 0x4b4000e8, - 0x4bc00000, 0x4bc05000, 0x4bc05024, 0x4bc1f000, - 0x4bc1f137, 0x4bc57000, 0x4bc57137, 0x4be00000, - 0x4be57000, 0x4be570b4, 0x4bee3000, 0x4bee30b4, - 0x4c000000, 0x4c300000, 0x4c30013e, 0x4c900000, - // Entry 2E0 - 2FF - 0x4c900001, 0x4cc00000, 0x4cc0012f, 0x4ce00000, - 0x4cf00000, 0x4cf0004e, 0x4e500000, 0x4e500114, - 0x4f200000, 0x4fb00000, 0x4fb00131, 0x50900000, - 0x50900052, 0x51200000, 0x51200001, 0x51800000, - 0x5180003b, 0x518000d6, 0x51f00000, 0x51f38000, - 0x51f38053, 0x51f39000, 0x51f3908d, 0x52800000, - 0x528000ba, 0x52900000, 0x52938000, 0x52938053, - 0x5293808d, 0x529380c6, 0x5293810d, 0x52939000, - // Entry 300 - 31F - 0x5293908d, 0x529390c6, 0x5293912e, 0x52f00000, - 0x52f00161, -} // Size: 3116 bytes - -const specialTagsStr string = "ca-ES-valencia en-US-u-va-posix" - var regionToGroups = []uint8{ // 357 elements // Entry 0 - 3F 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, @@ -1302,4 +295,4 @@ 14: {lang: 0x529, script: 0x39, group: 0x80, distance: 0x5}, } // Size: 114 bytes -// Total table size 4618 bytes (4KiB); checksum: D161A896 +// Total table size 1471 bytes (1KiB); checksum: 4CB1CD46
diff --git a/language/tags.go b/language/tags.go index acc482a..42ea792 100644 --- a/language/tags.go +++ b/language/tags.go
@@ -4,6 +4,8 @@ package language +import "golang.org/x/text/internal/language/compact" + // TODO: Various sets of commonly use tags and regions. // MustParse is like Parse, but panics if the given BCP 47 tag cannot be parsed. @@ -61,83 +63,83 @@ Und Tag = Tag{} - Afrikaans Tag = Tag{language: afIndex, locale: afIndex} - Amharic Tag = Tag{language: amIndex, locale: amIndex} - Arabic Tag = Tag{language: arIndex, locale: arIndex} - ModernStandardArabic Tag = Tag{language: ar001Index, locale: ar001Index} - Azerbaijani Tag = Tag{language: azIndex, locale: azIndex} - Bulgarian Tag = Tag{language: bgIndex, locale: bgIndex} - Bengali Tag = Tag{language: bnIndex, locale: bnIndex} - Catalan Tag = Tag{language: caIndex, locale: caIndex} - Czech Tag = Tag{language: csIndex, locale: csIndex} - Danish Tag = Tag{language: daIndex, locale: daIndex} - German Tag = Tag{language: deIndex, locale: deIndex} - Greek Tag = Tag{language: elIndex, locale: elIndex} - English Tag = Tag{language: enIndex, locale: enIndex} - AmericanEnglish Tag = Tag{language: enUSIndex, locale: enUSIndex} - BritishEnglish Tag = Tag{language: enGBIndex, locale: enGBIndex} - Spanish Tag = Tag{language: esIndex, locale: esIndex} - EuropeanSpanish Tag = Tag{language: esESIndex, locale: esESIndex} - LatinAmericanSpanish Tag = Tag{language: es419Index, locale: es419Index} - Estonian Tag = Tag{language: etIndex, locale: etIndex} - Persian Tag = Tag{language: faIndex, locale: faIndex} - Finnish Tag = Tag{language: fiIndex, locale: fiIndex} - Filipino Tag = Tag{language: filIndex, locale: filIndex} - French Tag = Tag{language: frIndex, locale: frIndex} - CanadianFrench Tag = Tag{language: frCAIndex, locale: frCAIndex} - Gujarati Tag = Tag{language: guIndex, locale: guIndex} - Hebrew Tag = Tag{language: heIndex, locale: heIndex} - Hindi Tag = Tag{language: hiIndex, locale: hiIndex} - Croatian Tag = Tag{language: hrIndex, locale: hrIndex} - Hungarian Tag = Tag{language: huIndex, locale: huIndex} - Armenian Tag = Tag{language: hyIndex, locale: hyIndex} - Indonesian Tag = Tag{language: idIndex, locale: idIndex} - Icelandic Tag = Tag{language: isIndex, locale: isIndex} - Italian Tag = Tag{language: itIndex, locale: itIndex} - Japanese Tag = Tag{language: jaIndex, locale: jaIndex} - Georgian Tag = Tag{language: kaIndex, locale: kaIndex} - Kazakh Tag = Tag{language: kkIndex, locale: kkIndex} - Khmer Tag = Tag{language: kmIndex, locale: kmIndex} - Kannada Tag = Tag{language: knIndex, locale: knIndex} - Korean Tag = Tag{language: koIndex, locale: koIndex} - Kirghiz Tag = Tag{language: kyIndex, locale: kyIndex} - Lao Tag = Tag{language: loIndex, locale: loIndex} - Lithuanian Tag = Tag{language: ltIndex, locale: ltIndex} - Latvian Tag = Tag{language: lvIndex, locale: lvIndex} - Macedonian Tag = Tag{language: mkIndex, locale: mkIndex} - Malayalam Tag = Tag{language: mlIndex, locale: mlIndex} - Mongolian Tag = Tag{language: mnIndex, locale: mnIndex} - Marathi Tag = Tag{language: mrIndex, locale: mrIndex} - Malay Tag = Tag{language: msIndex, locale: msIndex} - Burmese Tag = Tag{language: myIndex, locale: myIndex} - Nepali Tag = Tag{language: neIndex, locale: neIndex} - Dutch Tag = Tag{language: nlIndex, locale: nlIndex} - Norwegian Tag = Tag{language: noIndex, locale: noIndex} - Punjabi Tag = Tag{language: paIndex, locale: paIndex} - Polish Tag = Tag{language: plIndex, locale: plIndex} - Portuguese Tag = Tag{language: ptIndex, locale: ptIndex} - BrazilianPortuguese Tag = Tag{language: ptBRIndex, locale: ptBRIndex} - EuropeanPortuguese Tag = Tag{language: ptPTIndex, locale: ptPTIndex} - Romanian Tag = Tag{language: roIndex, locale: roIndex} - Russian Tag = Tag{language: ruIndex, locale: ruIndex} - Sinhala Tag = Tag{language: siIndex, locale: siIndex} - Slovak Tag = Tag{language: skIndex, locale: skIndex} - Slovenian Tag = Tag{language: slIndex, locale: slIndex} - Albanian Tag = Tag{language: sqIndex, locale: sqIndex} - Serbian Tag = Tag{language: srIndex, locale: srIndex} - SerbianLatin Tag = Tag{language: srLatnIndex, locale: srLatnIndex} - Swedish Tag = Tag{language: svIndex, locale: svIndex} - Swahili Tag = Tag{language: swIndex, locale: swIndex} - Tamil Tag = Tag{language: taIndex, locale: taIndex} - Telugu Tag = Tag{language: teIndex, locale: teIndex} - Thai Tag = Tag{language: thIndex, locale: thIndex} - Turkish Tag = Tag{language: trIndex, locale: trIndex} - Ukrainian Tag = Tag{language: ukIndex, locale: ukIndex} - Urdu Tag = Tag{language: urIndex, locale: urIndex} - Uzbek Tag = Tag{language: uzIndex, locale: uzIndex} - Vietnamese Tag = Tag{language: viIndex, locale: viIndex} - Chinese Tag = Tag{language: zhIndex, locale: zhIndex} - SimplifiedChinese Tag = Tag{language: zhHansIndex, locale: zhHansIndex} - TraditionalChinese Tag = Tag{language: zhHantIndex, locale: zhHantIndex} - Zulu Tag = Tag{language: zuIndex, locale: zuIndex} + Afrikaans Tag = Tag(compact.Afrikaans) + Amharic Tag = Tag(compact.Amharic) + Arabic Tag = Tag(compact.Arabic) + ModernStandardArabic Tag = Tag(compact.ModernStandardArabic) + Azerbaijani Tag = Tag(compact.Azerbaijani) + Bulgarian Tag = Tag(compact.Bulgarian) + Bengali Tag = Tag(compact.Bengali) + Catalan Tag = Tag(compact.Catalan) + Czech Tag = Tag(compact.Czech) + Danish Tag = Tag(compact.Danish) + German Tag = Tag(compact.German) + Greek Tag = Tag(compact.Greek) + English Tag = Tag(compact.English) + AmericanEnglish Tag = Tag(compact.AmericanEnglish) + BritishEnglish Tag = Tag(compact.BritishEnglish) + Spanish Tag = Tag(compact.Spanish) + EuropeanSpanish Tag = Tag(compact.EuropeanSpanish) + LatinAmericanSpanish Tag = Tag(compact.LatinAmericanSpanish) + Estonian Tag = Tag(compact.Estonian) + Persian Tag = Tag(compact.Persian) + Finnish Tag = Tag(compact.Finnish) + Filipino Tag = Tag(compact.Filipino) + French Tag = Tag(compact.French) + CanadianFrench Tag = Tag(compact.CanadianFrench) + Gujarati Tag = Tag(compact.Gujarati) + Hebrew Tag = Tag(compact.Hebrew) + Hindi Tag = Tag(compact.Hindi) + Croatian Tag = Tag(compact.Croatian) + Hungarian Tag = Tag(compact.Hungarian) + Armenian Tag = Tag(compact.Armenian) + Indonesian Tag = Tag(compact.Indonesian) + Icelandic Tag = Tag(compact.Icelandic) + Italian Tag = Tag(compact.Italian) + Japanese Tag = Tag(compact.Japanese) + Georgian Tag = Tag(compact.Georgian) + Kazakh Tag = Tag(compact.Kazakh) + Khmer Tag = Tag(compact.Khmer) + Kannada Tag = Tag(compact.Kannada) + Korean Tag = Tag(compact.Korean) + Kirghiz Tag = Tag(compact.Kirghiz) + Lao Tag = Tag(compact.Lao) + Lithuanian Tag = Tag(compact.Lithuanian) + Latvian Tag = Tag(compact.Latvian) + Macedonian Tag = Tag(compact.Macedonian) + Malayalam Tag = Tag(compact.Malayalam) + Mongolian Tag = Tag(compact.Mongolian) + Marathi Tag = Tag(compact.Marathi) + Malay Tag = Tag(compact.Malay) + Burmese Tag = Tag(compact.Burmese) + Nepali Tag = Tag(compact.Nepali) + Dutch Tag = Tag(compact.Dutch) + Norwegian Tag = Tag(compact.Norwegian) + Punjabi Tag = Tag(compact.Punjabi) + Polish Tag = Tag(compact.Polish) + Portuguese Tag = Tag(compact.Portuguese) + BrazilianPortuguese Tag = Tag(compact.BrazilianPortuguese) + EuropeanPortuguese Tag = Tag(compact.EuropeanPortuguese) + Romanian Tag = Tag(compact.Romanian) + Russian Tag = Tag(compact.Russian) + Sinhala Tag = Tag(compact.Sinhala) + Slovak Tag = Tag(compact.Slovak) + Slovenian Tag = Tag(compact.Slovenian) + Albanian Tag = Tag(compact.Albanian) + Serbian Tag = Tag(compact.Serbian) + SerbianLatin Tag = Tag(compact.SerbianLatin) + Swedish Tag = Tag(compact.Swedish) + Swahili Tag = Tag(compact.Swahili) + Tamil Tag = Tag(compact.Tamil) + Telugu Tag = Tag(compact.Telugu) + Thai Tag = Tag(compact.Thai) + Turkish Tag = Tag(compact.Turkish) + Ukrainian Tag = Tag(compact.Ukrainian) + Urdu Tag = Tag(compact.Urdu) + Uzbek Tag = Tag(compact.Uzbek) + Vietnamese Tag = Tag(compact.Vietnamese) + Chinese Tag = Tag(compact.Chinese) + SimplifiedChinese Tag = Tag(compact.SimplifiedChinese) + TraditionalChinese Tag = Tag(compact.TraditionalChinese) + Zulu Tag = Tag(compact.Zulu) )