From 585072bae2f7eb6e0d522c8344d4cbe0f07c2300 Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sat, 24 Jun 2023 21:46:04 -0300 Subject: [PATCH 1/2] feat: add localization of missing parts --- front/server/src/locale/cli.ts | 7 +++--- front/server/src/locale/misc/misc.ar.ts | 21 ++++++++++++++++++ front/server/src/locale/misc/misc.de.ts | 21 ++++++++++++++++++ front/server/src/locale/misc/misc.en.ts | 21 ++++++++++++++++++ front/server/src/locale/misc/misc.es-AR.ts | 22 +++++++++++++++++++ front/server/src/locale/misc/misc.es.ts | 22 +++++++++++++++++++ front/server/src/locale/misc/misc.fr.ts | 21 ++++++++++++++++++ front/server/src/locale/misc/misc.it.ts | 21 ++++++++++++++++++ front/server/src/locale/misc/misc.pt.ts | 21 ++++++++++++++++++ front/server/src/locale/misc/misc.zh.ts | 21 ++++++++++++++++++ front/server/src/locale/studio/studio.ar.ts | 5 +++++ front/server/src/locale/studio/studio.de.ts | 2 ++ front/server/src/locale/studio/studio.en.ts | 5 +++++ .../server/src/locale/studio/studio.es-AR.ts | 6 ++++- front/server/src/locale/studio/studio.es.ts | 5 +++++ front/server/src/locale/studio/studio.fr.ts | 5 +++++ front/server/src/locale/studio/studio.it.ts | 5 +++++ front/server/src/locale/studio/studio.pt.ts | 5 +++++ front/server/src/locale/studio/studio.zh.ts | 5 +++++ front/server/src/locale/wip/wip.ar.ts | 17 +++++++------- front/server/src/locale/wip/wip.de.ts | 17 +++++++------- front/server/src/locale/wip/wip.en.ts | 17 +++++++------- front/server/src/locale/wip/wip.es-AR.ts | 19 ++++++++-------- front/server/src/locale/wip/wip.es.ts | 17 +++++++------- front/server/src/locale/wip/wip.fr.ts | 17 +++++++------- front/server/src/locale/wip/wip.it.ts | 17 +++++++------- front/server/src/locale/wip/wip.pt.ts | 17 +++++++------- front/server/src/locale/wip/wip.zh.ts | 18 +++++++-------- 28 files changed, 310 insertions(+), 87 deletions(-) create mode 100644 front/server/src/locale/misc/misc.ar.ts create mode 100644 front/server/src/locale/misc/misc.de.ts create mode 100644 front/server/src/locale/misc/misc.en.ts create mode 100644 front/server/src/locale/misc/misc.es-AR.ts create mode 100644 front/server/src/locale/misc/misc.es.ts create mode 100644 front/server/src/locale/misc/misc.fr.ts create mode 100644 front/server/src/locale/misc/misc.it.ts create mode 100644 front/server/src/locale/misc/misc.pt.ts create mode 100644 front/server/src/locale/misc/misc.zh.ts diff --git a/front/server/src/locale/cli.ts b/front/server/src/locale/cli.ts index 4109f0b2..ec88649f 100644 --- a/front/server/src/locale/cli.ts +++ b/front/server/src/locale/cli.ts @@ -50,7 +50,7 @@ while (true) { break; } -const kinds = ["studio", "admin", "wip", "countries", "stats-map", "validate", "type-of-content", "analytics", "payments"]; +const kinds = ["studio", "admin", "misc", "wip", "countries", "stats-map", "validate", "type-of-content", "analytics", "payments"]; let selected_kinds: string[]; while (true) { @@ -82,6 +82,7 @@ for (const iso of isos) { const dir = kind === "studio" ? "studio" : kind === "admin" ? "admin" : kind === "wip" ? "wip" : + kind === "misc" ? "misc" : `share/${kind}`; const src = `${__dirname}/${dir}/${kind}.${base}.ts`; @@ -114,7 +115,7 @@ for (const iso of isos) { })) const createChatCompletion = async function* (params: { - model: "gpt-4" | "gpt-3.5-turbo", + model: "gpt-4" | "gpt-3.5-turbo" | "gpt-3.5-turbo-16k", messages: ChatCompletionRequestMessage[] }) { const res = await client.createChatCompletion({ @@ -188,7 +189,7 @@ for (const iso of isos) { } const stream = createChatCompletion({ - model: "gpt-4", + model: "gpt-3.5-turbo-16k", messages }) diff --git a/front/server/src/locale/misc/misc.ar.ts b/front/server/src/locale/misc/misc.ar.ts new file mode 100644 index 00000000..0be2c904 --- /dev/null +++ b/front/server/src/locale/misc/misc.ar.ts @@ -0,0 +1,21 @@ +const locale = { + Relay: "ريلي", + Settings_updated: "تم تحديث الإعدادات", + Master_relay: "ريلي رئيسي", + Enable_master_relay: "تمكين الريلي الرئيسي", + Master_Relay_URL: "عنوان URL للريلي الرئيسي", + Save: "حفظ", + delete_station_not_owner_message_html: "يمكن لمسؤولي الحساب فقط حذف المحطات.

اتصل بمسؤولي الحساب إذا كنت ترغب في حذف هذه المحطة.", + delete_station_not_owner_OK: "موافق", + + Welcome: "مرحبًا", + + account_welcome_title_html: "مرحبًا @name", + account_welcome_message_1_html: "مرحبًا بك في @brand", + account_welcome_message_2_html: "أنت الآن صاحب حسابك الجديد", + account_welcome_message_3_html: "للبدء في البث الآن، أضف أول محطة إلى حسابك", + + Create_my_first_station: "إنشاء أول محطة لي", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.de.ts b/front/server/src/locale/misc/misc.de.ts new file mode 100644 index 00000000..5d71aa4f --- /dev/null +++ b/front/server/src/locale/misc/misc.de.ts @@ -0,0 +1,21 @@ +const locale = { + Relay: "Relais", + Settings_updated: "Einstellungen aktualisiert", + Master_relay: "Hauptrelais", + Enable_master_relay: "Hauptrelais aktivieren", + Master_Relay_URL: "URL des Hauptrelais", + Save: "Speichern", + delete_station_not_owner_message_html: "Nur Kontoadministratoren können Stationen löschen.

Wenn Sie diese Station löschen möchten, wenden Sie sich bitte an die Kontoadministratoren.", + delete_station_not_owner_OK: "OK", + + Welcome: "Willkommen", + + account_welcome_title_html: "Hallo @name", + account_welcome_message_1_html: "Willkommen bei @brand", + account_welcome_message_2_html: "Sie sind jetzt der Besitzer Ihres neuen Kontos", + account_welcome_message_3_html: "Um jetzt mit dem Streamen zu beginnen, fügen Sie Ihre erste Station zu Ihrem Konto hinzu", + + Create_my_first_station: "Meine erste Station erstellen", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.en.ts b/front/server/src/locale/misc/misc.en.ts new file mode 100644 index 00000000..fdb9a2b3 --- /dev/null +++ b/front/server/src/locale/misc/misc.en.ts @@ -0,0 +1,21 @@ +const locale = { + Relay: "Relay", + Settings_updated: "Settings updated", + Master_relay: "Master relay", + Enable_master_relay: "Enable_master_relay", + Master_Relay_URL: "Master Relay URL", + Save: "Save", + delete_station_not_owner_message_html: "Only account administrators can delete stations.

Contact the account administrators if you want to delete this station.", + delete_station_not_owner_OK: "OK", + + Welcome: "Welcome", + + account_welcome_title_html: "Hello @name", + account_welcome_message_1_html: "Welcome to @brand", + account_welcome_message_2_html: "You are now the owner of your newly created account", + account_welcome_message_3_html: "To start broadcasting right away, add your first station to your account", + + Create_my_first_station: "Create my first station", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.es-AR.ts b/front/server/src/locale/misc/misc.es-AR.ts new file mode 100644 index 00000000..2847eb03 --- /dev/null +++ b/front/server/src/locale/misc/misc.es-AR.ts @@ -0,0 +1,22 @@ +/// file: wip.es.ts +const locale = { + Relay: "Relay", + Settings_updated: "Configuración actualizada", + Master_relay: "Relay maestro", + Enable_master_relay: "Habilitar relay maestro", + Master_Relay_URL: "URL del relay maestro", + Save: "Guardar", + delete_station_not_owner_message_html: "Solo los administradores de la cuenta pueden eliminar estaciones.

Contacta a los administradores de la cuenta si deseas eliminar esta estación.", + delete_station_not_owner_OK: "Aceptar", + + Welcome: "Bienvenido", + + account_welcome_title_html: "Hola @name", + account_welcome_message_1_html: "Bienvenido a @brand", + account_welcome_message_2_html: "Desde ahora sos el dueño de tu nueva cuenta", + account_welcome_message_3_html: "Para empezar a transmitir ahora, agregá tu primera estación a tu cuenta", + + Create_my_first_station: "Crear mi primera estación", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.es.ts b/front/server/src/locale/misc/misc.es.ts new file mode 100644 index 00000000..ec58bc27 --- /dev/null +++ b/front/server/src/locale/misc/misc.es.ts @@ -0,0 +1,22 @@ +/// file: wip.es.ts +const locale = { + Relay: "Relay", + Settings_updated: "Configuración actualizada", + Master_relay: "Relay maestro", + Enable_master_relay: "Habilitar relay maestro", + Master_Relay_URL: "URL del relay maestro", + Save: "Guardar", + delete_station_not_owner_message_html: "Solo los administradores de la cuenta pueden eliminar estaciones.

Contacta a los administradores de la cuenta si deseas eliminar esta estación.", + delete_station_not_owner_OK: "Aceptar", + + Welcome: "Bienvenido", + + account_welcome_title_html: "Hola @name", + account_welcome_message_1_html: "Bienvenido a @brand", + account_welcome_message_2_html: "Desde ahora eres el dueño de tu nueva cuenta", + account_welcome_message_3_html: "Para empezar a transmitir ahora, agregá tu primera estación a tu cuenta", + + Create_my_first_station: "Crear mi primera estación", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.fr.ts b/front/server/src/locale/misc/misc.fr.ts new file mode 100644 index 00000000..6d91734b --- /dev/null +++ b/front/server/src/locale/misc/misc.fr.ts @@ -0,0 +1,21 @@ +const locale = { + Relay: "Relais", + Settings_updated: "Paramètres mis à jour", + Master_relay: "Relais maître", + Enable_master_relay: "Activer le relais maître", + Master_Relay_URL: "URL du relais maître", + Save: "Enregistrer", + delete_station_not_owner_message_html: "Seuls les administrateurs du compte peuvent supprimer des stations.

Contactez les administrateurs du compte si vous souhaitez supprimer cette station.", + delete_station_not_owner_OK: "OK", + + Welcome: "Bienvenue", + + account_welcome_title_html: "Bonjour @name", + account_welcome_message_1_html: "Bienvenue sur @brand", + account_welcome_message_2_html: "Vous êtes maintenant le propriétaire de votre nouveau compte", + account_welcome_message_3_html: "Pour commencer à diffuser maintenant, ajoutez votre première station à votre compte", + + Create_my_first_station: "Créer ma première station", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.it.ts b/front/server/src/locale/misc/misc.it.ts new file mode 100644 index 00000000..961fd539 --- /dev/null +++ b/front/server/src/locale/misc/misc.it.ts @@ -0,0 +1,21 @@ +const locale = { + Relay: "Relè", + Settings_updated: "Impostazioni aggiornate", + Master_relay: "Relè principale", + Enable_master_relay: "Abilita relè principale", + Master_Relay_URL: "URL relè principale", + Save: "Salva", + delete_station_not_owner_message_html: "Solo gli amministratori dell'account possono eliminare le stazioni.

Contatta gli amministratori dell'account se desideri eliminare questa stazione.", + delete_station_not_owner_OK: "OK", + + Welcome: "Benvenuto", + + account_welcome_title_html: "Ciao @name", + account_welcome_message_1_html: "Benvenuto su @brand", + account_welcome_message_2_html: "Da ora sei il proprietario del tuo nuovo account", + account_welcome_message_3_html: "Per iniziare a trasmettere, aggiungi la tua prima stazione al tuo account", + + Create_my_first_station: "Crea la mia prima stazione", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.pt.ts b/front/server/src/locale/misc/misc.pt.ts new file mode 100644 index 00000000..e6d98f5d --- /dev/null +++ b/front/server/src/locale/misc/misc.pt.ts @@ -0,0 +1,21 @@ +const locale = { + Relay: "Relé", + Settings_updated: "Configuração atualizada", + Master_relay: "Relé mestre", + Enable_master_relay: "Habilitar relé mestre", + Master_Relay_URL: "URL do relé mestre", + Save: "Salvar", + delete_station_not_owner_message_html: "Apenas os administradores da conta podem excluir estações.

Entre em contato com os administradores da conta se você deseja excluir esta estação.", + delete_station_not_owner_OK: "Aceitar", + + Welcome: "Bem-vindo", + + account_welcome_title_html: "Olá @name", + account_welcome_message_1_html: "Bem-vindo ao @brand", + account_welcome_message_2_html: "A partir de agora, você é o proprietário da sua nova conta", + account_welcome_message_3_html: "Para começar a transmitir agora, adicione sua primeira estação à sua conta", + + Create_my_first_station: "Criar minha primeira estação", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/misc/misc.zh.ts b/front/server/src/locale/misc/misc.zh.ts new file mode 100644 index 00000000..4906feb9 --- /dev/null +++ b/front/server/src/locale/misc/misc.zh.ts @@ -0,0 +1,21 @@ +const locale = { + Relay: "中继", + Settings_updated: "设置已更新", + Master_relay: "主中继", + Enable_master_relay: "启用主中继", + Master_Relay_URL: "主中继URL", + Save: "保存", + delete_station_not_owner_message_html: "只有账户管理员才能删除电台。

如果您想删除此电台,请联系账户管理员。", + delete_station_not_owner_OK: "确定", + + Welcome: "欢迎", + + account_welcome_title_html: "你好@name", + account_welcome_message_1_html: "欢迎来到@brand", + account_welcome_message_2_html: "你现在是你的新账户的所有者", + account_welcome_message_3_html: "要开始现在进行广播,请将你的第一个电台添加到你的账户中", + + Create_my_first_station: "创建我的第一个电台", +} + +export default locale; \ No newline at end of file diff --git a/front/server/src/locale/studio/studio.ar.ts b/front/server/src/locale/studio/studio.ar.ts index 65271a76..342541e6 100644 --- a/front/server/src/locale/studio/studio.ar.ts +++ b/front/server/src/locale/studio/studio.ar.ts @@ -5,6 +5,7 @@ import countries from "../share/countries/countries.ar"; import type_of_content from "../share/type-of-content/type-of-content.ar"; import analytics from "../share/analytics/analytics.ar"; import payments from "../share/payments/payments.ar"; +import misc from "../misc/misc.ar"; const locale: import("./studio.locale").StudioLocale = { @@ -14,6 +15,9 @@ const locale: import("./studio.locale").StudioLocale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -23,6 +27,7 @@ const locale: import("./studio.locale").StudioLocale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "language": { "auto": "الكشف التلقائي", diff --git a/front/server/src/locale/studio/studio.de.ts b/front/server/src/locale/studio/studio.de.ts index 6c5bb68a..ce633cc0 100644 --- a/front/server/src/locale/studio/studio.de.ts +++ b/front/server/src/locale/studio/studio.de.ts @@ -5,6 +5,7 @@ import countries from "../share/countries/countries.de"; import type_of_content from "../share/type-of-content/type-of-content.de"; import analytics from "../share/analytics/analytics.de"; import payments from "../share/payments/payments.de"; +import misc from "../misc/misc.de"; const locale = { @@ -23,6 +24,7 @@ const locale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "copy_to_clipboard": "In die Zwischenablage kopieren", "show_password": "Passwort anzeigen", diff --git a/front/server/src/locale/studio/studio.en.ts b/front/server/src/locale/studio/studio.en.ts index 81743061..974e1ce1 100644 --- a/front/server/src/locale/studio/studio.en.ts +++ b/front/server/src/locale/studio/studio.en.ts @@ -4,6 +4,7 @@ import countries from "../share/countries/countries.en"; import type_of_content from "../share/type-of-content/type-of-content.en"; import analytics from "../share/analytics/analytics.en"; import payments from "../share/payments/payments.en"; +import misc from "../misc/misc.en"; const locale = { @@ -13,6 +14,9 @@ const locale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -22,6 +26,7 @@ const locale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "copy_to_clipboard": "Copy to clipboard", "show_password": "Show password", diff --git a/front/server/src/locale/studio/studio.es-AR.ts b/front/server/src/locale/studio/studio.es-AR.ts index a4cea25d..b8c5ac1d 100644 --- a/front/server/src/locale/studio/studio.es-AR.ts +++ b/front/server/src/locale/studio/studio.es-AR.ts @@ -4,7 +4,7 @@ import countries from "../share/countries/countries.es"; import type_of_content from "../share/type-of-content/type-of-content.es"; import analytics from "../share/analytics/analytics.es"; import payments from "../share/payments/payments.es-AR"; - +import misc from "../misc/misc.es-AR"; const locale: import("./studio.locale").StudioLocale = { @@ -14,6 +14,9 @@ const locale: import("./studio.locale").StudioLocale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -23,6 +26,7 @@ const locale: import("./studio.locale").StudioLocale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "language": { "auto": "Auto detectar", diff --git a/front/server/src/locale/studio/studio.es.ts b/front/server/src/locale/studio/studio.es.ts index 8533c3e5..8a0c2f64 100644 --- a/front/server/src/locale/studio/studio.es.ts +++ b/front/server/src/locale/studio/studio.es.ts @@ -4,6 +4,7 @@ import countries from "../share/countries/countries.es"; import type_of_content from "../share/type-of-content/type-of-content.es"; import analytics from "../share/analytics/analytics.es"; import payments from "../share/payments/payments.es"; +import misc from "../misc/misc.es"; const locale: import("./studio.locale").StudioLocale = { @@ -13,6 +14,9 @@ const locale: import("./studio.locale").StudioLocale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -22,6 +26,7 @@ const locale: import("./studio.locale").StudioLocale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "language": { "auto": "Auto detectar", diff --git a/front/server/src/locale/studio/studio.fr.ts b/front/server/src/locale/studio/studio.fr.ts index 8bd64a12..c59b08e8 100644 --- a/front/server/src/locale/studio/studio.fr.ts +++ b/front/server/src/locale/studio/studio.fr.ts @@ -5,6 +5,7 @@ import countries from "../share/countries/countries.fr"; import type_of_content from "../share/type-of-content/type-of-content.fr"; import analytics from "../share/analytics/analytics.fr"; import payments from "../share/payments/payments.fr"; +import misc from "../misc/misc.fr"; const locale: import("./studio.locale").StudioLocale = { "lang": "fr", @@ -13,6 +14,9 @@ const locale: import("./studio.locale").StudioLocale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -22,6 +26,7 @@ const locale: import("./studio.locale").StudioLocale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "language": { "auto": "Détection automatique", diff --git a/front/server/src/locale/studio/studio.it.ts b/front/server/src/locale/studio/studio.it.ts index ccb76e8d..d08839b9 100644 --- a/front/server/src/locale/studio/studio.it.ts +++ b/front/server/src/locale/studio/studio.it.ts @@ -5,6 +5,7 @@ import countries from "../share/countries/countries.it"; import type_of_content from "../share/type-of-content/type-of-content.it"; import analytics from "../share/analytics/analytics.it"; import payments from "../share/payments/payments.it"; +import misc from "../misc/misc.it"; const locale: import("./studio.locale").StudioLocale = { @@ -14,6 +15,9 @@ const locale: import("./studio.locale").StudioLocale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -23,6 +27,7 @@ const locale: import("./studio.locale").StudioLocale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "language": { "auto": "Rilevamento automatico", diff --git a/front/server/src/locale/studio/studio.pt.ts b/front/server/src/locale/studio/studio.pt.ts index afec465c..77e7d44d 100644 --- a/front/server/src/locale/studio/studio.pt.ts +++ b/front/server/src/locale/studio/studio.pt.ts @@ -4,6 +4,7 @@ import countries from "../share/countries/countries.pt"; import type_of_content from "../share/type-of-content/type-of-content.pt"; import analytics from "../share/analytics/analytics.pt"; import payments from "../share/payments/payments.pt"; +import misc from "../misc/misc.pt"; const locale: import("./studio.locale").StudioLocale = { "lang": "pt", @@ -12,6 +13,9 @@ const locale: import("./studio.locale").StudioLocale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -21,6 +25,7 @@ const locale: import("./studio.locale").StudioLocale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "language": { "auto": "Detecção automática", diff --git a/front/server/src/locale/studio/studio.zh.ts b/front/server/src/locale/studio/studio.zh.ts index 0bfd79c8..2c9660a1 100644 --- a/front/server/src/locale/studio/studio.zh.ts +++ b/front/server/src/locale/studio/studio.zh.ts @@ -5,6 +5,7 @@ import countries from "../share/countries/countries.zh"; import type_of_content from "../share/type-of-content/type-of-content.zh"; import analytics from "../share/analytics/analytics.zh"; import payments from "../share/payments/payments.zh"; +import misc from "../misc/misc.zh"; const locale: import("./studio.locale").StudioLocale = { @@ -14,6 +15,9 @@ const locale: import("./studio.locale").StudioLocale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio", @@ -23,6 +27,7 @@ const locale: import("./studio.locale").StudioLocale = { "stats_map": stats_map, "analytics": analytics, "payments": payments, + "misc": misc, "language": { "auto": "自动检测", diff --git a/front/server/src/locale/wip/wip.ar.ts b/front/server/src/locale/wip/wip.ar.ts index e0eb72b4..50867d69 100644 --- a/front/server/src/locale/wip/wip.ar.ts +++ b/front/server/src/locale/wip/wip.ar.ts @@ -1,14 +1,13 @@ /// file: wip.ar.ts const locale = { - "actions": { - "set_role_to": "تعيين الدور إلى @role", - "revoke_access": "إلغاء الوصول", - "delete": "حذف", - }, - "notifier": { - "member_access_revoked": "تم إلغاء وصول العضو", - "member_role_changed": "تم تحديث دور الوصول للعضو", - } + Relay: "ريلي", + Settings_updated: "تم تحديث الإعدادات", + Master_relay: "ريلي رئيسي", + Enable_master_relay: "تمكين الريلي الرئيسي", + Master_Relay_URL: "عنوان URL للريلي الرئيسي", + Save: "حفظ", + delete_station_not_owner_message_html: "يمكن لمسؤولي الحساب فقط حذف المحطات.

اتصل بمسؤولي الحساب إذا كنت ترغب في حذف هذه المحطة.", + delete_station_not_owner_OK: "موافق", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.de.ts b/front/server/src/locale/wip/wip.de.ts index 231fb0c1..efa02784 100644 --- a/front/server/src/locale/wip/wip.de.ts +++ b/front/server/src/locale/wip/wip.de.ts @@ -1,14 +1,13 @@ /// file: wip.de.ts const locale = { - "actions": { - "set_role_to": "Rolle auf @role setzen", - "revoke_access": "Zugriff widerrufen", - "delete": "Löschen", - }, - "notifier": { - "member_access_revoked": "Mitgliederzugriff widerrufen", - "member_role_changed": "Mitgliederzugriffsrolle aktualisiert", - } + Relay: "Relay", + Settings_updated: "Einstellungen aktualisiert", + Master_relay: "Master-Relay", + Enable_master_relay: "Master-Relay aktivieren", + Master_Relay_URL: "URL des Master-Relays", + Save: "Speichern", + delete_station_not_owner_message_html: "Nur Kontoadministratoren können Stationen löschen.

Wenn du diese Station löschen möchtest, wende dich bitte an die Kontoadministratoren.", + delete_station_not_owner_OK: "OK", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.en.ts b/front/server/src/locale/wip/wip.en.ts index 19e29efb..d89df636 100644 --- a/front/server/src/locale/wip/wip.en.ts +++ b/front/server/src/locale/wip/wip.en.ts @@ -1,13 +1,12 @@ const locale = { - "actions": { - "set_role_to": "Set role to @role", - "revoke_access": "Revoke access", - "delete": "Delete", - }, - "notifier": { - "member_access_revoked": "Member access revoked", - "member_role_changed": "Member access role updated", - } + Relay: "Relay", + Settings_updated: "Settings updated", + Master_relay: "Master relay", + Enable_master_relay: "Enable_master_relay", + Master_Relay_URL: "Master Relay URL", + Save: "Save", + delete_station_not_owner_message_html: "Only account administrators can delete stations.

Contact the account administrators if you want to delete this station.", + delete_station_not_owner_OK: "OK", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.es-AR.ts b/front/server/src/locale/wip/wip.es-AR.ts index 64515c0e..bb7322a9 100644 --- a/front/server/src/locale/wip/wip.es-AR.ts +++ b/front/server/src/locale/wip/wip.es-AR.ts @@ -1,14 +1,13 @@ -/// file: wip.es-AR.ts +/// file: wip.es.ts const locale = { - "actions": { - "set_role_to": "Establecer rol a @role", - "revoke_access": "Revocar acceso", - "delete": "Eliminar", - }, - "notifier": { - "member_access_revoked": "Acceso de miembro revocado", - "member_role_changed": "Rol de acceso de miembro actualizado", - } + Relay: "Relay", + Settings_updated: "Configuración actualizada", + Master_relay: "Relay maestro", + Enable_master_relay: "Habilitar relay maestro", + Master_Relay_URL: "URL del relay maestro", + Save: "Guardar", + delete_station_not_owner_message_html: "Solo los administradores de la cuenta pueden eliminar estaciones.

Contacta a los administradores de la cuenta si deseas eliminar esta estación.", + delete_station_not_owner_OK: "Aceptar", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.es.ts b/front/server/src/locale/wip/wip.es.ts index b33e451f..bb7322a9 100644 --- a/front/server/src/locale/wip/wip.es.ts +++ b/front/server/src/locale/wip/wip.es.ts @@ -1,14 +1,13 @@ /// file: wip.es.ts const locale = { - "actions": { - "set_role_to": "Establecer rol a @role", - "revoke_access": "Revocar acceso", - "delete": "Eliminar", - }, - "notifier": { - "member_access_revoked": "Acceso de miembro revocado", - "member_role_changed": "Rol de acceso de miembro actualizado", - } + Relay: "Relay", + Settings_updated: "Configuración actualizada", + Master_relay: "Relay maestro", + Enable_master_relay: "Habilitar relay maestro", + Master_Relay_URL: "URL del relay maestro", + Save: "Guardar", + delete_station_not_owner_message_html: "Solo los administradores de la cuenta pueden eliminar estaciones.

Contacta a los administradores de la cuenta si deseas eliminar esta estación.", + delete_station_not_owner_OK: "Aceptar", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.fr.ts b/front/server/src/locale/wip/wip.fr.ts index 9a5dd573..a48e598a 100644 --- a/front/server/src/locale/wip/wip.fr.ts +++ b/front/server/src/locale/wip/wip.fr.ts @@ -1,14 +1,13 @@ /// file: wip.fr.ts const locale = { - "actions": { - "set_role_to": "Définir le rôle à @role", - "revoke_access": "Révoquer l'accès", - "delete": "Supprimer", - }, - "notifier": { - "member_access_revoked": "Accès membre révoqué", - "member_role_changed": "Rôle d'accès membre mis à jour", - } + Relay: "Relais", + Settings_updated: "Paramètres mis à jour", + Master_relay: "Relais maître", + Enable_master_relay: "Activer le relais maître", + Master_Relay_URL: "URL du relais maître", + Save: "Enregistrer", + delete_station_not_owner_message_html: "Seuls les administrateurs du compte peuvent supprimer des stations.

Contactez les administrateurs du compte si vous souhaitez supprimer cette station.", + delete_station_not_owner_OK: "OK", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.it.ts b/front/server/src/locale/wip/wip.it.ts index d98de584..b1315d2f 100644 --- a/front/server/src/locale/wip/wip.it.ts +++ b/front/server/src/locale/wip/wip.it.ts @@ -1,14 +1,13 @@ /// file: wip.it.ts const locale = { - "actions": { - "set_role_to": "Imposta ruolo a @role", - "revoke_access": "Revoca accesso", - "delete": "Elimina", - }, - "notifier": { - "member_access_revoked": "Accesso membro revocato", - "member_role_changed": "Ruolo di accesso membro aggiornato", - } + Relay: "Relè", + Settings_updated: "Impostazioni aggiornate", + Master_relay: "Relè principale", + Enable_master_relay: "Abilita relè principale", + Master_Relay_URL: "URL relè principale", + Save: "Salva", + delete_station_not_owner_message_html: "Solo gli amministratori dell'account possono eliminare le stazioni.

Contatta gli amministratori dell'account se desideri eliminare questa stazione.", + delete_station_not_owner_OK: "OK", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.pt.ts b/front/server/src/locale/wip/wip.pt.ts index b291e1e0..cccfdfc5 100644 --- a/front/server/src/locale/wip/wip.pt.ts +++ b/front/server/src/locale/wip/wip.pt.ts @@ -1,14 +1,13 @@ /// file: wip.pt.ts const locale = { - "actions": { - "set_role_to": "Definir função para @role", - "revoke_access": "Revogar acesso", - "delete": "Excluir", - }, - "notifier": { - "member_access_revoked": "Acesso do membro revogado", - "member_role_changed": "Função de acesso do membro atualizada", - } + Relay: "Relé", + Settings_updated: "Configuração atualizada", + Master_relay: "Relé mestre", + Enable_master_relay: "Ativar relé mestre", + Master_Relay_URL: "URL do relé mestre", + Save: "Salvar", + delete_station_not_owner_message_html: "Apenas os administradores da conta podem excluir estações.

Entre em contato com os administradores da conta se você deseja excluir esta estação.", + delete_station_not_owner_OK: "Aceitar", } export default locale; \ No newline at end of file diff --git a/front/server/src/locale/wip/wip.zh.ts b/front/server/src/locale/wip/wip.zh.ts index cd057eae..5190b1f6 100644 --- a/front/server/src/locale/wip/wip.zh.ts +++ b/front/server/src/locale/wip/wip.zh.ts @@ -1,14 +1,12 @@ /// file: wip.zh.ts -const locale = { - "actions": { - "set_role_to": "将角色设置为 @role", - "revoke_access": "撤销访问权限", - "delete": "删除", - }, - "notifier": { - "member_access_revoked": "成员访问权限已撤销", - "member_role_changed": "成员访问角色已更新", - } +const locale = { Relay: "中继", + Settings_updated: "设置已更新", + Master_relay: "主中继", + Enable_master_relay: "启用主中继", + Master_Relay_URL: "主中继URL", + Save: "保存", + delete_station_not_owner_message_html: "只有账户管理员才能删除电台。

如果您想删除此电台,请联系账户管理员。", + delete_station_not_owner_OK: "确定", } export default locale; \ No newline at end of file From d5cc5e7f729b18c068120053b93f97fbd7ce652c Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Sat, 24 Jun 2023 21:48:51 -0300 Subject: [PATCH 2/2] fix: locale de brand name --- .../[account]/account-station-item.svelte | 6 ++--- .../[account]/stations/[station]/+page.svelte | 6 ++--- .../stations/[station]/settings/+page.svelte | 24 +++++++------------ .../accounts/[account]/welcome/+page.svelte | 18 +++++++++----- front/server/src/locale/studio/studio.de.ts | 3 +++ 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/account-station-item.svelte b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/account-station-item.svelte index 3f176cc0..10875689 100644 --- a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/account-station-item.svelte +++ b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/account-station-item.svelte @@ -112,8 +112,7 @@ {#if now_playing.start_on_connect}
{#if now_playing.external_relay_url != null} - - Relay + {$locale.misc.Relay} {:else} {$locale.pages["account/dashboard"].station_item.playlist} {/if} @@ -126,8 +125,7 @@ {:else if now_playing.kind === "playlist"} {$locale.pages["account/dashboard"].station_item.playlist} {:else if now_playing.kind === "external-relay"} - - Relay + {$locale.misc.Relay} {/if}
{/if} diff --git a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/+page.svelte b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/+page.svelte index 8715aff7..46fcc074 100644 --- a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/+page.svelte +++ b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/+page.svelte @@ -231,14 +231,12 @@ {#if data.now_playing.kind === "playlist"} {$locale.pages["station/dashboard"].playlist} {:else if data.now_playing.kind === "external-relay"} - - Relay + {$locale.misc.Relay} {:else if data.now_playing.kind === "live"} {$locale.pages["station/dashboard"].live} {:else if data.now_playing.kind === "none"} {#if data.now_playing.external_relay_url != null} - - Relay + {$locale.misc.Relay} {:else} {$locale.pages["station/dashboard"].playlist} {/if} diff --git a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/settings/+page.svelte b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/settings/+page.svelte index 80d6ed1e..e344da45 100644 --- a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/settings/+page.svelte +++ b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/stations/[station]/settings/+page.svelte @@ -82,8 +82,7 @@ } await _patch(`/api/stations/${data.station._id}`, payload); - // TODO: locale - _message("Settings updated"); + _message($locale.misc.Settings_updated); saving_relay = false; } catch(e) { @@ -265,18 +264,16 @@
{$locale.pages["station/settings"].title}
- -

Master relay

+ +

{$locale.misc.Master_relay}

- - +
- - +
@@ -285,8 +282,7 @@ - - Save + {$locale.misc.Save}
{#if saving_relay}
@@ -356,9 +352,8 @@ {:else}
- - Only account administrators can delete stations.

- Contact the account administrators if you want to delete this station. + + {@html $locale.misc.delete_station_not_owner_message_html}
diff --git a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/welcome/+page.svelte b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/welcome/+page.svelte index c8f2095c..ebabb5d6 100644 --- a/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/welcome/+page.svelte +++ b/front/app/src/routes/(root)/(online)/(app)/accounts/[account]/welcome/+page.svelte @@ -2,6 +2,7 @@ export let data: import("./$types").PageData; import Page from "$lib/components/Page.svelte"; import { ripple } from "$share/ripple"; + import { locale } from "$lib/locale"; - Welcome + {$locale.misc.Welcome} -

Hello {data.user.first_name}

-

Welcome to openstream

-

You are now the owner of your newly created account

-

To start broadcasting right away, add your first station to your account

+ +

+ {@html $locale.misc.account_welcome_title_html.replace("@name", data.user.first_name)} +

+ +

{@html $locale.misc.account_welcome_message_1_html.replace("@brand", $locale.brand_name)}

+

{@html $locale.misc.account_welcome_message_2_html}

+

{@html $locale.misc.account_welcome_message_3_html}

+
\ No newline at end of file diff --git a/front/server/src/locale/studio/studio.de.ts b/front/server/src/locale/studio/studio.de.ts index ce633cc0..38f79b94 100644 --- a/front/server/src/locale/studio/studio.de.ts +++ b/front/server/src/locale/studio/studio.de.ts @@ -15,6 +15,9 @@ const locale = { // @notranslate "logo_text": "openstream", + // @notranslate + "brand_name": "Openstream", + // @notranslate "app_name": "Openstream Studio",