- when altering the default string table, make sure that all existing text for the given label is removed that comes from an older resource file.

If this isn't done there can be a mix of content from different sources, depending on the language. It's better to have correct English text than unfitting localized versions.
This commit is contained in:
Christoph Oelckers 2019-04-13 14:43:49 +02:00
commit 4668fa95e3
3 changed files with 58 additions and 15 deletions

View file

@ -49,6 +49,7 @@
struct TableElement
{
int filenum;
FString strings[4];
};
@ -104,14 +105,15 @@ private:
LangMap allStrings;
TArray<std::pair<uint32_t, StringMap*>> currentLanguageSet;
void LoadLanguage (const TArray<uint8_t> &buffer);
void LoadLanguage (int lumpnum, const TArray<uint8_t> &buffer);
TArray<TArray<FString>> parseCSV(const TArray<uint8_t> &buffer);
bool ParseLanguageCSV(const TArray<uint8_t> &buffer);
bool ParseLanguageCSV(int lumpnum, const TArray<uint8_t> &buffer);
bool LoadLanguageFromSpreadsheet(int lumpnum, const TArray<uint8_t> &buffer);
bool readMacros(int lumpnum);
void InsertString(int langid, FName label, const FString &string);
void InsertString(int lumpnum, int langid, FName label, const FString &string);
void DeleteString(int langid, FName label);
void DeleteForLabel(int lumpnum, FName label);
static size_t ProcessEscapes (char *str);
};