From 665666d6f4213da8db57ebb480947b7caf1fe382 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 17 Dec 2023 15:36:26 +0100 Subject: Merging upstream version 3.0.0. Signed-off-by: Daniel Baumann --- clock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clock') diff --git a/clock b/clock index 17f35a3..acd8c55 100755 --- a/clock +++ b/clock @@ -47,7 +47,6 @@ class _LambdaCompiler(_GettextCompiler): class LocaleCreate(Command): - name = "locale create" description = "Creates locale translations." @@ -113,8 +112,8 @@ translations = {{}} data["days"] = {} for fmt, names in days.items(): data["days"][fmt] = {} - for value, name in names.items(): - data["days"][fmt][(value + 1) % 7] = name + for value, name in sorted(names.items()): + data["days"][fmt][value] = name # Getting months names months = content["months"]["format"] @@ -159,6 +158,9 @@ translations = {{}} # Day periods data["day_periods"] = content["day_periods"]["format"]["wide"] + # Week data + data["week_data"] = content["week_data"] + result = self.TEMPLATE.format( locale=locale, plural=plural, @@ -229,7 +231,6 @@ translations = {{}} class LocaleRecreate(Command): - name = "locale recreate" description = "Recreate existing locales." @@ -240,11 +241,10 @@ class LocaleRecreate(Command): locales = glob.glob(os.path.join(locales_dir, "*", "locale.py")) locales = [os.path.basename(os.path.dirname(locale)) for locale in locales] - self.call("locale:create", [("locales", locales)]) + self.call("locale create", "locales " + " ".join(locales)) class WindowsTzDump(Command): - name = "windows dump-timezones" description = "Dumps the mapping of Windows timezones to IANA timezones." -- cgit v1.2.3