From 61273dfeec669c8e8a75b8a01b5e20f3863c46e1 Mon Sep 17 00:00:00 2001 From: SITO Date: Tue, 18 Aug 2026 21:12:05 +0200 Subject: [PATCH] i18n: mover las claves propias a un overlay fuera de los ficheros de upstream Las 15 claves anadidas por la rama (barra inferior bb*, menu Personal/Community, karvanTitle, peerLastChange, filter) vivian editadas dentro de los 11 src/client/assets/translations/oasis_*.js. Upstream reescribe esos ficheros en cada release (de 0.9.1 a 0.9.5 elimino 849 claves), asi que cada version las ponia en conflicto. Ahora estan en translations/fork/i18n_fork.js y se fusionan desde i18n.js. Los 11 ficheros de idioma pueden reemplazarse por los de upstream sin perder nada. Verificado cargando i18n.js con los oasis_*.js de 0.9.5 sin modificar: las 15 claves resuelven en los 11 idiomas y las nuevas de upstream siguen disponibles. --- .../assets/translations/fork/i18n_fork.js | 193 ++++++++++++++++++ src/client/assets/translations/i18n.js | 5 + 2 files changed, 198 insertions(+) create mode 100644 src/client/assets/translations/fork/i18n_fork.js diff --git a/src/client/assets/translations/fork/i18n_fork.js b/src/client/assets/translations/fork/i18n_fork.js new file mode 100644 index 0000000..74a022d --- /dev/null +++ b/src/client/assets/translations/fork/i18n_fork.js @@ -0,0 +1,193 @@ +// Claves de traduccion propias de la rama experimental. +// Se fusionan sobre las de upstream desde i18n.js, para no editar los 11 +// ficheros oasis_*.js (upstream los reescribe entero en cada release). + +module.exports = { + en: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + es: { + peerLastChange: "Último cambio", + menuCommunity: "Comunidad", + menuAll: "Todo", + filter: "Filtrar", + bbAdd: "Añadir", + bbManage: "Editar", + bbRemove: "Quitar", + bbQuickActions: "Accesos rápidos", + bbYourBar: "Tu barra", + bbFull: "Máximo alcanzado", + bbDone: "Hecho", + bbPickTitle: "Personaliza la barra", + bbPickDesc: "Elige hasta 4 accesos para la barra inferior.", + bbPickNone: "Ninguno", + karvanTitle: "Karvan" + }, + fr: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + eu: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + de: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + it: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + pt: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + zh: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + ar: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + hi: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + }, + ru: { + peerLastChange: "Last change", + menuCommunity: "Community", + menuAll: "All", + filter: "Filter", + bbAdd: "Add", + bbManage: "Edit", + bbRemove: "Remove", + bbQuickActions: "Quick actions", + bbYourBar: "Your bar", + bbFull: "Maximum reached", + bbDone: "Done", + bbPickTitle: "Customize the bar", + bbPickDesc: "Choose up to 4 shortcuts for the bottom bar.", + bbPickNone: "None", + karvanTitle: "Karvan" + } +}; diff --git a/src/client/assets/translations/i18n.js b/src/client/assets/translations/i18n.js index 129e820..658c1bf 100644 --- a/src/client/assets/translations/i18n.js +++ b/src/client/assets/translations/i18n.js @@ -12,4 +12,9 @@ languages.forEach(language => { } }); +try { + const overlay = require('./fork/i18n_fork.js'); + languages.forEach(l => Object.assign(i18n[l] = i18n[l] || {}, overlay[l] || overlay.en || {})); +} catch (e) {} + module.exports = i18n;