Files
gen1recomp/tests
thibautbus ed0fd91dbb Let a Strings() translation number its format directives
Strings() formats with string.format, which fills directives in argument order. A language that puts two values the other way round from English ("ATTACK de PIKACHU" for "PIKACHU's ATTACK") could not say so: the translation either kept the English order or swapped the values. The official FireRed, Gold and Red localizations reorder values like this in dozens of battle and menu lines.

A translation can now number its directives the way POSIX printf does ("%2$s de\n%1$s monte!"), and Strings() hands the arguments over in that order. Flags and widths are kept ("%3$03d") and "%%" stays a literal percent. A translation numbers all of its directives or none, and may only number arguments the source has; it may leave one out, as the official translations sometimes drop a name. Otherwise it falls back to the English source and logs one warning, like a translation with the wrong number of directives.

Sources never carry numbered directives, and a translation without them takes the same string.format path as before, so English and existing catalogs render the same text. A translation that still cannot format its arguments falls back to the English source formatted with them, instead of the raw template. An older engine given a numbered translation cannot format it and prints the template, so a catalog using numbered directives needs this engine.
2026-09-19 23:04:31 +02:00
..
2026-07-19 16:18:18 -04:00
2026-09-18 16:49:48 -04:00
2026-07-17 20:30:02 -04:00
2026-07-19 16:18:18 -04:00
2026-08-15 06:04:04 -04:00
2026-09-18 13:11:33 -04:00
2026-09-18 13:11:33 -04:00
2026-09-18 13:11:33 -04:00
2026-09-18 16:49:48 -04:00
2026-09-18 13:11:33 -04:00
2026-09-13 03:34:39 -04:00
2026-09-18 13:11:33 -04:00
2026-09-18 13:11:33 -04:00
2026-09-18 13:11:33 -04:00
2026-09-18 13:11:33 -04:00
2026-09-18 13:11:33 -04:00
2026-09-13 01:06:04 -04:00
2026-09-18 16:49:48 -04:00
2026-09-13 01:06:04 -04:00
2026-09-13 03:34:39 -04:00
2026-09-18 13:11:33 -04:00
2026-09-13 01:06:04 -04:00
2026-09-13 03:34:39 -04:00
2026-09-13 01:06:04 -04:00
2026-09-18 16:49:48 -04:00
2026-09-18 16:49:48 -04:00
2026-09-13 03:34:39 -04:00
2026-09-13 01:06:04 -04:00
2026-09-13 03:34:39 -04:00
2026-09-13 03:34:39 -04:00
2026-09-18 16:49:48 -04:00
2026-09-13 03:34:39 -04:00
2026-09-18 16:49:48 -04:00
2026-09-18 16:49:48 -04:00
2026-09-13 01:06:04 -04:00
2026-09-13 03:34:39 -04:00
2026-09-18 16:49:48 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-18 10:49:04 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-18 15:37:27 -05:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 11:53:30 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-24 07:52:05 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-08-11 11:53:30 -04:00
2026-07-19 16:18:18 -04:00
2026-08-28 10:14:44 -04:00
2026-08-28 10:14:44 -04:00
2026-08-28 10:14:44 -04:00
2026-08-28 10:14:44 -04:00
2026-08-28 10:14:44 -04:00
2026-07-19 16:18:18 -04:00
2026-08-13 06:05:27 -04:00
2026-08-12 09:22:30 -04:00
2026-08-12 09:22:30 -04:00
2026-07-24 09:06:29 -04:00
2026-09-04 09:56:35 -04:00
2026-08-28 14:15:51 -04:00
2026-08-28 10:14:44 -04:00
2026-09-04 09:56:35 -04:00
2026-08-28 10:14:44 -04:00
2026-08-04 10:32:51 -04:00
2026-07-21 05:50:40 -04:00
2026-08-04 09:41:44 -04:00
2026-08-04 09:41:44 -04:00
2026-07-24 09:06:29 -04:00
2026-07-19 16:18:18 -04:00
2026-08-04 09:41:44 -04:00
2026-07-24 09:06:29 -04:00
2026-08-18 11:43:23 -04:00
2026-07-19 16:18:18 -04:00
2026-07-26 13:38:52 -04:00
2026-07-19 16:18:18 -04:00
2026-07-24 09:06:29 -04:00
2026-08-27 07:11:43 -04:00
2026-07-23 16:55:03 -04:00
2026-07-21 05:50:40 -04:00
2026-07-24 09:06:29 -04:00
2026-07-21 05:50:40 -04:00
2026-07-19 16:18:18 -04:00
2026-08-24 07:52:05 -04:00
2026-08-13 06:05:27 -04:00
2026-07-30 10:17:30 -04:00
2026-08-11 11:53:30 -04:00
2026-07-19 16:18:18 -04:00
2026-07-19 16:18:18 -04:00
2026-07-27 08:37:11 -04:00
2026-09-13 03:34:39 -04:00