|
OpenTTD Source 20251116-master-g21329071df
|
Tool to create computer readable (stand-alone) translation files. More...
#include "../stdafx.h"#include "../core/endian_func.hpp"#include "../error_func.h"#include "../string_func.h"#include "../strings_type.h"#include "../misc/getoptdata.h"#include "../table/control_codes.h"#include "../3rdparty/fmt/std.h"#include "strgen.h"#include <filesystem>#include <fstream>#include "../table/strgen_tables.h"#include "../safeguards.h"Go to the source code of this file.
Data Structures | |
| struct | FileStringReader |
| A reader that simply reads using fopen. More... | |
| struct | FileWriter |
| Yes, simply writing to a file. More... | |
| struct | HeaderFileWriter |
| struct | LanguageFileWriter |
| Class for writing a language to disk. More... | |
Macros | |
| #define | LINE_NUM_FMT(s) "{}:{}: " s ": {}\n" |
Functions | |
| void | StrgenWarningI (const std::string &msg) |
| void | StrgenErrorI (const std::string &msg) |
| void | StrgenFatalI (const std::string &msg) |
| void | FatalErrorI (const std::string &msg) |
| Error handling for fatal non-user errors. | |
| static bool | CompareFiles (const std::filesystem::path &path1, const std::filesystem::path &path2) |
| int CDECL | main (int argc, char *argv[]) |
Variables | |
| static const OptionData | _opts [] |
| Options of strgen. | |
Tool to create computer readable (stand-alone) translation files.
Definition in file strgen.cpp.
| #define LINE_NUM_FMT | ( | s | ) | "{}:{}: " s ": {}\n" |
Definition at line 32 of file strgen.cpp.
|
static |
Definition at line 172 of file strgen.cpp.
| void FatalErrorI | ( | const std::string & | msg | ) |
Error handling for fatal non-user errors.
| str | the string to print. |
Error handling for fatal non-user errors.
| s | Format string. |
Definition at line 60 of file strgen.cpp.
References StrgenState::cur_line, StrgenState::file, VideoDriver::GetInstance(), and CrashLog::SetErrorMessage().
| int CDECL main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 319 of file strgen.cpp.
| void StrgenErrorI | ( | const std::string & | msg | ) |
Definition at line 45 of file strgen.cpp.
| void StrgenFatalI | ( | const std::string & | msg | ) |
Definition at line 51 of file strgen.cpp.
| void StrgenWarningI | ( | const std::string & | msg | ) |
Definition at line 35 of file strgen.cpp.
|
static |