diff --git a/pos/static/js/i18n.js b/pos/static/js/i18n.js index ed28ee4..694a0f4 100644 --- a/pos/static/js/i18n.js +++ b/pos/static/js/i18n.js @@ -317,7 +317,9 @@ var I18N = { } }; -var currentLang = localStorage.getItem('pos_lang') || 'es'; +// Spanish is mandatory for all tenants; ignore any previously stored language. +var currentLang = 'es'; +localStorage.setItem('pos_lang', 'es'); /** * Translate a key to the current language. @@ -328,12 +330,11 @@ window.t = function(key) { }; /** - * Switch the UI language and reload. + * Language switcher is disabled; the system stays in Spanish. */ window.setLang = function(lang) { - currentLang = lang; - localStorage.setItem('pos_lang', lang); - location.reload(); + currentLang = 'es'; + localStorage.setItem('pos_lang', 'es'); }; /** diff --git a/pos/static/js/sidebar.js b/pos/static/js/sidebar.js index 8614798..c998174 100644 --- a/pos/static/js/sidebar.js +++ b/pos/static/js/sidebar.js @@ -15,7 +15,6 @@ window.renderSidebar = function(modulesOverride) { var initials = u.initials || '?'; var currentPath = window.location.pathname; var currentTheme = localStorage.getItem('pos_theme') || 'industrial'; - var currentLang = localStorage.getItem('pos_lang') || 'es'; var modules = {}; if (modulesOverride && typeof modulesOverride === 'object') { @@ -104,16 +103,6 @@ window.renderSidebar = function(modulesOverride) { + '' + ''; - // Language toggle buttons - var langHtml = ''; - window.updateThemeButtons = function() { var t = localStorage.getItem('pos_theme') || 'industrial'; document.querySelectorAll('.theme-toggle-btn').forEach(function(b, i) { @@ -131,7 +120,6 @@ window.renderSidebar = function(modulesOverride) { + '' + '' + themeHtml - + langHtml + ' - + - + diff --git a/pos/templates/catalog.html b/pos/templates/catalog.html index b5416ab..9bbdc4e 100644 --- a/pos/templates/catalog.html +++ b/pos/templates/catalog.html @@ -314,12 +314,12 @@ - + - + diff --git a/pos/templates/config.html b/pos/templates/config.html index 864e274..ab12c64 100644 --- a/pos/templates/config.html +++ b/pos/templates/config.html @@ -922,11 +922,11 @@ - + - + diff --git a/pos/templates/customers.html b/pos/templates/customers.html index 604d211..39e5b6c 100644 --- a/pos/templates/customers.html +++ b/pos/templates/customers.html @@ -633,11 +633,11 @@ - + - + diff --git a/pos/templates/dashboard.html b/pos/templates/dashboard.html index bd83d50..dd02d09 100644 --- a/pos/templates/dashboard.html +++ b/pos/templates/dashboard.html @@ -595,11 +595,11 @@ - + - + diff --git a/pos/templates/diagrams.html b/pos/templates/diagrams.html index d9fc58f..58018b1 100644 --- a/pos/templates/diagrams.html +++ b/pos/templates/diagrams.html @@ -148,12 +148,12 @@ - + - + diff --git a/pos/templates/fleet.html b/pos/templates/fleet.html index cc3a573..be439a0 100644 --- a/pos/templates/fleet.html +++ b/pos/templates/fleet.html @@ -302,11 +302,11 @@ - + - + diff --git a/pos/templates/inventory.html b/pos/templates/inventory.html index 28bf9c3..3967057 100644 --- a/pos/templates/inventory.html +++ b/pos/templates/inventory.html @@ -1052,11 +1052,11 @@ - + - + diff --git a/pos/templates/invoicing.html b/pos/templates/invoicing.html index 0e1ad87..9beb5fd 100644 --- a/pos/templates/invoicing.html +++ b/pos/templates/invoicing.html @@ -1063,11 +1063,11 @@ - + - + diff --git a/pos/templates/marketplace_external.html b/pos/templates/marketplace_external.html index 1fbb579..987da8e 100644 --- a/pos/templates/marketplace_external.html +++ b/pos/templates/marketplace_external.html @@ -342,11 +342,11 @@ - + - + diff --git a/pos/templates/pos.html b/pos/templates/pos.html index 68fe1e0..36d366b 100644 --- a/pos/templates/pos.html +++ b/pos/templates/pos.html @@ -613,7 +613,7 @@ - + diff --git a/pos/templates/quotations.html b/pos/templates/quotations.html index de6318b..f3d2d96 100644 --- a/pos/templates/quotations.html +++ b/pos/templates/quotations.html @@ -14,10 +14,10 @@ - + - +

Cotizaciones

diff --git a/pos/templates/reports.html b/pos/templates/reports.html index ec4e66c..4479a8d 100644 --- a/pos/templates/reports.html +++ b/pos/templates/reports.html @@ -365,11 +365,11 @@
- + - + diff --git a/pos/templates/supplier_catalog.html b/pos/templates/supplier_catalog.html index 86a7737..3a4395e 100644 --- a/pos/templates/supplier_catalog.html +++ b/pos/templates/supplier_catalog.html @@ -127,7 +127,7 @@ - + diff --git a/pos/templates/whatsapp.html b/pos/templates/whatsapp.html index a23f0fe..6a3b20b 100644 --- a/pos/templates/whatsapp.html +++ b/pos/templates/whatsapp.html @@ -131,12 +131,12 @@ function posLogout(){localStorage.removeItem('pos_token');window.location.href=' - + - + diff --git a/pos/templates/workshop.html b/pos/templates/workshop.html index e56ac24..8f6318f 100644 --- a/pos/templates/workshop.html +++ b/pos/templates/workshop.html @@ -294,11 +294,11 @@ - + - +