diff --git a/crowdin.yml b/crowdin.yml index 871e29a0e..18dbc5e64 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,4 +1,4 @@ -project_id_env: BOOTSTRAP_CROWDIN_ID +project_id: 452474 api_token_env: CROWDIN_TOKEN preserve_hierarchy: true diff --git a/retail/arm9/source/conf_sd.cpp b/retail/arm9/source/conf_sd.cpp index fc163a9f6..c464dabd2 100644 --- a/retail/arm9/source/conf_sd.cpp +++ b/retail/arm9/source/conf_sd.cpp @@ -338,6 +338,9 @@ void getIgmStrings(configuration* conf, bool b4ds) { extendedFont = IgmFont::arabic; extendedFontPath = "nitro:/fonts/arabic.lz77"; igmText->rtl = true; + } else if (strncmp(conf->guiLanguage, "zh", 2) == 0) { + extendedFont = IgmFont::chinese; + extendedFontPath = "nitro:/fonts/chinese.lz77"; } else if (strcmp(conf->guiLanguage, "ru") == 0 || strcmp(conf->guiLanguage, "uk") == 0) { extendedFont = IgmFont::cyrillic; extendedFontPath = "nitro:/fonts/cyrillic.lz77"; @@ -354,9 +357,9 @@ void getIgmStrings(configuration* conf, bool b4ds) { } else if (strcmp(conf->guiLanguage, "ja") == 0 || strcmp(conf->guiLanguage, "ry") == 0) { extendedFont = IgmFont::japanese; extendedFontPath = "nitro:/fonts/japanese.lz77"; - } else if (strncmp(conf->guiLanguage, "zh", 2) == 0) { - extendedFont = IgmFont::chinese; - extendedFontPath = "nitro:/fonts/chinese.lz77"; + } else if (strncmp(conf->guiLanguage, "vi", 2) == 0) { + extendedFont = IgmFont::vietnamese; + extendedFontPath = "nitro:/fonts/vietnamese.lz77"; } FILE *font = fopen("nitro:/fonts/ascii.lz77", "rb"); diff --git a/retail/arm9/source/text.cpp b/retail/arm9/source/text.cpp index 9a02f6d7f..eef05528c 100644 --- a/retail/arm9/source/text.cpp +++ b/retail/arm9/source/text.cpp @@ -6,6 +6,16 @@ IgmFont extendedFont = IgmFont::extendedLatin; +constexpr char16_t mapAscii[] = + u"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" + u"ẲẴẪỶỸỴ\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F" + u" !\"#$%&'()*+,-./" + u"0123456789:;<=>?" + u"@ABCDEFGHIJKLMNO" + u"PQRSTUVWXYZ[\\]^_" + u"`abcdefghijklmno" + u"pqrstuvwxyz{|}~\x7F"; + constexpr char16_t mapArabic[] = u"ءآأؤإئابةتثجحخدذ" u"رزسشصضطظعغـفقكلم" @@ -16,6 +26,13 @@ constexpr char16_t mapArabic[] = u"ﻔﻖﻗﻘﻚﻛﻜﻞﻟﻠﻢﻣﻤﻦﻧﻨ" u"ﻪﻫﻬﻮﻰﻲﻳﻴ،؟ﻻﻼ"; +constexpr char16_t mapChinese[] = + u"主书亮位儲出到动動区器回图圖地址" + u"块存定屏幕底度式戏截戲择擇数數时" + u"明显時書查模檢游率界畫目看移端置" + u"自至螢視計設說说跳轉转返退选遊選" + u"部重量鐘钟開離面音頂頻顶项频 "; + constexpr char16_t mapCyrillic[] = u"ЂЃ ѓ Љ ЊЌЋЏ" u"ђ љ њќћџ" @@ -68,22 +85,27 @@ constexpr char16_t mapJapanese[] = u"上下主了動定度戻択数明書画終自設" u"説速選量面音"; -constexpr char16_t mapChinese[] = - u"主书亮位儲出到动動区器回图圖地址" - u"块存定屏幕底度式戏截戲择擇数數时" - u"明显時書查模檢游率界畫目看移端置" - u"自至螢視計設說说跳轉转返退选遊選" - u"部重量鐘钟開離面音頂頻顶项频 "; +constexpr char16_t mapVietnamese[] = + u"ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐ" + u"ỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲ" + u"Õắằặấầẩậẽẹếềểễệố" + u"ồổỗỠƠộờởịỰỨỪỬơớƯ" + u"ÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳ" + u"ĐứÒÓÔạỷừửÙÚỹỵÝỡư" + u"àáâãảăữẫèéêẻìíĩỉ" + u"đựòóôõỏọụùúũủýợỮ"; + constexpr const char16_t *extendedMaps[] = { mapArabic, + mapChinese, mapCyrillic, mapExtendedLatin, mapGreek, mapHangul, mapHebrew, mapJapanese, - mapChinese + mapVietnamese }; std::map> arabicPresentationForms = { @@ -135,13 +157,15 @@ std::map> arabicPresentationForms = { // Can't do a binary search as the maps aren't fully sorted constexpr char getIndex(char16_t c) { - if(c < 0x80) { // ASCII is left as is - return c; - } else { - for(uint i = 0; i < 0x80; i++) { - if(c == extendedMaps[u8(extendedFont)][i]) { - return 0x80 + i; - } + for(uint i = 0; i < 0x80; i++) { + if(c == mapAscii[i]) { + return i; + } + } + + for(uint i = 0; i < 0x80; i++) { + if(c == extendedMaps[u8(extendedFont)][i]) { + return 0x80 + i; } } @@ -208,7 +232,7 @@ void processRTL(unsigned char *begin, unsigned char *end) { } } - char16_t c = *p < 0x80 ? *p : extendedMaps[u8(extendedFont)][(*p) - 0x80]; + char16_t c = *p < 0x80 ? mapAscii[*p] : extendedMaps[u8(extendedFont)][(*p) - 0x80]; nocashMessage(("a" + std::to_string(c)).c_str()); // If at the end of an LTR section within RTL, jump back to the RTL @@ -217,7 +241,7 @@ void processRTL(unsigned char *begin, unsigned char *end) { break; p = ltrBegin; - c = *p < 0x80 ? *p : extendedMaps[u8(extendedFont)][(*p) - 0x80]; + c = *p < 0x80 ? mapAscii[*p] : extendedMaps[u8(extendedFont)][(*p) - 0x80]; ltrBegin = end; rtl = true; // If in RTL and hit a non-RTL character that's not punctuation, switch to LTR @@ -233,7 +257,7 @@ void processRTL(unsigned char *begin, unsigned char *end) { if(allNumbers && !isNumber(c) && !isWeak(c)) allNumbers = false; p--; - c = *p < 0x80 ? *p : extendedMaps[u8(extendedFont)][(*p) - 0x80]; + c = *p < 0x80 ? mapAscii[*p] : extendedMaps[u8(extendedFont)][(*p) - 0x80]; } // Save where we are to return to after printing the LTR section @@ -242,7 +266,7 @@ void processRTL(unsigned char *begin, unsigned char *end) { // If on an RTL char right now, add one if(isStrongRTL(c)) { p++; - c = *p < 0x80 ? *p : extendedMaps[u8(extendedFont)][(*p) - 0x80]; + c = *p < 0x80 ? mapAscii[*p] : extendedMaps[u8(extendedFont)][(*p) - 0x80]; } // Remove all punctuation and, if the section isn't only numbers, @@ -252,14 +276,14 @@ void processRTL(unsigned char *begin, unsigned char *end) { if(p != begin) ltrBegin++; p++; - c = *p < 0x80 ? *p : extendedMaps[u8(extendedFont)][(*p) - 0x80]; + c = *p < 0x80 ? mapAscii[*p] : extendedMaps[u8(extendedFont)][(*p) - 0x80]; } } else { while(isWeak(c)) { if(p != begin) ltrBegin++; p++; - c = *p < 0x80 ? *p : extendedMaps[u8(extendedFont)][(*p) - 0x80]; + c = *p < 0x80 ? mapAscii[*p] : extendedMaps[u8(extendedFont)][(*p) - 0x80]; } } @@ -269,7 +293,7 @@ void processRTL(unsigned char *begin, unsigned char *end) { ltrBegin--; p--; } - c = *p < 0x80 ? *p : extendedMaps[u8(extendedFont)][(*p) - 0x80]; + c = *p < 0x80 ? mapAscii[*p] : extendedMaps[u8(extendedFont)][(*p) - 0x80]; rtl = false; } diff --git a/retail/common/include/igm_text.h b/retail/common/include/igm_text.h index b894e010d..5fbbf465b 100644 --- a/retail/common/include/igm_text.h +++ b/retail/common/include/igm_text.h @@ -30,13 +30,14 @@ static_assert(sizeof(IgmText) == 0xA0C, "IgmText is too big! Allocate more space enum class IgmFont : u8 { arabic = 0, - cyrillic = 1, - extendedLatin = 2, - greek = 3, - hangul = 4, - hebrew = 5, - japanese = 6, - chinese = 7 + chinese = 1, + cyrillic = 2, + extendedLatin = 3, + greek = 4, + hangul = 5, + hebrew = 6, + japanese = 7, + vietnamese = 8 }; #endif diff --git a/retail/nitrofiles/fonts/ascii.lz77 b/retail/nitrofiles/fonts/ascii.lz77 index f444e33cc..5b3466255 100644 Binary files a/retail/nitrofiles/fonts/ascii.lz77 and b/retail/nitrofiles/fonts/ascii.lz77 differ diff --git a/retail/nitrofiles/fonts/vietnamese.lz77 b/retail/nitrofiles/fonts/vietnamese.lz77 new file mode 100644 index 000000000..ffe01c429 Binary files /dev/null and b/retail/nitrofiles/fonts/vietnamese.lz77 differ diff --git a/retail/nitrofiles/languages/ar/in_game_menu.ini b/retail/nitrofiles/languages/ar/in_game_menu.ini index 208389ae3..f5ba614ac 100644 --- a/retail/nitrofiles/languages/ar/in_game_menu.ini +++ b/retail/nitrofiles/languages/ar/in_game_menu.ini @@ -8,16 +8,16 @@ COUNT=عدد: RETURN_TO_GAME=العودة الى اللعبة RESET_GAME=إعادة تعيين اللعبة SCREENSHOT=لقطة شاشة... -MANUAL=Manual... -DUMP_RAM=Dump RAM +MANUAL=دليل... +DUMP_RAM=إيداع RAM OPTIONS=خيارات... RAM_VIEWER=عارض RAM... QUIT_GAME=إنهاء اللعبة [OPTIONS] MAIN_SCREEN=الشاشة الرئيسية -BRIGHTNESS=Brightness -VOLUME=Volume +BRIGHTNESS=إضاءة +VOLUME=الصوت CLOCK_SPEED=معدل ساعة VRAM_MODE=وضع VRAM diff --git a/retail/nitrofiles/languages/cs/in_game_menu.ini b/retail/nitrofiles/languages/cs/in_game_menu.ini new file mode 100644 index 000000000..945845e27 --- /dev/null +++ b/retail/nitrofiles/languages/cs/in_game_menu.ini @@ -0,0 +1,31 @@ +[TITLES] +RAM_VIEWER=Prohlížeč RAM +JUMP_ADDRESS=Skok na Adresu +SELECT_BANK=Výběr Banky VRAM +COUNT=Počet: + +[MENU] +RETURN_TO_GAME=Zpět do Hry +RESET_GAME=Obnovení Hry +SCREENSHOT=Snímek... +MANUAL=Malá Příručka... +DUMP_RAM=Výpis RAM +OPTIONS=Způsoby... +RAM_VIEWER=Prohlížeč RAM... +QUIT_GAME=Přerušit Hru + +[OPTIONS] +MAIN_SCREEN=Brinský Výběr +BRIGHTNESS=Jasnost +VOLUME=Pracujte +CLOCK_SPEED=Rychlost Hodin +VRAM_MODE=Režim VRAM + +AUTO=Autom +BOTTOM=Pozemek +TOP=Primární +67_MHZ=67 MHz +133_MHZ=133 MHz +DS_MODE=Režim DS +DSI_MODE=Režim DSi + diff --git a/retail/nitrofiles/languages/da/in_game_menu.ini b/retail/nitrofiles/languages/da/in_game_menu.ini index e25120b1e..8c996e816 100644 --- a/retail/nitrofiles/languages/da/in_game_menu.ini +++ b/retail/nitrofiles/languages/da/in_game_menu.ini @@ -8,7 +8,7 @@ COUNT=Antal: RETURN_TO_GAME=Tilbage til spil RESET_GAME=Nulstil spil SCREENSHOT=Skærmbillede... -MANUAL=Manual... +MANUAL=Vejledning... DUMP_RAM=Dump RAM OPTIONS=Indstillinger... RAM_VIEWER=RAM-fremviser... @@ -16,8 +16,8 @@ QUIT_GAME=Afslut spil [OPTIONS] MAIN_SCREEN=Primær skærm -BRIGHTNESS=Brightness -VOLUME=Volume +BRIGHTNESS=Belysning +VOLUME=Styrke CLOCK_SPEED=CPU-hastighed VRAM_MODE=VRAM-tilstand diff --git a/retail/nitrofiles/languages/el/in_game_menu.ini b/retail/nitrofiles/languages/el/in_game_menu.ini index 9e8faafb3..173a9b001 100644 --- a/retail/nitrofiles/languages/el/in_game_menu.ini +++ b/retail/nitrofiles/languages/el/in_game_menu.ini @@ -1,29 +1,29 @@ [TITLES] -RAM_VIEWER=RAM Viewer -JUMP_ADDRESS=Jump to Address -SELECT_BANK=Select VRAM Bank -COUNT=Count: +RAM_VIEWER=Παρατηρητής RAM +JUMP_ADDRESS=Εμπόδιο σε Δ/νση +SELECT_BANK=Επιλέξτε Τράπ. VRAM +COUNT=Υπολογισμός: [MENU] RETURN_TO_GAME=Πίσω στο παιχνίδι -RESET_GAME=Reset Game +RESET_GAME=Παιχνίδι Επαν. SCREENSHOT=Στιγμιότυπο... -MANUAL=Manual... -DUMP_RAM=Dump RAM +MANUAL=Οδηγός... +DUMP_RAM=Ξεφορτώστε τη RAM OPTIONS=Επιλογές... -RAM_VIEWER=RAM Viewer... -QUIT_GAME=Quit Game +RAM_VIEWER=Παρατηρητής RAM... +QUIT_GAME=Παύση Παιχνιδιού [OPTIONS] -MAIN_SCREEN=Main Screen -BRIGHTNESS=Brightness -VOLUME=Volume +MAIN_SCREEN=Κύρια Οθόνη +BRIGHTNESS=Φωτισμός +VOLUME=Ισχύς CLOCK_SPEED=Ταχύτητα Ρολογιού VRAM_MODE=Λειτ. VRAM AUTO=Αυτόματο -BOTTOM=Bottom -TOP=Top +BOTTOM=Έδαφος +TOP=Επικεφαλής 67_MHZ=67 MHz 133_MHZ=133 MHz DS_MODE=Λειτουργία DS diff --git a/retail/nitrofiles/languages/fi/in_game_menu.ini b/retail/nitrofiles/languages/fi/in_game_menu.ini new file mode 100644 index 000000000..cea515cef --- /dev/null +++ b/retail/nitrofiles/languages/fi/in_game_menu.ini @@ -0,0 +1,31 @@ +[TITLES] +RAM_VIEWER=RAM-valvoja +JUMP_ADDRESS=Hyppää Osoitteeseen +SELECT_BANK=Päätä VRAM-pankki +COUNT=Tiemaksu: + +[MENU] +RETURN_TO_GAME=Tule Peliin +RESET_GAME=Aloita Peli +SCREENSHOT=Näytön Kaappaus... +MANUAL=Opas... +DUMP_RAM=Talletus RAM +OPTIONS=Valintoja... +RAM_VIEWER=RAM-valvoja... +QUIT_GAME=Jätä Peli + +[OPTIONS] +MAIN_SCREEN=Tärkein Näyttö +BRIGHTNESS=Loistokkuus +VOLUME=Äänitaso +CLOCK_SPEED=Kellon Vauhti +VRAM_MODE=Lähestymistapa VRAM + +AUTO=Mekaaninen +BOTTOM=Alhaisin +TOP=Korkein +67_MHZ=67 MHz +133_MHZ=133 MHz +DS_MODE=Lähestymistapa DS +DSI_MODE=Lähestymistapa DSi + diff --git a/retail/nitrofiles/languages/nl/in_game_menu.ini b/retail/nitrofiles/languages/nl/in_game_menu.ini index a646ff944..3be7ca687 100644 --- a/retail/nitrofiles/languages/nl/in_game_menu.ini +++ b/retail/nitrofiles/languages/nl/in_game_menu.ini @@ -1,31 +1,31 @@ [TITLES] -RAM_VIEWER=RAM Bekijken -JUMP_ADDRESS=Ga naar adres +RAM_VIEWER=RAM-viewer +JUMP_ADDRESS=Ga naar Adres SELECT_BANK=Kies VRAM Bank COUNT=Aantal: [MENU] RETURN_TO_GAME=Terug naar het Spel -RESET_GAME=Reset spel +RESET_GAME=Reset Spel SCREENSHOT=Screenshot... MANUAL=Handleiding... DUMP_RAM=Dump RAM OPTIONS=Opties... -RAM_VIEWER=RAM Bekijken... -QUIT_GAME=Spel afsluiten +RAM_VIEWER=RAM-viewer... +QUIT_GAME=Spel Afsluiten [OPTIONS] MAIN_SCREEN=Hoofdscherm BRIGHTNESS=Helderheid VOLUME=Volume CLOCK_SPEED=Kloksnelheid -VRAM_MODE=VRAM Modus +VRAM_MODE=VRAM-modus AUTO=Auto BOTTOM=Onder TOP=Boven 67_MHZ=67 MHz 133_MHZ=133 MHz -DS_MODE=DS modus -DSI_MODE=DSi modus +DS_MODE=DS-modus +DSI_MODE=DSi-modus diff --git a/retail/nitrofiles/languages/pt/in_game_menu.ini b/retail/nitrofiles/languages/pt/in_game_menu.ini index eec956db4..8526da596 100644 --- a/retail/nitrofiles/languages/pt/in_game_menu.ini +++ b/retail/nitrofiles/languages/pt/in_game_menu.ini @@ -8,7 +8,7 @@ COUNT=Contagem: RETURN_TO_GAME=Voltar ao jogo RESET_GAME=Reiniciar jogo SCREENSHOT=Captura de tela... -MANUAL=Manual... +MANUAL=Guia... DUMP_RAM=Exportar RAM OPTIONS=Opções... RAM_VIEWER=Visuali. de RAM... @@ -16,8 +16,8 @@ QUIT_GAME=Sair do jogo [OPTIONS] MAIN_SCREEN=Tela principal -BRIGHTNESS=Brightness -VOLUME=Volume +BRIGHTNESS=Iluminação +VOLUME=Som CLOCK_SPEED=Velocidade de Clock VRAM_MODE=Modo da VRAM diff --git a/retail/nitrofiles/languages/sv/in_game_menu.ini b/retail/nitrofiles/languages/sv/in_game_menu.ini index 38a3ce863..b42a9c64c 100644 --- a/retail/nitrofiles/languages/sv/in_game_menu.ini +++ b/retail/nitrofiles/languages/sv/in_game_menu.ini @@ -1,29 +1,29 @@ [TITLES] RAM_VIEWER=RAM-läsare -JUMP_ADDRESS=Jump to Address -SELECT_BANK=Select VRAM Bank -COUNT=Count: +JUMP_ADDRESS=Bundet till Adress +SELECT_BANK=Bestäm VRAM-bank +COUNT=Totalt: [MENU] -RETURN_TO_GAME=Return to Game -RESET_GAME=Reset Game -SCREENSHOT=Screenshot... -MANUAL=Manual... -DUMP_RAM=Dump RAM -OPTIONS=Options... +RETURN_TO_GAME=Vä. Tillb. ti. Spe. +RESET_GAME=Omstart av Spelet +SCREENSHOT=Skärmfångst... +MANUAL=Vägledning... +DUMP_RAM=Överför RAM-minne +OPTIONS=Valmöjligheter... RAM_VIEWER=RAM-läsare... -QUIT_GAME=Quit Game +QUIT_GAME=Lämna Spelet [OPTIONS] -MAIN_SCREEN=Main Screen -BRIGHTNESS=Brightness -VOLUME=Volume -CLOCK_SPEED=Clock Speed -VRAM_MODE=VRAM Mode +MAIN_SCREEN=Huvuddisplay +BRIGHTNESS=Glans +VOLUME=Ljud Ljudstyrka +CLOCK_SPEED=Tidskräv. Smidigh. +VRAM_MODE=VRAM-form AUTO=Auto -BOTTOM=Bottom -TOP=Top +BOTTOM=Kortast +TOP=Längst 67_MHZ=67 MHz 133_MHZ=133 MHz DS_MODE=DS läge diff --git a/retail/nitrofiles/languages/vi/in_game_menu.ini b/retail/nitrofiles/languages/vi/in_game_menu.ini index 31b9f1f42..e288afb2e 100644 --- a/retail/nitrofiles/languages/vi/in_game_menu.ini +++ b/retail/nitrofiles/languages/vi/in_game_menu.ini @@ -1,29 +1,29 @@ [TITLES] -RAM_VIEWER=RAM Viewer -JUMP_ADDRESS=Jump to Address -SELECT_BANK=Select VRAM Bank -COUNT=Count: +RAM_VIEWER=RAM Hiển thị +JUMP_ADDRESS=Chuyển đến địa chỉ +SELECT_BANK=Chọn ngân hàng VRAM +COUNT=Đếm: [MENU] -RETURN_TO_GAME=Return to Game +RETURN_TO_GAME=Trở lại trò chơi RESET_GAME=Khởi động lại game SCREENSHOT=Chụp màn hình... MANUAL=Hướng dẫn... -DUMP_RAM=Dump RAM +DUMP_RAM=Kết xuất RAM OPTIONS=Tùy chọn... -RAM_VIEWER=RAM Viewer... +RAM_VIEWER=RAM Hiển thị... QUIT_GAME=Thoát Game [OPTIONS] MAIN_SCREEN=Màn hình chính BRIGHTNESS=Độ sáng VOLUME=Âm lượng -CLOCK_SPEED=Clock Speed -VRAM_MODE=VRAM Mode +CLOCK_SPEED=Tốc độ đồng hồ +VRAM_MODE=Chế độ VRAM AUTO=Tự động -BOTTOM=Bottom -TOP=Top +BOTTOM=Dưới cùng +TOP=Trên cùng 67_MHZ=67 MHz 133_MHZ=133 MHz DS_MODE=Chế độ DS diff --git a/xcf/igm_font/ascii.xcf b/xcf/igm_font/ascii.xcf index 235a7c58e..e68b978c0 100644 Binary files a/xcf/igm_font/ascii.xcf and b/xcf/igm_font/ascii.xcf differ diff --git a/xcf/igm_font/vietnamese.xcf b/xcf/igm_font/vietnamese.xcf new file mode 100644 index 000000000..a799a4053 Binary files /dev/null and b/xcf/igm_font/vietnamese.xcf differ