🌍 Add Austria and Switzerland to German locale mapping in Nostr publishing command

- Extend `TZ_MAP` and `DOMAIN_MAP` with `'at'` and `'ch'` entries pointing to `Europe/Berlin` and `portal.einundzwanzig.space` respectively.
- Adjust locale setting logic to use `'de'` for Austria and Switzerland, ensuring consistent language handling in Nostr publishing flows.
This commit is contained in:
HolgerHatGarKeineNode
2025-12-10 03:46:14 +01:00
parent 5d87391ac2
commit a8f1257948

View File

@@ -20,6 +20,8 @@ class PublishUnpublishedItems extends Command
private const TZ_MAP = [ private const TZ_MAP = [
'de' => 'Europe/Berlin', 'de' => 'Europe/Berlin',
'at' => 'Europe/Berlin',
'ch' => 'Europe/Berlin',
'nl' => 'Europe/Amsterdam', 'nl' => 'Europe/Amsterdam',
'hu' => 'Europe/Budapest', 'hu' => 'Europe/Budapest',
'pl' => 'Europe/Warsaw', 'pl' => 'Europe/Warsaw',
@@ -29,6 +31,8 @@ class PublishUnpublishedItems extends Command
private const DOMAIN_MAP = [ private const DOMAIN_MAP = [
'de' => 'portal.einundzwanzig.space', 'de' => 'portal.einundzwanzig.space',
'at' => 'portal.einundzwanzig.space',
'ch' => 'portal.einundzwanzig.space',
'nl' => 'portal.eenentwintig.net', 'nl' => 'portal.eenentwintig.net',
'hu' => 'portal.huszonegy.world', 'hu' => 'portal.huszonegy.world',
'pl' => 'portal.dwadziesciajeden.pl', 'pl' => 'portal.dwadziesciajeden.pl',
@@ -110,7 +114,7 @@ class PublishUnpublishedItems extends Command
$timezone = self::TZ_MAP[$countryCode] ?? 'UTC'; $timezone = self::TZ_MAP[$countryCode] ?? 'UTC';
config([ config([
'app.user-timezone' => $timezone, 'app.user-timezone' => $timezone,
'app.locale' => $countryCode, 'app.locale' => in_array($countryCode, ['at', 'ch']) ? 'de' : $countryCode,
]); ]);
} }
} }