OpenTTD Source 20241224-master-gee860a5c8e
|
Container for all the game strings. More...
#include <game_text.hpp>
Public Member Functions | |
void | Compile () |
Compile the language. | |
GameStrings (const GameStrings &)=delete | |
GameStrings (GameStrings &&)=delete | |
GameStrings & | operator= (const GameStrings &)=delete |
GameStrings & | operator= (GameStrings &&)=delete |
Data Fields | |
uint | version |
The version of the language strings. | |
LanguageStrings * | cur_language |
The current (compiled) language. | |
std::vector< LanguageStrings > | raw_strings |
The raw strings per language, first must be English/the master language!. | |
std::vector< LanguageStrings > | compiled_strings |
The compiled strings per language, first must be English/the master language!. | |
StringList | string_names |
The names of the compiled strings. | |
StringParamsList | string_params |
The parameters for the strings. | |
Container for all the game strings.
Definition at line 50 of file game_text.hpp.
void GameStrings::Compile | ( | ) |
Compile the language.
Definition at line 284 of file game_text.cpp.
References compiled_strings, StringData::FreeTranslation(), StringReader::ParseFile(), raw_strings, string_names, string_params, version, StringData::Version(), HeaderWriter::WriteHeader(), and LanguageWriter::WriteLang().
Referenced by GSTRChunkHandler::Load(), and LoadTranslations().
std::vector<LanguageStrings> GameStrings::compiled_strings |
The compiled strings per language, first must be English/the master language!.
Definition at line 55 of file game_text.hpp.
Referenced by Compile(), and ReconsiderGameScriptLanguage().
LanguageStrings* GameStrings::cur_language |
The current (compiled) language.
Definition at line 52 of file game_text.hpp.
Referenced by GetGameStringPtr(), and ReconsiderGameScriptLanguage().
std::vector<LanguageStrings> GameStrings::raw_strings |
The raw strings per language, first must be English/the master language!.
Definition at line 54 of file game_text.hpp.
Referenced by LanguageScanner::AddFile(), Compile(), GSTRChunkHandler::Load(), LoadTranslations(), and GSTRChunkHandler::Save().
StringList GameStrings::string_names |
The names of the compiled strings.
Definition at line 56 of file game_text.hpp.
Referenced by Compile(), GetGameStringName(), and RegisterGameTranslation().
StringParamsList GameStrings::string_params |
The parameters for the strings.
Definition at line 57 of file game_text.hpp.
Referenced by Compile(), and GetGameStringParams().
uint GameStrings::version |
The version of the language strings.
Definition at line 51 of file game_text.hpp.
Referenced by Compile().