From 0974777be6f2f6cec427458bf45c18e47a74e809 Mon Sep 17 00:00:00 2001 From: break27 Date: Wed, 3 Sep 2025 12:28:57 +0800 Subject: [PATCH] cherry pick --- index.html | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 212b205..fb95a85 100644 --- a/index.html +++ b/index.html @@ -357,7 +357,7 @@ $$$('#group_by', 'change', (e) => { for (let target of targets) { for (let key of Object.keys(countries)) { - if (target.predicate == null || target.predicate.includes(key)) { + if (target.predicate.length == 0 || target.predicate.includes(key)) { if (target.locale === locale) { results[key] = countries[key]; } diff --git a/main.py b/main.py index 5181a73..d0fcc48 100644 --- a/main.py +++ b/main.py @@ -61,7 +61,7 @@ class Greetings: @staticmethod def presets(): return [ - Greetings("en", "Europe/London", "Hello" , "Good morning", "Good afternoon" , "Good evening", None), + Greetings("en", "Europe/London", "Hello" , "Good morning", "Good afternoon" , "Good evening", []), Greetings("fr", "Europe/Paris" , "Bonjour", None , "Bon après-midi" , "Bonsoir" , ['法国', '比利时']), Greetings("de", "Europe/Berlin", "Hallo" , "Guten Morgen", "Guten Tag" , "Guten Abend" , ['德国', '奥地利', '瑞士']), Greetings("it", "Europe/Rome" , "Ciao" , "Buongiorno" , "Buon pomeriggio", "Buonasera" , ['意大利']),