From 542a3378d39e7b6c2b79c1278b2cd7bca2251020 Mon Sep 17 00:00:00 2001 From: Zvika Haramaty Date: Tue, 27 Oct 2020 11:08:44 +0200 Subject: [PATCH] I18N: Always call BiDi algorithm for U32String U32String can contain characters from all languages, without relation to the GUI's language. Therefore, we need to always call it. Use case: In Hebrew SQ3, when using the game's original save/restore dialogs, it's possible to give save games Hebrew names. What happens when we then use ScummVM's load dialog? - If ScummVM's GUI language is Hebrew, it's calling BiDI algo, and the text direction is OK. - However, if ScummVM's GUI language is English, before this commit it didn't call the BiDI algo, and the text was reversed. --- common/translation.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/translation.cpp b/common/translation.cpp index fe5d1e9397c..336e26f940d 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -412,9 +412,6 @@ bool TranslationManager::checkHeader(File &in) { } U32String TranslationManager::convertBiDiString(const U32String &input) { - if (getCurrentLanguage() != "he") //TODO: modify when we'll support other RTL languages, such as Arabic and Farsi - return input; - return Common::convertBiDiU32String(input).visual; }