Skip to content

Commit

Permalink
Revert to 2-letter locale codes for non-country specific locales
Browse files Browse the repository at this point in the history
yeah this is annoying
  • Loading branch information
pizzaboxer committed Jul 8, 2024
1 parent 7bc303d commit b4e88ed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 30 deletions.
48 changes: 24 additions & 24 deletions Bloxstrap/Locale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ internal static class Locale
{ "nil", Strings.Common_SystemDefault },
{ "en", "English" },
{ "en-US", "English (United States)" },
{ "ar-SA", "العربية" },
{ "bg-BG", "Български" },
{ "bn-BD", "বাংলা" },
{ "ar", "العربية" },
{ "bg", "Български" },
{ "bn", "বাংলা" },
{ "bs", "Босански" },
// { "cs", "Čeština" },
{ "de-DE", "Deutsch" },
{ "de", "Deutsch" },
// { "dk", "Dansk" },
{ "es-ES", "Español" },
{ "fil-PH", "Filipino" },
{ "fi-FI", "Suomi" },
{ "fr-FR", "Français" },
{ "he-IL", "עברית‎" },
{ "hr-HR", "Hrvatski" },
{ "hi-IN", "Hindi (Latin)" },
{ "hu-HU", "Magyar" },
{ "id-ID", "Bahasa Indonesia" },
{ "it-IT", "Italiano" },
{ "ja-JP", "日本語" },
{ "ko-KR", "한국어" },
{ "lt-LT", "Lietuvių" },
{ "no-NO", "Bokmål" },
{ "fi", "Suomi" },
{ "fil", "Filipino" },
{ "fr", "Français" },
{ "he", "עברית‎" },
{ "hi", "Hindi (Latin)" },
{ "hr", "Hrvatski" },
{ "hu", "Magyar" },
{ "id", "Bahasa Indonesia" },
{ "it", "Italiano" },
{ "ja", "日本語" },
{ "ko", "한국어" },
{ "lt", "Lietuvių" },
{ "no", "Bokmål" },
// { "nl", "Nederlands" },
{ "pl-PL", "Polski" },
{ "pl", "Polski" },
{ "pt-BR", "Português (Brasil)" },
{ "ro-RO", "Română" },
{ "ru-RU", "Русский" },
{ "ro", "Română" },
{ "ru", "Русский" },
{ "sv-SE", "Svenska" },
{ "th-TH", "ภาษาไทย" },
{ "tr-TR", "Türkçe" },
{ "uk-UA", "Yкраїньска" },
{ "vi-VN", "Tiếng Việt" },
{ "th", "ภาษาไทย" },
{ "tr", "Türkçe" },
{ "uk", "Yкраїньска" },
{ "vi", "Tiếng Việt" },
{ "zh-CN", "中文 (简体)" },
{ "zh-HK", "中文 (廣東話)" },
{ "zh-TW", "中文 (繁體)" }
Expand Down
9 changes: 3 additions & 6 deletions Scripts/Translations/prep.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import glob, shutil
import glob, shutil, re

exports = input("Path of folder of exported Crowdin files: ")
dest = input("Destination resources folder: ")

for filename in glob.glob(f"{exports}\\**\\*.*", recursive=True):
print(f"Copying {filename}")

suffix = ""
localeCode = re.search("\\\\([a-zA-Z\\-]+)\\\\Strings.", filename).group(1)

if filename.endswith("Strings.bs-BA.resx"):
suffix = "\\Strings.bs.resx"

shutil.copy(filename, dest + suffix)
shutil.copy(filename, dest + f"\\Strings.{localeCode}.resx")

0 comments on commit b4e88ed

Please sign in to comment.