|
OpenTTD Source 20251117-master-g7398d2e290
|
Tool to create computer readable (stand-alone) translation files. More...
#include "../stdafx.h"#include "../core/endian_func.hpp"#include "../core/math_func.hpp"#include "../error_func.h"#include "../string_func.h"#include "../core/string_builder.hpp"#include "../table/control_codes.h"#include "strgen.h"#include "../table/strgen_tables.h"#include "../safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | ParsedCommandString |
Functions | |
| static ParsedCommandString | ParseCommandString (StringConsumer &consumer) |
| static size_t | TranslateArgumentIdx (size_t arg, size_t offset=0) |
| static uint32_t | VersionHashStr (uint32_t hash, std::string_view s) |
| Create a compound hash. | |
| void | EmitSingleChar (StringBuilder &builder, std::string_view param, char32_t value) |
| static std::pair< std::optional< size_t >, std::optional< size_t > > | ParseRelNum (StringConsumer &consumer) |
| std::optional< std::string_view > | ParseWord (StringConsumer &consumer) |
| static void | EmitWordList (StringBuilder &builder, const std::vector< std::string > &words) |
| void | EmitPlural (StringBuilder &builder, std::string_view param, char32_t) |
| void | EmitGender (StringBuilder &builder, std::string_view param, char32_t) |
| static const CmdStruct * | FindCmd (std::string_view s) |
| static uint8_t | ResolveCaseName (std::string_view str) |
| ParsedCommandStruct | ExtractCommandString (std::string_view s, bool) |
| const CmdStruct * | TranslateCmdForCompare (const CmdStruct *a) |
| static bool | CheckCommandsMatch (std::string_view a, std::string_view b, std::string_view name) |
| static void | PutArgidxCommand (StringBuilder &builder) |
| static std::string | PutCommandString (std::string_view str) |
Variables | |
| StrgenState | _strgen |
| static bool | _translated |
| Whether the current language is not the master language. | |
| static std::string_view | _cur_ident |
| static ParsedCommandStruct | _cur_pcs |
| static size_t | _cur_argidx |
Tool to create computer readable (stand-alone) translation files.
Definition in file strgen_base.cpp.
|
static |
Definition at line 430 of file strgen_base.cpp.
| void EmitGender | ( | StringBuilder & | builder, |
| std::string_view | param, | ||
| char32_t | value | ||
| ) |
Definition at line 275 of file strgen_base.cpp.
| void EmitPlural | ( | StringBuilder & | builder, |
| std::string_view | param, | ||
| char32_t | value | ||
| ) |
Definition at line 220 of file strgen_base.cpp.
| void EmitSingleChar | ( | StringBuilder & | builder, |
| std::string_view | param, | ||
| char32_t | value | ||
| ) |
Definition at line 167 of file strgen_base.cpp.
|
static |
Definition at line 207 of file strgen_base.cpp.
| ParsedCommandStruct ExtractCommandString | ( | std::string_view | s, |
| bool | warnings | ||
| ) |
Definition at line 383 of file strgen_base.cpp.
|
static |
Definition at line 314 of file strgen_base.cpp.
|
static |
Definition at line 329 of file strgen_base.cpp.
|
static |
Definition at line 175 of file strgen_base.cpp.
| std::optional< std::string_view > ParseWord | ( | StringConsumer & | consumer | ) |
Definition at line 189 of file strgen_base.cpp.
|
static |
Definition at line 643 of file strgen_base.cpp.
|
static |
Definition at line 649 of file strgen_base.cpp.
|
static |
Definition at line 321 of file strgen_base.cpp.
|
static |
Definition at line 617 of file strgen_base.cpp.
Definition at line 412 of file strgen_base.cpp.
|
static |
Create a compound hash.
| hash | The hash to add the string hash to. |
| s | The string hash. |
Definition at line 117 of file strgen_base.cpp.
Referenced by StringData::Version().
|
static |
Definition at line 28 of file strgen_base.cpp.
|
static |
Definition at line 26 of file strgen_base.cpp.
|
static |
Definition at line 27 of file strgen_base.cpp.
| StrgenState _strgen |
Definition at line 24 of file strgen_base.cpp.
|
static |
Whether the current language is not the master language.
Definition at line 25 of file strgen_base.cpp.
Referenced by LanguageWriter::WriteLang().