mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
fix TODO_TRANSLATE language replacement in cases where the text is already formatted (#5415)
* fix TODO_TRANSLATE language replacement in cases where the text is already formatted * oops
This commit is contained in:
parent
1b6dc13491
commit
29af294b0c
2 changed files with 4 additions and 4 deletions
|
@ -544,7 +544,7 @@ typedef enum {
|
||||||
LANGUAGE_MAX
|
LANGUAGE_MAX
|
||||||
} Language;
|
} Language;
|
||||||
|
|
||||||
#define TODO_TRANSLATE "__Translate_This__"
|
#define TODO_TRANSLATE "TranslateThis"
|
||||||
|
|
||||||
// TODO get these properties from the textures themselves
|
// TODO get these properties from the textures themselves
|
||||||
#define FONT_CHAR_TEX_WIDTH 16
|
#define FONT_CHAR_TEX_WIDTH 16
|
||||||
|
|
|
@ -155,12 +155,12 @@ const std::string CustomMessage::GetFrench(MessageFormat format) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string CustomMessage::GetForCurrentLanguage(MessageFormat format) const {
|
const std::string CustomMessage::GetForCurrentLanguage(MessageFormat format) const {
|
||||||
return GetForLanguage(((Language)gSaveContext.language == LANGUAGE_JPN) ? LANGUAGE_ENG : gSaveContext.language,
|
return GetForLanguage(
|
||||||
format);
|
((Language)gSaveContext.language == LANGUAGE_JPN) ? LANGUAGE_ENG : (Language)gSaveContext.language, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string CustomMessage::GetForLanguage(uint8_t language, MessageFormat format) const {
|
const std::string CustomMessage::GetForLanguage(uint8_t language, MessageFormat format) const {
|
||||||
std::string output = messages[language] != TODO_TRANSLATE ? messages[language] : messages[LANGUAGE_ENG];
|
std::string output = !messages[language].starts_with(TODO_TRANSLATE) ? messages[language] : messages[LANGUAGE_ENG];
|
||||||
ProcessMessageFormat(output, format);
|
ProcessMessageFormat(output, format);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue