|
OpenTTD Source 15.0-beta2
|
Tool to create computer readable (stand-alone) translation files. More...
#include "../stdafx.h"#include "../core/endian_func.hpp"#include "../core/mem_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 (const char **str) |
| 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. | |
| static size_t | Utf8Validate (const char *s) |
| void | EmitSingleChar (StringBuilder &builder, const char *buf, char32_t value) |
| static std::pair< std::optional< size_t >, std::optional< size_t > > | ParseRelNum (const char **buf) |
| std::optional< std::string_view > | ParseWord (const char **buf) |
| static void | EmitWordList (StringBuilder &builder, const std::vector< std::string > &words) |
| void | EmitPlural (StringBuilder &builder, const char *buf, char32_t) |
| void | EmitGender (StringBuilder &builder, const char *buf, char32_t) |
| static const CmdStruct * | FindCmd (std::string_view s) |
| static uint8_t | ResolveCaseName (std::string_view str) |
| ParsedCommandStruct | ExtractCommandString (const char *s, bool) |
| const CmdStruct * | TranslateCmdForCompare (const CmdStruct *a) |
| static bool | CheckCommandsMatch (const char *a, const char *b, const char *name) |
| static void | StripTrailingWhitespace (std::string &str) |
| static void | PutArgidxCommand (StringBuilder &builder) |
| static std::string | PutCommandString (const char *str) |
Variables | |
| StrgenState | _strgen |
| static bool | _translated |
| Whether the current language is not the master language. | |
| static const char * | _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 502 of file strgen_base.cpp.
| void EmitGender | ( | StringBuilder & | builder, |
| const char * | buf, | ||
| char32_t | value | ||
| ) |
Definition at line 318 of file strgen_base.cpp.
| void EmitPlural | ( | StringBuilder & | builder, |
| const char * | buf, | ||
| char32_t | value | ||
| ) |
Definition at line 265 of file strgen_base.cpp.
| void EmitSingleChar | ( | StringBuilder & | builder, |
| const char * | buf, | ||
| char32_t | value | ||
| ) |
Definition at line 191 of file strgen_base.cpp.
|
static |
Definition at line 252 of file strgen_base.cpp.
| ParsedCommandStruct ExtractCommandString | ( | const char * | s, |
| bool | warnings | ||
| ) |
Definition at line 456 of file strgen_base.cpp.
|
static |
Definition at line 357 of file strgen_base.cpp.
|
static |
Definition at line 373 of file strgen_base.cpp.
|
static |
Definition at line 199 of file strgen_base.cpp.
| std::optional< std::string_view > ParseWord | ( | const char ** | buf | ) |
Definition at line 219 of file strgen_base.cpp.
|
static |
Definition at line 732 of file strgen_base.cpp.
|
static |
Definition at line 738 of file strgen_base.cpp.
|
static |
Definition at line 365 of file strgen_base.cpp.
|
static |
Definition at line 658 of file strgen_base.cpp.
|
static |
Definition at line 708 of file strgen_base.cpp.
Definition at line 484 of file strgen_base.cpp.
|
static |
Definition at line 167 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().