Skip to content

Commit 30aa528

Browse files
authored
Fix line splitting issues from localization changes (#1503)
* fix wrongly split lines from localization changes * skip 0x200B line split guidance like new line if line starts with it
1 parent ff5aae2 commit 30aa528

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

UnleashedRecomp/locale/config_locale.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ CONFIG_DEFINE_ENUM_LOCALE(EControllerIcons)
233233
{
234234
ELanguage::English,
235235
{
236-
{ EControllerIcons::Auto, { "AUTO", "Auto : the game will determine which icons to use based on the current input device." } },
236+
{ EControllerIcons::Auto, { "AUTO", "Auto: the game will determine which icons to use based on the current input device." } },
237237
{ EControllerIcons::Xbox, { "XBOX", "" } },
238238
{ EControllerIcons::PlayStation, { "PLAYSTATION", "" } }
239239
}
@@ -407,7 +407,7 @@ CONFIG_DEFINE_LOCALE(EffectsVolume)
407407
CONFIG_DEFINE_LOCALE(MusicAttenuation)
408408
{
409409
{ ELanguage::English, { "Music Attenuation", "Fade out the game's music when external media is playing." } },
410-
{ ELanguage::Japanese, { "BGM[減衰:げんすい]", "[外部:がいぶ]メディアを\u200B[再生:さいせい]すると\u200Bゲームの\u200B[音楽:おんがく]を\u200Bフェードアウトします" } },
410+
{ ELanguage::Japanese, { "BGM[減衰:げんすい]", "[外部:がいぶ]メディアを\u200B[再生:さいせい]すると\u200Bゲームの\u200B[音楽:おんがく]を\u200Bフェードアウト\u200Bします" } },
411411
{ ELanguage::German, { "Musikdämpfung", "Stelle die Musik des Spiels stumm während externe Medien abgespielt werden." } },
412412
{ ELanguage::French, { "Atténuation audio", "Abaisse le volume des musiques du jeu lorsqu'un média externe est en cours de lecture." } },
413413
{ ELanguage::Spanish, { "Atenuación de música", "Atenúa la música del juego cuando un reproductor multimedia se encuentra activo." } },
@@ -508,7 +508,7 @@ CONFIG_DEFINE_LOCALE(BattleTheme)
508508
CONFIG_DEFINE_LOCALE(WindowSize)
509509
{
510510
{ ELanguage::English, { "Window Size", "Adjust the size of the game window in windowed mode." } },
511-
{ ELanguage::Japanese, { "ウィンドウサイズ", "ウィンドウモードでの\u200Bゲームの\u200Bウィンドウサイズを\u200B[調整:ちょうせい]できます" } },
511+
{ ELanguage::Japanese, { "ウィンドウサイズ", "ウィンドウ\u200Bモードでの\u200Bゲームの\u200Bウィンドウサイズを\u200B[調整:ちょうせい]できます" } },
512512
{ ELanguage::German, { "Fenstergröße", "Ändere die Größe des Spielfensters im Fenstermodus." } },
513513
{ ELanguage::French, { "Taille de la fenêtre", "Modifie la taille de la fenêtre de jeu en mode fenêtré." } },
514514
{ ELanguage::Spanish, { "Tamaño de ventana", "Ajusta el tamaño de la ventana de juego." } },

UnleashedRecomp/locale/locale.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ std::unordered_map<std::string_view, std::unordered_map<ELanguage, std::string>>
366366
{ ELanguage::English, "Installation complete!\nThis project is brought to you by:" },
367367
{ ELanguage::Japanese, "インストール[完了:かんりょう]!\nプロジェクト[制作:せいさく]:" },
368368
{ ELanguage::German, "Installation abgeschlossen!\nDieses Projekt wird präsentiert von:" },
369-
{ ELanguage::French, "Installation terminée !\nCe projet vous est présenté par :" },
369+
{ ELanguage::French, "Installation terminée !\nCe projet vous est présenté\npar :" },
370370
{ ELanguage::Spanish, "¡Instalación completada!\nEste proyecto ha sido posible gracias a:" },
371371
{ ELanguage::Italian, "Installazione completata!\nQuesto progetto è stato creato da:" }
372372
}

UnleashedRecomp/ui/imgui_utils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,11 @@ std::vector<std::string> Split(const char* strStart, const ImFont* font, float f
510510
if (*str == '\n')
511511
str++;
512512

513+
if (strncmp(str, "\u200B", 3) == 0)
514+
{
515+
str += 3;
516+
}
517+
513518
lineStart = str;
514519
continue;
515520
}

0 commit comments

Comments
 (0)