mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
🌍 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:
@@ -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,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user