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.
This commit is contained in:
Zvika Haramaty 2020-10-27 11:08:44 +02:00 committed by Thierry Crozat
parent 2d64cba73a
commit 542a3378d3

View File

@ -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;
}