Skip to content

Commit 314b97c

Browse files
committed
feat(Command Menu): add editor theme option with translations
1 parent fe4a73b commit 314b97c

14 files changed

+49
-0
lines changed

src/livecodes/UI/command-menu-actions.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,17 @@ export const getCommandMenuActions = ({
200200
},
201201
],
202202
},
203+
{
204+
id: 'editor theme',
205+
title: window.deps.translateString('commandMenu.editorTheme', 'Editor theme'),
206+
content: getContent('Editor theme'),
207+
mdIcon: 'palette',
208+
handler: () => {
209+
UI.getEditorSettingsLink()?.click();
210+
const themeSelector = document.querySelector('label[data-name="editorTheme"]');
211+
themeSelector?.scrollIntoView({ behavior: 'smooth', block: 'center' });
212+
},
213+
},
203214
{
204215
id: 'Select Language',
205216
title: window.deps.translateString('commandMenu.selectLanguage', 'Select Language'),

src/livecodes/i18n/locales/ar/translation.lokalise.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@
609609
"commandMenu.selectLanguage": {
610610
"translation": "اختر اللغة"
611611
},
612+
"commandMenu.editorTheme": {
613+
"translation": "تعيين سمة المحرر"
614+
},
612615
"commandMenu.show.compiled": {
613616
"translation": "تبديل الكود المُترجم"
614617
},

src/livecodes/i18n/locales/de/translation.lokalise.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@
609609
"commandMenu.selectLanguage": {
610610
"translation": "Sprache auswählen"
611611
},
612+
"commandMenu.editorTheme": {
613+
"translation": "Editor-Theme"
614+
},
612615
"commandMenu.show.compiled": {
613616
"translation": "Kompilierten Code umschalten"
614617
},

src/livecodes/i18n/locales/en/translation.lokalise.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,10 @@
812812
"notes": "",
813813
"translation": "Select Language"
814814
},
815+
"commandMenu.editorTheme": {
816+
"notes": "",
817+
"translation": "Editor Theme"
818+
},
815819
"commandMenu.show.compiled": {
816820
"notes": "",
817821
"translation": "Toggle Compiled Code"

src/livecodes/i18n/locales/en/translation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ const translation = {
311311
disableRecoverUnsaved: 'Disable Recover Unsaved',
312312
disableVim: 'Disable Vim Mode',
313313
enableAI: 'Enable AI Code Assistant',
314+
editorTheme: 'Editor theme',
314315
enableAutoSave: 'Enable Auto Save',
315316
enableAutoUpdate: 'Enable Auto Update',
316317
enableEmacs: 'Enable Emacs Mode',

src/livecodes/i18n/locales/es/translation.lokalise.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@
609609
"commandMenu.selectLanguage": {
610610
"translation": "Seleccionar idioma"
611611
},
612+
"commandMenu.editorTheme": {
613+
"translation": "Tema del editor"
614+
},
612615
"commandMenu.show.compiled": {
613616
"translation": "Alternar código compilado"
614617
},

src/livecodes/i18n/locales/fr/translation.lokalise.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@
609609
"commandMenu.selectLanguage": {
610610
"translation": "Sélectionner la langue"
611611
},
612+
"commandMenu.editorTheme": {
613+
"translation": "Thème de l'éditeur"
614+
},
612615
"commandMenu.show.compiled": {
613616
"translation": "Afficher le code compilé"
614617
},

src/livecodes/i18n/locales/hi/translation.lokalise.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@
609609
"commandMenu.selectLanguage": {
610610
"translation": "भाषा चुने"
611611
},
612+
"commandMenu.editorTheme": {
613+
"translation": "एडिटर थीम"
614+
},
612615
"commandMenu.show.compiled": {
613616
"translation": "संकलित कोड टॉगल करें"
614617
},

src/livecodes/i18n/locales/it/translation.lokalise.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@
609609
"commandMenu.selectLanguage": {
610610
"translation": "Selezionare la lingua"
611611
},
612+
"commandMenu.editorTheme": {
613+
"translation": "Tema dell'editor"
614+
},
612615
"commandMenu.show.compiled": {
613616
"translation": "Alterna il codice compilato"
614617
},

src/livecodes/i18n/locales/ja/translation.lokalise.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@
609609
"commandMenu.selectLanguage": {
610610
"translation": "言語選択"
611611
},
612+
"commandMenu.editorTheme": {
613+
"translation": "エディタテーマ"
614+
},
612615
"commandMenu.show.compiled": {
613616
"translation": "コンパイル済みコードの切り替え"
614617
},

0 commit comments

Comments
 (0)