From 3dfa2a7a6d2193641cd2eb1bda2543002c546cb8 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Fri, 14 Jun 2024 00:46:42 +0100 Subject: [PATCH] remove local language select in favour of os level language --- .../menuContent/languageSetting/index.js | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/src/component/menuContent/languageSetting/index.js b/src/component/menuContent/languageSetting/index.js index e1704bcb..907dbd69 100644 --- a/src/component/menuContent/languageSetting/index.js +++ b/src/component/menuContent/languageSetting/index.js @@ -1,18 +1,12 @@ import { message } from '../../message'; import { state } from '../../state'; -import { data } from '../../data'; -import { header } from '../../header'; -import { groupAndBookmark } from '../../groupAndBookmark'; -import { menu } from '../../menu'; -import { toolbar } from '../../toolbar'; import { APP_NAME } from '../../../constant'; import { Alert } from '../../alert'; import { Link } from '../../link'; -import { Control_select } from '../../control/select'; import { node } from '../../../utility/node'; @@ -34,26 +28,26 @@ languageSetting.language = (parent) => { }; - languageSetting.control.language.selected = new Control_select({ - path: 'language.selected', - id: 'language-selected', - labelText: message.get('menuContentLanguageSelect'), - srOnly: true, - option: message.language.list(), - selected: selectedLanguageIndex(), - action: () => { - - state.get.current().language = message.language.code()[languageSetting.control.language.selected.selected()]; - data.save(); - toolbar.bar.render(); - header.item.clear(); - header.item.render(); - groupAndBookmark.render(); - menu.close(); - menu.open(); - - } - }); + // languageSetting.control.language.selected = new Control_select({ + // path: 'language.selected', + // id: 'language-selected', + // labelText: message.get('menuContentLanguageSelect'), + // srOnly: true, + // option: message.language.list(), + // selected: selectedLanguageIndex(), + // action: () => { + // + // state.get.current().language = message.language.code()[languageSetting.control.language.selected.selected()]; + // data.save(); + // toolbar.bar.render(); + // header.item.clear(); + // header.item.render(); + // groupAndBookmark.render(); + // menu.close(); + // menu.open(); + // + // } + // }); languageSetting.control.link = new Link({ text: message.get('menuContentLanguageAlertLink'), @@ -64,14 +58,14 @@ languageSetting.language = (parent) => { languageSetting.control.alert = new Alert({ iconName: 'globe', children: [ - node(`p:${message.get('menuContentLanguageAlertPara')}`), + node(`p:${message.get('menuContentLanguageAlertPara') || 'Text'}`), node('p', languageSetting.control.link.link()) ] }); parent.appendChild( node('div', [ - languageSetting.control.language.selected.wrap(), + // languageSetting.control.language.selected.wrap(), languageSetting.control.alert.wrap() ]) );