|
OpenTTD Source 20251116-master-g21329071df
|
Information about a single string. More...
#include <strgen.h>
Public Member Functions | |
| LangString (std::string_view name, std::string_view english, size_t index, size_t line) | |
| Create a new string. | |
| void | FreeTranslation () |
| Free all data related to the translation. | |
Data Fields | |
| std::string | name |
| Name of the string. | |
| std::string | english |
| English text. | |
| std::string | translated |
| Translated text. | |
| size_t | index |
| The index in the language file. | |
| size_t | line |
| Line of string in source-file. | |
| std::vector< Case > | translated_cases |
| Cases of the translation. | |
| LangString::LangString | ( | std::string_view | name, |
| std::string_view | english, | ||
| size_t | index, | ||
| size_t | line | ||
| ) |
Create a new string.
| name | The name of the string. |
| english | The english "translation" of the string. |
| index | The index in the string table. |
| line | The line this string was found on. |
Definition at line 56 of file strgen_base.cpp.
| void LangString::FreeTranslation | ( | ) |
Free all data related to the translation.
Definition at line 62 of file strgen_base.cpp.
References translated, and translated_cases.
Referenced by StringData::FreeTranslation().
| std::string LangString::english |
English text.
Definition at line 32 of file strgen.h.
Referenced by StringData::Version(), and LanguageWriter::WriteLang().
| size_t LangString::line |
Line of string in source-file.
Definition at line 35 of file strgen.h.
Referenced by LanguageWriter::WriteLang().
| std::string LangString::name |
Name of the string.
Definition at line 31 of file strgen.h.
Referenced by StringData::Version(), and LanguageWriter::WriteLang().
| std::string LangString::translated |
Translated text.
Definition at line 33 of file strgen.h.
Referenced by FreeTranslation(), and LanguageWriter::WriteLang().
| std::vector<Case> LangString::translated_cases |
Cases of the translation.
Definition at line 36 of file strgen.h.
Referenced by FreeTranslation(), and LanguageWriter::WriteLang().