Skip to content

Commit

Permalink
feat: add localization of missing parts
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen committed Jun 25, 2023
1 parent d8b4e75 commit 585072b
Show file tree
Hide file tree
Showing 28 changed files with 310 additions and 87 deletions.
7 changes: 4 additions & 3 deletions front/server/src/locale/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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`;
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -188,7 +189,7 @@ for (const iso of isos) {
}

const stream = createChatCompletion({
model: "gpt-4",
model: "gpt-3.5-turbo-16k",
messages
})

Expand Down
21 changes: 21 additions & 0 deletions front/server/src/locale/misc/misc.ar.ts
Original file line number Diff line number Diff line change
@@ -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: "يمكن لمسؤولي الحساب فقط حذف المحطات.<br/><br/>اتصل بمسؤولي الحساب إذا كنت ترغب في حذف هذه المحطة.",
delete_station_not_owner_OK: "موافق",

Welcome: "مرحبًا",

account_welcome_title_html: "مرحبًا <b>@name</b>",
account_welcome_message_1_html: "مرحبًا بك في <b>@brand</b>",
account_welcome_message_2_html: "أنت الآن صاحب حسابك الجديد",
account_welcome_message_3_html: "للبدء في البث الآن، أضف أول محطة إلى حسابك",

Create_my_first_station: "إنشاء أول محطة لي",
}

export default locale;
21 changes: 21 additions & 0 deletions front/server/src/locale/misc/misc.de.ts
Original file line number Diff line number Diff line change
@@ -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.<br/><br/>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 <b>@name</b>",
account_welcome_message_1_html: "Willkommen bei <b>@brand</b>",
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;
21 changes: 21 additions & 0 deletions front/server/src/locale/misc/misc.en.ts
Original file line number Diff line number Diff line change
@@ -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.<br/><br/>Contact the account administrators if you want to delete this station.",
delete_station_not_owner_OK: "OK",

Welcome: "Welcome",

account_welcome_title_html: "Hello <b>@name</b>",
account_welcome_message_1_html: "Welcome to <b>@brand</b>",
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;
22 changes: 22 additions & 0 deletions front/server/src/locale/misc/misc.es-AR.ts
Original file line number Diff line number Diff line change
@@ -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.<br/><br/>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 <b>@name</b>",
account_welcome_message_1_html: "Bienvenido a <b>@brand</b>",
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;
22 changes: 22 additions & 0 deletions front/server/src/locale/misc/misc.es.ts
Original file line number Diff line number Diff line change
@@ -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.<br/><br/>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 <b>@name</b>",
account_welcome_message_1_html: "Bienvenido a <b>@brand</b>",
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;
21 changes: 21 additions & 0 deletions front/server/src/locale/misc/misc.fr.ts
Original file line number Diff line number Diff line change
@@ -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.<br/><br/>Contactez les administrateurs du compte si vous souhaitez supprimer cette station.",
delete_station_not_owner_OK: "OK",

Welcome: "Bienvenue",

account_welcome_title_html: "Bonjour <b>@name</b>",
account_welcome_message_1_html: "Bienvenue sur <b>@brand</b>",
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;
21 changes: 21 additions & 0 deletions front/server/src/locale/misc/misc.it.ts
Original file line number Diff line number Diff line change
@@ -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.<br/><br/>Contatta gli amministratori dell'account se desideri eliminare questa stazione.",
delete_station_not_owner_OK: "OK",

Welcome: "Benvenuto",

account_welcome_title_html: "Ciao <b>@name</b>",
account_welcome_message_1_html: "Benvenuto su <b>@brand</b>",
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;
21 changes: 21 additions & 0 deletions front/server/src/locale/misc/misc.pt.ts
Original file line number Diff line number Diff line change
@@ -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.<br/><br/>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á <b>@name</b>",
account_welcome_message_1_html: "Bem-vindo ao <b>@brand</b>",
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;
21 changes: 21 additions & 0 deletions front/server/src/locale/misc/misc.zh.ts
Original file line number Diff line number Diff line change
@@ -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: "只有账户管理员才能删除电台。<br/><br/>如果您想删除此电台,请联系账户管理员。",
delete_station_not_owner_OK: "确定",

Welcome: "欢迎",

account_welcome_title_html: "你好<b>@name</b>",
account_welcome_message_1_html: "欢迎来到<b>@brand</b>",
account_welcome_message_2_html: "你现在是你的新账户的所有者",
account_welcome_message_3_html: "要开始现在进行广播,请将你的第一个电台添加到你的账户中",

Create_my_first_station: "创建我的第一个电台",
}

export default locale;
5 changes: 5 additions & 0 deletions front/server/src/locale/studio/studio.ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Expand All @@ -14,6 +15,9 @@ const locale: import("./studio.locale").StudioLocale = {
// @notranslate
"logo_text": "openstream",

// @notranslate
"brand_name": "Openstream",

// @notranslate
"app_name": "Openstream Studio",

Expand All @@ -23,6 +27,7 @@ const locale: import("./studio.locale").StudioLocale = {
"stats_map": stats_map,
"analytics": analytics,
"payments": payments,
"misc": misc,

"language": {
"auto": "الكشف التلقائي",
Expand Down
2 changes: 2 additions & 0 deletions front/server/src/locale/studio/studio.de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions front/server/src/locale/studio/studio.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Expand All @@ -13,6 +14,9 @@ const locale = {
// @notranslate
"logo_text": "openstream",

// @notranslate
"brand_name": "Openstream",

// @notranslate
"app_name": "Openstream Studio",

Expand All @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion front/server/src/locale/studio/studio.es-AR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Expand All @@ -14,6 +14,9 @@ const locale: import("./studio.locale").StudioLocale = {
// @notranslate
"logo_text": "openstream",

// @notranslate
"brand_name": "Openstream",

// @notranslate
"app_name": "Openstream Studio",

Expand All @@ -23,6 +26,7 @@ const locale: import("./studio.locale").StudioLocale = {
"stats_map": stats_map,
"analytics": analytics,
"payments": payments,
"misc": misc,

"language": {
"auto": "Auto detectar",
Expand Down
5 changes: 5 additions & 0 deletions front/server/src/locale/studio/studio.es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Expand All @@ -13,6 +14,9 @@ const locale: import("./studio.locale").StudioLocale = {
// @notranslate
"logo_text": "openstream",

// @notranslate
"brand_name": "Openstream",

// @notranslate
"app_name": "Openstream Studio",

Expand All @@ -22,6 +26,7 @@ const locale: import("./studio.locale").StudioLocale = {
"stats_map": stats_map,
"analytics": analytics,
"payments": payments,
"misc": misc,

"language": {
"auto": "Auto detectar",
Expand Down
5 changes: 5 additions & 0 deletions front/server/src/locale/studio/studio.fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -13,6 +14,9 @@ const locale: import("./studio.locale").StudioLocale = {
// @notranslate
"logo_text": "openstream",

// @notranslate
"brand_name": "Openstream",

// @notranslate
"app_name": "Openstream Studio",

Expand All @@ -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",
Expand Down
Loading

0 comments on commit 585072b

Please sign in to comment.