COMMON: moved convertBiDiString(..lang)
to unicode-bidi.h
Continuing the work at https://github.com/scummvm/scummvm/pull/2236, which moved `convertBiDiString(..page)` to unicode-bidi.h, now moving to there also the `(..lang)` flavour. Thus, translation.h has only the SVM-GUI related function, and the two util functions page+code are in unicode-bidi.
This commit is contained in:
parent
a611975561
commit
1f9d421558
4 changed files with 10 additions and 8 deletions
|
@ -460,15 +460,9 @@ String TranslationManager::convertBiDiString(const String &input) {
|
|||
return input;
|
||||
};
|
||||
|
||||
return TranslationManager::convertBiDiString(input, HE_ISR);
|
||||
return Common::convertBiDiString(input, HE_ISR);
|
||||
}
|
||||
|
||||
String TranslationManager::convertBiDiString(const String &input, const Common::Language lang) {
|
||||
if (lang != HE_ISR) //TODO: modify when we'll support other RTL languages, such as Arabic and Farsi
|
||||
return input;
|
||||
|
||||
return Common::convertBiDiString(input, kWindows1255);
|
||||
}
|
||||
|
||||
} // End of namespace Common
|
||||
|
||||
|
|
|
@ -181,7 +181,6 @@ public:
|
|||
* For RTL (Right To Left) languages, returns visual representation of a logical single-line input
|
||||
*/
|
||||
String convertBiDiString(const String &input);
|
||||
String convertBiDiString(const String &input, const Common::Language lang);
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
@ -95,6 +95,13 @@ void UnicodeBiDiText::initWithU32String(const U32String &input) {
|
|||
|
||||
}
|
||||
|
||||
String convertBiDiString(const String &input, const Common::Language lang) {
|
||||
if (lang != Common::HE_ISR) //TODO: modify when we'll support other RTL languages, such as Arabic and Farsi
|
||||
return input;
|
||||
|
||||
return Common::convertBiDiString(input, kWindows1255);
|
||||
}
|
||||
|
||||
String convertBiDiString(const String &input, const Common::CodePage page) {
|
||||
return convertBiDiU32String(input.decode(page)).visual.encode(page);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "common/str.h"
|
||||
#include "common/ustr.h"
|
||||
#include "common/language.h"
|
||||
|
||||
namespace Common {
|
||||
|
||||
|
@ -48,6 +49,7 @@ public:
|
|||
|
||||
/* just call the constructor for convenience */
|
||||
UnicodeBiDiText convertBiDiU32String(const U32String &input);
|
||||
String convertBiDiString(const String &input, const Common::Language lang);
|
||||
String convertBiDiString(const String &input, const Common::CodePage page);
|
||||
|
||||
} // End of namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue