10#include "../core/enum_type.hpp"
20typedef void (*ParseCmdProc)(
Buffer *buffer,
char *buf,
int value);
27 int8_t default_plural_offset;
31extern void EmitSingleChar(
Buffer *buffer,
char *buf,
int value);
32extern void EmitPlural(
Buffer *buffer,
char *buf,
int value);
33extern void EmitGender(
Buffer *buffer,
char *buf,
int value);
39 {
"BIG_FONT", EmitSingleChar,
SCC_BIGFONT, 0, -1, {}},
60 {
"COLOUR", EmitSingleChar, SCC_COLOUR, 1, -1, {}},
64 {
"REV", EmitSingleChar, SCC_REVISION, 0, -1, {}},
74 {
"STATION_FEATURES", EmitSingleChar, SCC_STATION_FEATURES, 1, -1, {}},
76 {
"CARGO_LONG", EmitSingleChar, SCC_CARGO_LONG, 2, 1, {
CmdFlag::Gender}},
77 {
"CARGO_SHORT", EmitSingleChar, SCC_CARGO_SHORT, 2, 1, {
CmdFlag::Gender}},
78 {
"CARGO_TINY", EmitSingleChar, SCC_CARGO_TINY, 2, 1, {}},
79 {
"CARGO_LIST", EmitSingleChar, SCC_CARGO_LIST, 1, -1, {
CmdFlag::Case}},
80 {
"POWER", EmitSingleChar, SCC_POWER, 1, 0, {}},
81 {
"POWER_TO_WEIGHT", EmitSingleChar, SCC_POWER_TO_WEIGHT, 1, 0, {}},
82 {
"VOLUME_LONG", EmitSingleChar, SCC_VOLUME_LONG, 1, 0, {}},
83 {
"VOLUME_SHORT", EmitSingleChar, SCC_VOLUME_SHORT, 1, 0, {}},
84 {
"WEIGHT_LONG", EmitSingleChar, SCC_WEIGHT_LONG, 1, 0, {}},
85 {
"WEIGHT_SHORT", EmitSingleChar, SCC_WEIGHT_SHORT, 1, 0, {}},
86 {
"FORCE", EmitSingleChar, SCC_FORCE, 1, 0, {}},
87 {
"VELOCITY", EmitSingleChar, SCC_VELOCITY, 1, 0, {}},
88 {
"HEIGHT", EmitSingleChar, SCC_HEIGHT, 1, 0, {}},
90 {
"UNITS_DAYS_OR_SECONDS", EmitSingleChar, SCC_UNITS_DAYS_OR_SECONDS, 1, 0, {
CmdFlag::Gender}},
91 {
"UNITS_MONTHS_OR_MINUTES", EmitSingleChar, SCC_UNITS_MONTHS_OR_MINUTES, 1, 0, {
CmdFlag::Gender}},
92 {
"UNITS_YEARS_OR_PERIODS", EmitSingleChar, SCC_UNITS_YEARS_OR_PERIODS, 1, 0, {
CmdFlag::Gender}},
93 {
"UNITS_YEARS_OR_MINUTES", EmitSingleChar, SCC_UNITS_YEARS_OR_MINUTES, 1, 0, {
CmdFlag::Gender}},
98 {
"DATE_TINY", EmitSingleChar, SCC_DATE_TINY, 1, -1, {}},
99 {
"DATE_SHORT", EmitSingleChar, SCC_DATE_SHORT, 1, -1, {
CmdFlag::Case}},
100 {
"DATE_LONG", EmitSingleChar, SCC_DATE_LONG, 1, -1, {
CmdFlag::Case}},
101 {
"DATE_ISO", EmitSingleChar, SCC_DATE_ISO, 1, -1, {}},
104 {
"RAW_STRING", EmitSingleChar, SCC_RAW_STRING_POINTER, 1, -1, {
CmdFlag::Gender}},
107 {
"COMMA", EmitSingleChar, SCC_COMMA, 1, 0, {}},
108 {
"DECIMAL", EmitSingleChar, SCC_DECIMAL, 2, 0, {}},
109 {
"NUM", EmitSingleChar, SCC_NUM, 1, 0, {}},
110 {
"ZEROFILL_NUM", EmitSingleChar, SCC_ZEROFILL_NUM, 2, 0, {}},
111 {
"BYTES", EmitSingleChar, SCC_BYTES, 1, 0, {}},
112 {
"HEX", EmitSingleChar, SCC_HEX, 1, 0, {}},
114 {
"CURRENCY_LONG", EmitSingleChar, SCC_CURRENCY_LONG, 1, 0, {}},
115 {
"CURRENCY_SHORT", EmitSingleChar, SCC_CURRENCY_SHORT, 1, 0, {}},
117 {
"WAYPOINT", EmitSingleChar, SCC_WAYPOINT_NAME, 1, -1, {
CmdFlag::Gender}},
118 {
"STATION", EmitSingleChar, SCC_STATION_NAME, 1, -1, {
CmdFlag::Gender}},
124 {
"VEHICLE", EmitSingleChar, SCC_VEHICLE_NAME, 1, -1, {
CmdFlag::Gender}},
125 {
"COMPANY", EmitSingleChar, SCC_COMPANY_NAME, 1, -1, {
CmdFlag::Gender}},
126 {
"COMPANY_NUM", EmitSingleChar, SCC_COMPANY_NUM, 1, -1, {}},
127 {
"PRESIDENT_NAME", EmitSingleChar, SCC_PRESIDENT_NAME, 1, -1, {
CmdFlag::Gender}},
134 {
"SMALL_DOWN_ARROW", EmitSingleChar, SCC_SMALL_DOWN_ARROW, 0, -1, {
CmdFlag::DontCount}},
172 { 2,
"Two forms: special case for 1.",
"\"1\" \"other\"" },
173 { 1,
"Only one form.",
"\"other\"" },
174 { 2,
"Two forms: special case for 0 to 1.",
"\"0..1\" \"other\"" },
175 { 3,
"Three forms: special cases for 0, and numbers ending in 1 except when ending in 11.",
"\"1,21,31,...\" \"other\" \"0\"" },
176 { 5,
"Five forms: special cases for 1, 2, 3 to 6, and 7 to 10.",
"\"1\" \"2\" \"3..6\" \"7..10\" \"other\"" },
177 { 3,
"Three forms: special cases for numbers ending in 1 except when ending in 11, and 2 to 9 except when ending in 12 to 19.",
"\"1,21,31,...\" \"2..9,22..29,32..39,...\" \"other\"" },
178 { 3,
"Three forms: special cases for numbers ending in 1 except when ending in 11, and 2 to 4 except when ending in 12 to 14.",
"\"1,21,31,...\" \"2..4,22..24,32..34,...\" \"other\"" },
179 { 3,
"Three forms: special cases for 1, and numbers ending in 2 to 4 except when ending in 12 to 14.",
"\"1\" \"2..4,22..24,32..34,...\" \"other\"" },
180 { 4,
"Four forms: special cases for numbers ending in 01, 02, and 03 to 04.",
"\"1,101,201,...\" \"2,102,202,...\" \"3..4,103..104,203..204,...\" \"other\"" },
181 { 2,
"Two forms: special case for numbers ending in 1 except when ending in 11.",
"\"1,21,31,...\" \"other\"" },
182 { 3,
"Three forms: special cases for 1, and 2 to 4.",
"\"1\" \"2..4\" \"other\"" },
183 { 2,
"Two forms: cases for numbers ending with a consonant, and with a vowel.",
"\"yeong,il,sam,yuk,chil,pal\" \"i,sa,o,gu\"" },
184 { 4,
"Four forms: special cases for 1, 0 and numbers ending in 02 to 10, and numbers ending in 11 to 19.",
"\"1\" \"0,2..10,102..110,202..210,...\" \"11..19,111..119,211..219,...\" \"other\"" },
185 { 4,
"Four forms: special cases for 1 and 11, 2 and 12, 3..10 and 13..19.",
"\"1,11\" \"2,12\" \"3..10,13..19\" \"other\"" },
186 { 3,
"Three forms: special cases for 1, 0 and numbers ending in 01 to 19.",
"\"1\" \"0,2..19,101..119,201..219,...\" \"other\"" },
204 {
"name",
"0",
"",
"English name for the language" },
205 {
"ownname",
"t",
"",
"Localised name for the language" },
206 {
"isocode",
"0",
"",
"ISO code for the language" },
207 {
"plural",
"tp",
"0",
"Plural form to use" },
208 {
"textdir",
"tl",
"ltr",
"Text direction. Either ltr (left-to-right) or rtl (right-to-left)" },
209 {
"digitsep",
"td",
",",
"Digit grouping separator for non-currency numbers" },
210 {
"digitsepcur",
"td",
",",
"Digit grouping separator for currency numbers" },
211 {
"decimalsep",
"td",
".",
"Decimal separator" },
212 {
"winlangid",
"x2",
"0x0000",
"Language ID for Windows" },
213 {
"grflangid",
"x1",
"0x00",
"Language ID for NewGRFs" },
214 {
"gender",
"tag",
"",
"List of genders" },
215 {
"case",
"tac",
"",
"List of cases" },
@ SCC_TINYFONT
Switch to small font.
@ SCC_NORMALFONT
Switch to normal size font.
@ SCC_BIGFONT
Switch to large font.
@ SCC_MONOFONT
Switch to monospaced font.
static const int MAX_PLURALS
The maximum number of plurals.
static const char *const _pragmas[][4]
All pragmas used.
static const PluralForm _plural_forms[]
All plural forms used.
@ Gender
These commands support genders.
@ Case
These commands support cases.
@ DontCount
These commands aren't counted for comparison.
static const char32_t CHAR_TD_RLE
The following text is embedded right-to-left.
static const char32_t CHAR_TD_LRO
Force the following characters to be treated as left-to-right characters.
static const char32_t CHAR_TD_LRM
The next character acts like a left-to-right character.
static const char32_t CHAR_TD_RLO
Force the following characters to be treated as right-to-left characters.
static const char32_t CHAR_TD_LRE
The following text is embedded left-to-right.
static const char32_t CHAR_TD_RLM
The next character acts like a right-to-left character.
static const char32_t CHAR_TD_PDF
Restore the text-direction state to before the last LRE, RLE, LRO or RLO.
The buffer for writing a single string.