From a3a5d11c54da64c66c178aead8129ef3bcb8fc25 Mon Sep 17 00:00:00 2001 From: Max Gramser Date: Sat, 19 Sep 2026 20:12:34 +0200 Subject: [PATCH] Start a new language with two-letter weather days, which check accepts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following docs/TRANSLATING.md for Swedish: `i18n.py new` guessed three letters (sön mån tis) and `check` then failed the new file on it. The guess is now two letters from the abbreviation (sö må ti, the CLDR's short width here). Co-Authored-By: Claude Opus 5 --- tools/i18n_cldr.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/i18n_cldr.mjs b/tools/i18n_cldr.mjs index f6e0146..e5020b3 100644 --- a/tools/i18n_cldr.mjs +++ b/tools/i18n_cldr.mjs @@ -39,9 +39,10 @@ for (const code of codes) { date: { weekdays: [0, 1, 2, 3, 4, 5, 6].map((i) => long.format(day(i))), weekdays_short: [0, 1, 2, 3, 4, 5, 6].map((i) => short.format(day(i))), - // The narrow columns of the weather card: the short name without its dot, at most three letters ("mié", "sáb", - // "czw", "dom"); a screen shows no more. - weekdays_min: [0, 1, 2, 3, 4, 5, 6].map((i) => [...short.format(day(i)).replace(/\.$/, '')].slice(0, 3).join('')), + // The narrow columns of the weather card hold two letters: a first guess from the short name without its dot + // ("sö", "må" in Swedish, as the CLDR's short width), which the language's translator checks (tools/i18n.py keeps + // the list once a language has it). + weekdays_min: [0, 1, 2, 3, 4, 5, 6].map((i) => [...short.format(day(i)).replace(/\.$/, '')].slice(0, 2).join('')), months: [...Array(12).keys()].map(monthLong), months_short: [...Array(12).keys()].map(numericMonth ? standalone : monthShort), top_bar: withNames(pattern(code, { weekday: 'short', day: 'numeric', month: 'short' }, { weekday: 'weekday', day: 'day', month: 'month' })),