feat: add runtime locale overrides

This commit is contained in:
3252a8
2026-05-25 17:47:45 +03:00
parent 23784d00fe
commit 59fa301344
51 changed files with 4026 additions and 214 deletions
+22
View File
@@ -902,6 +902,23 @@ def _migration_0027_add_subscription_install_share_token(connection: Connection)
)
def _migration_0028_add_locale_overrides(connection: Connection) -> None:
connection.execute(
text(
"""
CREATE TABLE IF NOT EXISTS locale_overrides (
lang VARCHAR(16) NOT NULL,
key VARCHAR(255) NOT NULL,
value TEXT NOT NULL,
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_by BIGINT,
PRIMARY KEY (lang, key)
)
"""
)
)
MIGRATIONS: List[Migration] = [
Migration(
id="0001_add_channel_subscription_fields",
@@ -1049,6 +1066,11 @@ MIGRATIONS: List[Migration] = [
description="Add stable public share tokens for install instructions",
upgrade=_migration_0027_add_subscription_install_share_token,
),
Migration(
id="0028_add_locale_overrides",
description="Persist runtime overrides for localization strings",
upgrade=_migration_0028_add_locale_overrides,
),
]