More license tweaks

This commit is contained in:
Arthur Barr
2017-11-30 15:20:00 +00:00
parent 81b5db4969
commit 70f1a43fd8
2 changed files with 5 additions and 2 deletions

View File

@@ -36,7 +36,8 @@ func resolveLicenseFile() string {
return "Chinese_TW.txt"
case strings.HasPrefix(lang, "zh"):
return "Chinese.txt"
case strings.HasPrefix(lang, "cs"):
// Differentiate Czech (cs) and Kashubian (csb)
case strings.HasPrefix(lang, "cs") && !strings.HasPrefix(lang, "csb"):
return "Czech.txt"
case strings.HasPrefix(lang, "fr"):
return "French.txt"
@@ -50,7 +51,7 @@ func resolveLicenseFile() string {
return "Italian.txt"
case strings.HasPrefix(lang, "ja"):
return "Japanese.txt"
// Need to differentiate Korean (ko) from Konkani (kok)
// Differentiate Korean (ko) from Konkani (kok)
case strings.HasPrefix(lang, "ko") && !strings.HasPrefix(lang, "kok"):
return "Korean.txt"
case strings.HasPrefix(lang, "lt"):

View File

@@ -25,6 +25,7 @@ var licenseTests = []struct {
out string
}{
{"en_US.UTF_8", "English.txt"},
{"en_US.ISO-8859-15", "English.txt"},
{"es_GB", "Spanish.txt"},
{"el_ES.UTF_8", "Greek.txt"},
// Cover a wide variety of valid values
@@ -59,6 +60,7 @@ var licenseTests = []struct {
{"ca_ES", "English.txt"},
{"cs", "Czech.txt"},
{"cs_CZ", "Czech.txt"},
{"csb_PL", "English.txt"},
{"cy", "English.txt"},
{"cy_GB", "English.txt"},
{"da", "English.txt"},