diff --git a/README.md b/README.md index c6618421..222e9072 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

massCode

- Built with Electron, Vue 3 & Codemirror. + Built with Electron, Vue & Codemirror.
Inspired by applications like SnippetsLab and Quiver.

diff --git a/demo/db/db.json b/demo/db/db.json index f93ec441..dd8d921a 100644 --- a/demo/db/db.json +++ b/demo/db/db.json @@ -2837,6 +2837,42 @@ "id": "cj0IfumH", "createdAt": 1659688801793, "updatedAt": 1659688919992 + }, + { + "isDeleted": false, + "isFavorites": false, + "folderId": "J7rNZi7X", + "tagsIds": [], + "description": null, + "name": "Kusto KQL", + "content": [ + { + "label": "Fragment 1", + "language": "kusto", + "value": "let Events = MyLogTable | where ... ;\nEvents\n| where Name == \"Start\"\n| project Name, City, SessionId, StartTime=timestamp\n| join (Events\n | where Name == \"Stop\"\n | project StopTime=timestamp, SessionId)\n on SessionId\n| project City, SessionId, StartTime, StopTime, Duration = StopTime - StartTime" + } + ], + "id": "vH7mmfKH", + "createdAt": 1673326490808, + "updatedAt": 1673326641538 + }, + { + "isDeleted": false, + "isFavorites": false, + "folderId": "J7rNZi7X", + "tagsIds": [], + "description": null, + "name": "Bicep", + "content": [ + { + "label": "Fragment 1", + "language": "bicep", + "value": "param rgLocation string = resourceGroup().location\nparam storages array = [\n {\n name: 'contoso'\n skuName: 'Standard_LRS'\n }\n {\n name: 'fabrikam'\n skuName: 'Premium_LRS'\n }\n]\n\nresource createStorages 'Microsoft.Storage/storageAccounts@2021-06-01' = [for storage in storages: {\n name: '${storage.name}obj${uniqueString(resourceGroup().id)}'\n location: rgLocation\n sku: {\n name: storage.skuName\n }\n kind: 'StorageV2'\n}]" + } + ], + "id": "W9p-A0M9", + "createdAt": 1673328306847, + "updatedAt": 1673328471208 } ], "tags": [] diff --git a/package.json b/package.json index 45f45f3d..3dab2680 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "masscode", "productName": "massCode", - "version": "3.5.0", + "version": "3.6.0", "description": "A free and open source code snippets manager for developers", "license": "AGPL-3.0", "main": "build/src/main/index.js", diff --git a/src/main/services/i18n/language.ts b/src/main/services/i18n/language.ts index e6100bf5..a0f02c35 100644 --- a/src/main/services/i18n/language.ts +++ b/src/main/services/i18n/language.ts @@ -1,13 +1,15 @@ export const language = { + cs: 'Čeština', de_DE: 'Deutsch', el: 'Ελληνικά', en: 'English', es_ES: 'Español', + ja_JP: '日本語', pt_BR: 'Português (Brasil)', - uk_UA: 'Українська', + ro: 'Română', ru: 'Русский', + uk_UA: 'Українська', zh_CN: '中文 (简体)', - zh_TW: '中文 (繁體)', zh_HK: '中文 (繁體 香港特別行政區)', - ja_JP: '日本語' + zh_TW: '中文 (繁體)' } diff --git a/src/main/services/i18n/locales/cs/common.json b/src/main/services/i18n/locales/cs/common.json new file mode 100644 index 00000000..16a08ab1 --- /dev/null +++ b/src/main/services/i18n/locales/cs/common.json @@ -0,0 +1,66 @@ +{ + "button": { + "moveStorage": "Přesunout úložiště", + "openStorage": "Otevřít úložiště", + "newStorage": "Nové úložiště", + "fromMassCodeV1": "Z massCode v1.0", + "fromSnippetsLab": "Z SnippetsLab", + "confirm": "Potvrdit", + "cancel": "Zrušit", + "update": ["Jít na GitHub", "OK"], + "ok": "OK" + }, + "newFolder": "Nová složka", + "newSnippet": "Nový snippet", + "newFragment": "Nový fragment", + "addDescription": "Přidat popis", + "addToFavorites": "Přidat do oblíbených", + "addTag": "Přidat štítek", + "exportToHtml": "Exportovat do HTML", + "saveScreenshot": "Uložit screenshot", + "rename": "Přejmenovat", + "duplicate": "Duplikovat", + "delete": "Smazat", + "deleteNow": "Smazat nyní", + "defaultLanguage": "Výchozí jazyk", + "removeFromFavorites": "Odebrat z oblíbených", + "emptyTrash": "Vyprázdnit koš", + "close": "Zavřít", + "folder": { + "untitled": "Nepojmenovaná složka", + "plural": "Složky" + }, + "snippet": { + "untitled": "Nepojmenovaný snippet", + "plural": "Snippetů", + "plural_few": "Snippety", + "emptyName": "Zadejte jméno snippetu", + "selectedMultiple": "{{count}} snippetů vybráno", + "selectedMultiple_few": "{{count}} snippety vybrány", + "noSelected": "Není vybrán žádný snippet" + }, + "fragment": "Fragment", + "search": "Hledat", + "line": "Řádek", + "column": "sloupec", + "sidebar": { + "inbox": "Příchozí", + "favorites": "Oblíbené", + "allSnippets": "Všechny snippety", + "trash": "Koš", + "untitled": "Nepojmenovaná složka", + "folders": "Složky", + "library": "Knihovna", + "tags": "Štítky" + }, + "darkMode": "Tmavý režim", + "background": "Pozadí", + "restartApp": "Restartovat massCode", + "updateAvailable": "Aktualizace dostupná", + "hide": "Skrýt", + "show": "Zobrazit", + "collapse-all": "Sbalit vše", + "expand-all": "Rozbalit vše", + "restore": "Obnovit", + "copy-snippet-link": "Zkopírovat odkaz na snippet" +} diff --git a/src/main/services/i18n/locales/cs/dialog.json b/src/main/services/i18n/locales/cs/dialog.json new file mode 100644 index 00000000..22637f4e --- /dev/null +++ b/src/main/services/i18n/locales/cs/dialog.json @@ -0,0 +1,14 @@ +{ + "deleteConfirm": "Opravdu chcete trvale smazat {{name}}?", + "deleteConfirmMultipleSnippets": "Opravdu chcete trvale smazat {{count}} vybraných snippetů?", + "deleteConfirmMultipleSnippets_few": "Opravdu chcete trvale smazat {{count}} vybrané snippety?", + "noUndo": "Tuto akci nelze vrátit zpět.", + "allSnippetsMoveToTrash": "Všechny snippety v této složce budou přesunuty do koše.", + "deleteTag": "Tímto také odeberete štítek ze všech snippetů.", + "emptyTrash": "Opravdu chcete trvale odstranit všechny snippety v Koši?", + "migrateConfirm": [ + "Opravdu chcete migrovat z {{name}}?", + "Současná knihovna bude v průběhu migrace přepsána." + ], + "createDb": "Zvolte jinou složku, prosím" +} diff --git a/src/main/services/i18n/locales/cs/menu.json b/src/main/services/i18n/locales/cs/menu.json new file mode 100644 index 00000000..2a1fb8f5 --- /dev/null +++ b/src/main/services/i18n/locales/cs/menu.json @@ -0,0 +1,85 @@ +{ + "app": { + "label": "massCode", + "preferences": "Předvolby", + "update": { + "label": "Zkontrolovat aktualizace....", + "message": "Verze {{newVersion}} je dostupná ke stažení.\nMáte verzi {{oldVersion}}.", + "button": ["Přejít na stažení", "OK"], + "noUpdate": "Momentálně nejsou k dispozici žádné aktualizace." + }, + "quit": "Ukončit massCode", + "about": "O aplikaci massCode", + "hide": "Skrýt massCode", + "hideOther": "Skrýt ostatní", + "showAll": "Zobrazit vše" + }, + "help": { + "label": "Nápověda", + "website": "Web", + "documentation": "Dokumentace", + "viewInGitHub": "Zobrazit na GitHubu", + "changeLog": "Protokol změn", + "reportIssue": "Nahlásit problém", + "giveStar": "Dát hvězdičku", + "extension": { + "vscode": "VS Code rozšíření", + "raycast": "Raycast rozšíření", + "alfred": "Alfred rozšíření" + }, + "donate": { + "openCollective": "Přispět přes Open Collective", + "payPal": "Přispět přes PayPal", + "gumroad": "Přispět přes Gumroad (Visa, Mastercard, …)" + }, + "twitter": "Twitter", + "devTools": "Přepnout nástroje pro vývojáře", + "links": { + "snippets": "Kolekce snippetů" + } + }, + "file": { + "label": "Soubor", + "find": "Hledat" + }, + "view": { + "label": "Zobrazit", + "sortBy": { + "label": "Seřadit snippety podle", + "dateModified": "Data úpravy", + "dateCreated": "Data vytvoření", + "name": "Názvu" + } + }, + "edit": { + "label": "Upravit", + "undo": "Vrátit zpět", + "redo": "Opakovat", + "cut": "Vyjmout", + "copy": "Kopírovat", + "paste": "Vložit", + "delete": "Smazat", + "selectAll": "Vybrat vše" + }, + "editor": { + "label": "Editor", + "copy": "Kopírovat snippet do schránky", + "format": "Formátovat", + "previewCode": "Náhled kódu", + "previewScreenshot": "Náhled screenshotu", + "previewMarkdown": "Náhled Markdownu", + "fontSizeIncrease": "Zvětšit písmo", + "fontSizeDecrease": "Zmenšit písmo", + "fontSizeReset": "Obnovit velikost píma" + }, + "markdown": { + "label": "Markdown", + "presentationMode": "Prezentační mód", + "preview": "Náhled" + }, + "history": { + "label": "Historie", + "back": "Zpět", + "forward": "Vpřed" + } +} diff --git a/src/main/services/i18n/locales/cs/preferences.json b/src/main/services/i18n/locales/cs/preferences.json new file mode 100644 index 00000000..cffdbf0b --- /dev/null +++ b/src/main/services/i18n/locales/cs/preferences.json @@ -0,0 +1,48 @@ +{ + "title": "Předvolby", + "storage": { + "label": "Uložiště", + "migrate": "Migrovat", + "count": "Počet" + }, + "editor": { + "label": "Editor", + "fontSize": "Velikost písma", + "fontFamily": "Rodina písma", + "wrap": { + "label": "Zalamování", + "wordWrap": "Slov", + "off": "Vypnuto" + }, + "tabSize": "Šířka tabulátoru", + "showInvisibles": "Zobrazit neviditelné", + "highlightLine": "Zvýraznit řádek", + "matchBrackets": "Párovat závorky", + "prettier": { + "label": "Prettier", + "trailingComma": { + "label": "Koncová čárka", + "none": "Nikdy", + "all": "Vždy", + "es5": "ES5" + }, + "semi": "Semi", + "singleQuote": "Jednoduché uvozovky" + } + }, + "appearance": { + "label": "Vzhled", + "theme": { + "label": "Téma", + "light": "Světlé", + "dark": "Tmavé" + } + }, + "language": { + "label": "Jazyk" + }, + "markdown": { + "label": "Markdown", + "codeRenderer": "Renderer bloku kódu" + } +} diff --git a/src/main/services/i18n/locales/cs/special.json b/src/main/services/i18n/locales/cs/special.json new file mode 100644 index 00000000..640d8870 --- /dev/null +++ b/src/main/services/i18n/locales/cs/special.json @@ -0,0 +1,29 @@ +{ + "description": { + "storage": "Pro používání synchronizačních služeb jako je iCloud Drive, Google Drive nebo Dropbox jednoduše přesuňte úložiště do odpovídajících synchronizovaných složek.", + "migrate": { + "1": "Pro migraci z massCode v1.0 zvolte složku obsahující databázové soubory.", + "2": "Pro migraci z SnippetsLab zvolte JSON soubor.", + "3": [ + "V průběhu migrace ze SnippetsLab je několik omezení:", + "Všechny složky budou na první úrovni, protože JSON soubor (v2.1 a níže) neukládá zanořené složky.", + "Snippetům s nepodporovým jazykem bude nastaven výchozí Plain Text." + ] + }, + "htmlCssPreview": "Pro zobrazení výsledku přidejte fragmenty s jazyky HTML a CSS.", + "codeBlockRenderer": [ + "Při používání Codemirror musí jazyk použitý pro blok kódu odpovídat jednomu z podporovaných", + "jazyků" + ] + }, + "success": { + "migrate": "Databáze úspěšně zmigrována." + }, + "error": { + "folderContainDb": "Složka už obsahuje \"db.json\".", + "folderNotContainDb": "Složka neobsahuje \"db.json\"." + }, + "unsponsored": "Nesponzorováno", + "supportMessage": "Ahoj, tady Anton 👋

\nDíky za používání massCode. Shledáváte-li aplikaci užitečnou, prosím {{-tagStart}} přispějte {{-tagEnd}}. Bude mě to inspirovat k dalšímu rozvoji projektu.", + "snippetsShowcase": "Přehlídka snippetů" +} diff --git a/src/main/services/i18n/locales/de_DE/preferences.json b/src/main/services/i18n/locales/de_DE/preferences.json index b2311c31..5fa0d7f0 100644 --- a/src/main/services/i18n/locales/de_DE/preferences.json +++ b/src/main/services/i18n/locales/de_DE/preferences.json @@ -25,7 +25,7 @@ "label": "Nachgestelltes Komma", "none": "Ohne", "all": "Immer", - "es6": "ES6" + "es5": "ES5" }, "semi": "Semi", "singleQuote": "Einzelne Anführungszeichen" diff --git a/src/main/services/i18n/locales/el/preferences.json b/src/main/services/i18n/locales/el/preferences.json index 1799f8d2..b2d0a86c 100644 --- a/src/main/services/i18n/locales/el/preferences.json +++ b/src/main/services/i18n/locales/el/preferences.json @@ -25,7 +25,7 @@ "label": "Κόμμα Ουράς", "none": "Καθόλου", "all": "Όλα", - "es6": "ES6" + "es5": "ES5" }, "semi": "Semi", "singleQuote": "Μονά Εισαγωγικά" diff --git a/src/main/services/i18n/locales/en/preferences.json b/src/main/services/i18n/locales/en/preferences.json index 58e5bc8a..87fc2000 100644 --- a/src/main/services/i18n/locales/en/preferences.json +++ b/src/main/services/i18n/locales/en/preferences.json @@ -25,7 +25,7 @@ "label": "Trailing Comma", "none": "None", "all": "All", - "es6": "ES6" + "es5": "ES5" }, "semi": "Semi", "singleQuote": "Single Quote" diff --git a/src/main/services/i18n/locales/es_ES/preferences.json b/src/main/services/i18n/locales/es_ES/preferences.json index f715d2a4..ee1a5d5d 100644 --- a/src/main/services/i18n/locales/es_ES/preferences.json +++ b/src/main/services/i18n/locales/es_ES/preferences.json @@ -24,7 +24,7 @@ "label": "Coma Final", "none": "Ninguna", "all": "Todo", - "es6": "ES6" + "es5": "ES5" }, "semi": "Semi", "singleQuote": "Comillas Simple" diff --git a/src/main/services/i18n/locales/ja_JP/preferences.json b/src/main/services/i18n/locales/ja_JP/preferences.json index 4f84c53f..62804ea5 100644 --- a/src/main/services/i18n/locales/ja_JP/preferences.json +++ b/src/main/services/i18n/locales/ja_JP/preferences.json @@ -25,7 +25,7 @@ "label": "末尾のコンマ", "none": "何もしない", "all": "すべて", - "es6": "ES6準拠" + "es5": "ES5準拠" }, "semi": "セミコロン", "singleQuote": "シングルクォーテーション" diff --git a/src/main/services/i18n/locales/pt_BR/preferences.json b/src/main/services/i18n/locales/pt_BR/preferences.json index a10d9d85..899bfec0 100644 --- a/src/main/services/i18n/locales/pt_BR/preferences.json +++ b/src/main/services/i18n/locales/pt_BR/preferences.json @@ -25,7 +25,7 @@ "label": "Vírgula à direita", "none": "Nenhum", "all": "Tudo", - "es6": "ES6" + "es5": "ES5" }, "semi": "Semi", "singleQuote": "Citação única" diff --git a/src/main/services/i18n/locales/ro_RO/common.json b/src/main/services/i18n/locales/ro_RO/common.json new file mode 100644 index 00000000..7a266fb5 --- /dev/null +++ b/src/main/services/i18n/locales/ro_RO/common.json @@ -0,0 +1,64 @@ +{ + "button": { + "moveStorage": "Mută stocarea", + "openStorage": "Deschide stocarea", + "newStorage": "Stocare nouă", + "fromMassCodeV1": "Din massCode v1.0", + "fromSnippetsLab": "Din SnippetsLab", + "confirm": "Confirmare", + "cancel": "Anulare", + "update": ["Mergi la GitHub", "În regulă"], + "ok": "În regulă" + }, + "newFolder": "Folder nou", + "newSnippet": "Fragment nou", + "newFragment": "Fragment nou", + "addDescription": "Adăugă o descriere", + "addToFavorites": "Adaugă la favorite", + "addTag": "Adăugă o etichetă", + "exportToHtml": "Export în HTML", + "saveScreenshot": "Salvează captura de ecran", + "rename": "Redenumește", + "duplicate": "Duplică", + "delete": "Șterge", + "deleteNow": "Șterge acum", + "defaultLanguage": "Limba implicită", + "removeFromFavorites": "Elimină din favorite", + "emptyTrash": "Golește coșul de gunoi", + "close": "Închide", + "folder": { + "untitled": "Folder fără titlu", + "plural": "Foldere" + }, + "snippet": { + "untitled": "Fragment fără titlu", + "plural": "Fragmente", + "emptyName": "Introduceți numele fragmentului", + "selectedMultiple": "{{count}} fragmente selectate", + "noSelected": "Niciun fragment selectat" +}, +"fragment": "Fragment", +"search": "Căutare", +"line": "Linie", +"column": "Coloană", +"sidebar": { +"inbox": "Inbox", +"favorites": "Favorite", +"allSnippets": "Toate fragmentele", +"trash": "Coș de gunoi", +"untitled": "Folder fără titlu", +"folders": "Foldere", +"library": "Bibliotecă", +"tags": "Etichete" +}, +"darkMode": "Mod întunecat", +"background": "Fundal", +"restartApp": "Repornește massCode", +"updateAvailable": "Actualizare disponibilă", +"hide": "Ascunde", +"show": "Arătă", +"collapse-all": "Restrânge tot", + "expand-all": "Extinde All", + "restore": "Restaurează", + "copy-snippet-link": "Copiați link-ul fragmentului" +} diff --git a/src/main/services/i18n/locales/ro_RO/dialog.json b/src/main/services/i18n/locales/ro_RO/dialog.json new file mode 100644 index 00000000..011d7103 --- /dev/null +++ b/src/main/services/i18n/locales/ro_RO/dialog.json @@ -0,0 +1,13 @@ +{ + "deleteConfirm": "Sigur dorești să ștergi permanent {{name}}?", + "deleteConfirmMultipleSnippets": "Sigur dorești să ștergi permanent {{count}} fragmente selectate?", + "noUndo": "Nu poți anula această acțiune.", + "allSnippetsMoveToTrash": "Toate fragmentele din acest folder vor fi mutate în coșul de gunoi.", + "deleteTag": "Acest lucru va provoca, de asemenea, eliminarea etichetei din toate fragmentele.", + "emptyTrash": "Sigur dorești să ștergi permanent toate fragmentele din Coșul de gunoi?", + "migrateConfirm": [ + "Sigur dorești să migrați din {{name}}?", + "În timpul migrației, biblioteca curentă va fi suprascrisă." + ], + "createDb": "Vă rugăm să selectați un alt folder" +} diff --git a/src/main/services/i18n/locales/ro_RO/menu.json b/src/main/services/i18n/locales/ro_RO/menu.json new file mode 100644 index 00000000..4f80781e --- /dev/null +++ b/src/main/services/i18n/locales/ro_RO/menu.json @@ -0,0 +1,85 @@ +{ + "app": { + "label": "massCode", + "preferences": "Preferințe", + "update": { + "label": "Verificare actualizări....", + "message": "Versiunea {{newVersion}} este acum disponibilă pentru descărcare.\nVersiunea dvs. este {{oldVersion}}.", + "button": ["Du-te la Descărcare", "OK"], + "noUpdate": "Nu sunt disponibile actualizări în acest moment." + }, + "quit": "Ieși din massCode", + "about": "Despre massCode", + "hide": "Ascunde massCode", + "hideOther": "Ascunde celelalte", + "showAll": "Arată tot" + }, + "help": { + "label": "Ajutor", + "website": "Site web", + "documentation": "Documentație", + "viewInGitHub": "Vizualizează în GitHub", + "changeLog": "Jurnalul modificărilor", + "reportIssue": "Raportează o problemă", + "giveStar": "Dați o stea", + "extension": { + "vscode": "Extensie VS Code", + "raycast": "Extensie Raycast", + "alfred": "Extensie Alfred" + }, + "donate": { + "openCollective": "Donează pe Open Collective", + "payPal": "Donează prin PayPal", + "gumroad": "Donează prin Gumroad (Visa, Mastercard, etc.)" + }, + "twitter": "Twitter", + "devTools": "Comutare instrumente pentru dezvoltatori", + "links": { + "snippets": "Colecție de fragmente" + } + }, + "file": { + "label": "Fișier", + "find": "Căutați" + }, + "view": { + "label": "Vizualizare", + "sortBy": { + "label": "Sortează fragmentele după", + "dateModified": "Data modificării", + "dateCreated": "Data creării", + "name": "Nume" + } + }, + "edit": { + "label": "Editare", + "undo": "Anulați", + "redo": "Refaceți", + "cut": "Taie", + "copy": "Copiază", + "paste": "Lipește", + "delete": "Șterge", + "selectAll": "Selectează tot" + }, + "editor": { + "label": "Editor", + "copy": "Copiază fragmentul în clipboard", + "format": "Format", + "previewCode": "Previzualizare cod", + "previewScreenshot": "Previzualizare captură de ecran", + "previewMarkdown": "Previzualizare Markdown", + "fontSizeIncrease": "Creștere mărimea scrisului", + "fontSizeDecrease": "Scade mărimea scrisului", + "fontSizeReset": "Resetează mărimea scrisului" + }, + "markdown": { + "label": "Markdown", + "presentationMode": "Mod prezentare", + "preview": "Previzualizare" + }, + "history": { + "label": "Istoric", + "back": "Înapoi", + "forward": "Înainte" + } +} diff --git a/src/main/services/i18n/locales/ro_RO/preferences.json b/src/main/services/i18n/locales/ro_RO/preferences.json new file mode 100644 index 00000000..35c27e7c --- /dev/null +++ b/src/main/services/i18n/locales/ro_RO/preferences.json @@ -0,0 +1,49 @@ +{ + "title": "Preferințe", + "storage": { + "label": "Stocare", + "migrate": "Migrează", + "count": "Numără" + }, + "editor": { + "label": "Editor", + "fontSize": "Mărime scris", + "fontFamily": "Familie scris", + "wrap": { + "label": "Înfășurare", + "wordWrap": "Înfășurare cuvânt", + "off": "Oprit" + }, + "tabSize": "Mărime tab", + "showInvisibles": "Arată invizibile", + "highlightLine": "Evidențiază linia", + "highlightGutter": "Evidențiază marginea", + "matchBrackets": "Potrivește parantezele", + "prettier": { + "label": "Prettier", + "trailingComma": { + "label": "Virgulă finală", + "none": "Niciunul", + "all": "Toate", + "es5": "ES5" + }, + "semi": "Semi", + "singleQuote": "Ghilimele simple" + } + }, + "appearance": { + "label": "Aspect", + "theme": { + "label": "Temă", + "light": "Luminos", + "dark": "Întunecat" + } + }, + "language": { + "label": "Limbă" + }, + "markdown": { + "label": "Markdown", + "codeRenderer": "Redator de cod" + } +} diff --git a/src/main/services/i18n/locales/ro_RO/special.json b/src/main/services/i18n/locales/ro_RO/special.json new file mode 100644 index 00000000..a1d62618 --- /dev/null +++ b/src/main/services/i18n/locales/ro_RO/special.json @@ -0,0 +1,29 @@ +{ + "description": { + "storage": "Pentru a utiliza servicii de sincronizare precum iCloud Drive, Google Drive sau Dropbox, mutați simplu stocarea în dosarele sincronizate corespunzătoare", + "migrate": { + "1": "Pentru a migra de la massCode v1.0 selectați folderul care conține fișierele bazei de date.", + "2": "Pentru a migra de la SnippetsLab selectați fișierul JSON.", + "3": [ + "Unele limite. În timpul migrației de la SnippetsLab:", + "Toate folderele vor fi de primul nivel, deoarece fișierul JSON (sub v2.1) nu reprezintă foldere imbricate.", + "Fragmentele cu limbaje neacceptate vor fi setate ca text simplu implicit." + ] + }, + "htmlCssPreview": "Adăugați fragmente cu limbajele HTML & CSS pentru a vedea rezultatul.", + "codeBlockRenderer": [ + "Când utilizați Codemirror, limbajul care trebuie setat pentru blocul de cod trebuie să corespundă uneia dintre valorile", + "limbajelor" + ] + }, + "success": { + "migrate": "DB migrat cu succes." + }, + "error": { + "folderContainDb": "Folderul conține deja \"db.json\".", + "folderNotContainDb": "Folderul nu conține \"db.json\"." + }, + "unsponsored": "Nesponsorizat", + "supportMessage": "Salut, sunt Anton 👋

\nVă mulțumesc pentru utilizarea massCode. Dacă găsiți această aplicație utilă, vă rugăm să {{-tagStart}} donați {{-tagEnd}}. Mă va inspira să continui dezvoltarea proiectului.", + "snippetsShowcase": "Prezentare fragmente" +} diff --git a/src/main/services/i18n/locales/ru/preferences.json b/src/main/services/i18n/locales/ru/preferences.json index e1bd7b24..531dc81b 100644 --- a/src/main/services/i18n/locales/ru/preferences.json +++ b/src/main/services/i18n/locales/ru/preferences.json @@ -25,7 +25,7 @@ "label": "Запятая в конце", "none": "Нет", "all": "Все", - "es6": "ES6" + "es5": "ES5" }, "semi": "Точка с запятой", "singleQuote": "Одинарные кавычки" diff --git a/src/main/services/i18n/locales/uk_UA/common.json b/src/main/services/i18n/locales/uk_UA/common.json index 261265fa..c3b659e7 100644 --- a/src/main/services/i18n/locales/uk_UA/common.json +++ b/src/main/services/i18n/locales/uk_UA/common.json @@ -3,15 +3,15 @@ "moveStorage": "Перемістити", "openStorage": "Відкрити", "newStorage": "Створити нове", - "fromMassCodeV1": "Із massCode v1.0", - "fromSnippetsLab": "Із SnippetsLab", + "fromMassCodeV1": "massCode v1.0", + "fromSnippetsLab": "SnippetsLab", "confirm": "Підтвердити", "cancel": "Скасувати", - "ok": "Добре" + "ok": "ОК" }, "newFolder": "Нова папка", "newSnippet": "Новий сніпет", - "newFragment": "Новий фраґмент", + "newFragment": "Новий фрагмент", "addDescription": "Додати опис", "addToFavorites": "Додати в обране", "addTag": "Додати тег", @@ -22,9 +22,9 @@ "delete": "Видалити", "deleteNow": "Видалити зараз", "defaultLanguage": "Мова за замовчуванням", - "removeFromFavorites": "Видалити з уподобань", - "emptyTrash": "Очистити смітник", - "close": "Зачинити", + "removeFromFavorites": "Видалити з обраних", + "emptyTrash": "Очистити Смітник", + "close": "Закрити", "folder": { "untitled": "Нова папка", "plural": "Папки" @@ -42,7 +42,7 @@ "column": "Колонка", "sidebar": { "inbox": "Вхідні", - "favorites": "Уподобання", + "favorites": "Обрані", "allSnippets": "Всі сніпети", "trash": "Смітник", "untitled": "Нова папка", @@ -53,7 +53,7 @@ "darkMode": "Темний режим", "background": "Фон", "restartApp": "Перезавантажити massCode", - "updateAvailable": "Доступно обновление", + "updateAvailable": "Доступне оновлення", "hide": "Сховати", "show": "Показати", "collapse-all": "Закрити все", diff --git a/src/main/services/i18n/locales/uk_UA/dialog.json b/src/main/services/i18n/locales/uk_UA/dialog.json index a481046c..b98fe5a9 100644 --- a/src/main/services/i18n/locales/uk_UA/dialog.json +++ b/src/main/services/i18n/locales/uk_UA/dialog.json @@ -1,10 +1,10 @@ { "deleteConfirm": "Ви впевнені, що хочете остаточно видалити {{name}}?", "deleteConfirmMultipleSnippets": "Ви впевнені, що хочете остаточно видалити {{count}} обраних сніпетів?", - "noUndo": "Цю дії неможливо скасувати.", - "allSnippetsMoveToTrash": "Всі сніпети у цій теці буде пересунуто до смітника.", + "noUndo": "Цю дію неможливо скасувати.", + "allSnippetsMoveToTrash": "Усі сніпети у цій папці буде переміщено до Смітника.", "deleteTag": "Це так само стосується всіх сніпетів, що містять цей тег.", - "emptyTrash": "Ви впевнені, що хочете безповоротно очистити Смітник?", + "emptyTrash": "Ви впевнені, що хочете очистити Смітник?", "migrateConfirm": [ "Ви впевнені, що хочете мігрувати {{name}}?", "Під час міграції, поточна бібліотека буде перезаписана." diff --git a/src/main/services/i18n/locales/uk_UA/menu.json b/src/main/services/i18n/locales/uk_UA/menu.json index 9d3b2329..d1764f16 100644 --- a/src/main/services/i18n/locales/uk_UA/menu.json +++ b/src/main/services/i18n/locales/uk_UA/menu.json @@ -3,10 +3,10 @@ "label": "massCode", "preferences": "Параметри", "update": { - "label": "Перевірити оновлення....", + "label": "Перевірити оновлення...", "message": "Версія {{newVersion}} доступна для скачування.\nПоточна версія {{oldVersion}}.", "button": ["Перейти до завантаження", "OK"], - "noUpdate": "В даний час немає доступних оновлень." + "noUpdate": "Немає доступних оновлень." }, "quit": "Вийти з massCode", "about": "Про massCode", @@ -23,9 +23,9 @@ "reportIssue": "Відкрити Issue", "giveStar": "Поставити зірку", "extension": { - "vscode": "VS Code росширення", - "raycast": "Raycast росширення", - "alfred": "Alfred росширення" + "vscode": "VS Code розширення", + "raycast": "Raycast розширення", + "alfred": "Alfred розширення" }, "donate": { "openCollective": "Пожертвувати через Open Collective", @@ -33,22 +33,22 @@ "gumroad": "Пожертвувати через Gumroad (Visa, Mastercard, и тд.)" }, "twitter": "Twitter", - "devTools": "Відкрити інструменти разробника", + "devTools": "Відкрити інструменти розробника", "links": { "snippets": "Колекція сніпетів" } }, "file": { "label": "Файл", - "find": "Знайти" + "find": "Пошук" }, "view": { "label": "Вид", "sortBy": { - "label": "Сортувати сніпети по", + "label": "Сортувати сніпети за", "dateModified": "Дата модифікації", "dateCreated": "Дата створення", - "name": "Імені" + "name": "Назва" } }, "edit": { @@ -66,10 +66,10 @@ "copy": "Скопіювати сніпет у буфер", "format": "Форматувати", "previewCode": "Перегляд результату HTML/CSS", - "previewScreenshot": "Перегляд скріншота", + "previewScreenshot": "Перегляд скриншота", "fontSizeIncrease": "Збільшити шрифт", "fontSizeDecrease": "Зменшити шрифт", - "fontSizeReset": "Скинути размір шрифта" + "fontSizeReset": "Скинути розмір шрифта" }, "markdown": { "label": "Markdown", @@ -77,7 +77,7 @@ "preview": "Перегляд Markdown" }, "history": { - "label": "Істория", + "label": "Історія", "back": "Назад", "forward": "Вперед" } diff --git a/src/main/services/i18n/locales/uk_UA/preferences.json b/src/main/services/i18n/locales/uk_UA/preferences.json index 0b011799..e766b3e0 100644 --- a/src/main/services/i18n/locales/uk_UA/preferences.json +++ b/src/main/services/i18n/locales/uk_UA/preferences.json @@ -7,12 +7,12 @@ }, "editor": { "label": "Редактор", - "fontSize": "Размір шрифта", - "fontFamily": "Семейство шрифтів", + "fontSize": "Розмір шрифта", + "fontFamily": "Сімейство шрифтів", "wrap": { "label": "Перенесення", - "wordWrap": "Перенесення по словам", - "off": "Відключити" + "wordWrap": "Перенесення по словах", + "off": "Вимкнути" }, "tabSize": "Розмір відступу", "showInvisibles": "Показ невидимих символів", @@ -25,7 +25,7 @@ "label": "Кома у кінці", "none": "Ні", "all": "Усі", - "es6": "ES6" + "es5": "ES5" }, "semi": "Крапка з комою", "singleQuote": "Одинарні лапки" diff --git a/src/main/services/i18n/locales/uk_UA/special.json b/src/main/services/i18n/locales/uk_UA/special.json index 982f7148..4e77693a 100644 --- a/src/main/services/i18n/locales/uk_UA/special.json +++ b/src/main/services/i18n/locales/uk_UA/special.json @@ -10,10 +10,10 @@ "Сніпети з непідтримуваними мовами будуть встановлені на стандартний простий текст." ] }, - "htmlCssPreview": "Добавьте фрагменты с языками HTML и CSS для просмотра результата.", + "htmlCssPreview": "Додайте фрагменти з HTML та CSS для перегляду результатів.", "codeBlockRenderer": [ - "При использовании Codemirror, устанавливаемый язык для блока кода должен соответствовать одному из значений", - "языков" + "При використанні Codemirror, встановлена мова для блоку коду повинна відповідати одній із зазначених", + "мов" ] }, "success": { @@ -23,7 +23,7 @@ "folderContainDb": "Папка вже містить \"db.json\".", "folderNotContainDb": "Папка не містить \"db.json\"." }, - "unsponsored": "Неспонсоровані", + "unsponsored": "Не спонсороване", "supportMessage": "Привіт, це Антон 👋

\nДякую, що користуєтесь massCode. Якщо додаток приніс вам користь, будь ласка {{-tagStart}} підтримайте проєкт {{-tagEnd}}. Це надихне мене для продовження роботи над проєктом.", "snippetsShowcase": "Колекція сніпетів" } diff --git a/src/main/services/i18n/locales/zh_CN/preferences.json b/src/main/services/i18n/locales/zh_CN/preferences.json index b9d2be94..2d814482 100644 --- a/src/main/services/i18n/locales/zh_CN/preferences.json +++ b/src/main/services/i18n/locales/zh_CN/preferences.json @@ -25,7 +25,7 @@ "label": "尾后逗号", "none": "None", "all": "All", - "es6": "ES6" + "es5": "ES5" }, "semi": "句尾添加分号", "singleQuote": "使用单引号代替双引号" diff --git a/src/main/services/i18n/locales/zh_HK/preferences.json b/src/main/services/i18n/locales/zh_HK/preferences.json index 26aec32a..ac2058f1 100644 --- a/src/main/services/i18n/locales/zh_HK/preferences.json +++ b/src/main/services/i18n/locales/zh_HK/preferences.json @@ -25,7 +25,7 @@ "label": "尾後逗號", "none": "None", "all": "All", - "es6": "ES6" + "es5": "ES5" }, "semi": "句尾添加分號", "singleQuote": "使用單引號代替雙引號" diff --git a/src/main/services/i18n/locales/zh_TW/preferences.json b/src/main/services/i18n/locales/zh_TW/preferences.json index 3d064aa5..7325fdee 100644 --- a/src/main/services/i18n/locales/zh_TW/preferences.json +++ b/src/main/services/i18n/locales/zh_TW/preferences.json @@ -25,7 +25,7 @@ "label": "尾後逗號", "none": "None", "all": "All", - "es6": "ES6" + "es5": "ES5" }, "semi": "句尾新增分號", "singleQuote": "使用單引號代替雙引號" diff --git a/src/main/services/ipc/context-menu.ts b/src/main/services/ipc/context-menu.ts index 16b3ac59..41619523 100644 --- a/src/main/services/ipc/context-menu.ts +++ b/src/main/services/ipc/context-menu.ts @@ -183,22 +183,22 @@ export const subscribeToContextMenu = () => { if (type === 'folder' || type === 'all' || type === 'inbox') { defaultMenu.forEach(i => { menu.append(new MenuItem(i)) - menu.popup({ window: BrowserWindow.getFocusedWindow()! }) }) + menu.popup({ window: BrowserWindow.getFocusedWindow()! }) } if (type === 'favorites') { favoritesMenu.forEach(i => { menu.append(new MenuItem(i)) - menu.popup({ window: BrowserWindow.getFocusedWindow()! }) }) + menu.popup({ window: BrowserWindow.getFocusedWindow()! }) } if (type === 'trash') { trashMenu.forEach(i => { menu.append(new MenuItem(i)) - menu.popup({ window: BrowserWindow.getFocusedWindow()! }) }) + menu.popup({ window: BrowserWindow.getFocusedWindow()! }) } menu.on('menu-will-close', () => { @@ -265,7 +265,7 @@ export const subscribeToContextMenu = () => { { message: i18n.t('dialog:deleteConfirm', { name }), detail: i18n.t('dialog:allSnippetsMoveToTrash'), - buttons: [i18n.t('delete'), i18n.t('cancel')], + buttons: [i18n.t('delete'), i18n.t('button.cancel')], defaultId: 0, cancelId: 1 } @@ -323,7 +323,7 @@ export const subscribeToContextMenu = () => { { message: i18n.t('dialog:deleteConfirm', { name }), detail: i18n.t('dialog:deleteTag'), - buttons: [i18n.t('delete'), i18n.t('cancel')], + buttons: [i18n.t('delete'), i18n.t('button.cancel')], defaultId: 0, cancelId: 1 } @@ -381,22 +381,22 @@ export const subscribeToContextMenu = () => { if (type === 'folder') { folderMenu.forEach(i => { menu.append(new MenuItem(i)) - menu.popup({ window: BrowserWindow.getFocusedWindow()! }) }) + menu.popup({ window: BrowserWindow.getFocusedWindow()! }) } if (type === 'tag') { tagMenu.forEach(i => { menu.append(new MenuItem(i)) - menu.popup({ window: BrowserWindow.getFocusedWindow()! }) }) + menu.popup({ window: BrowserWindow.getFocusedWindow()! }) } if (type === 'trash') { trashMenu.forEach(i => { menu.append(new MenuItem(i)) - menu.popup({ window: BrowserWindow.getFocusedWindow()! }) }) + menu.popup({ window: BrowserWindow.getFocusedWindow()! }) } menu.on('menu-will-close', () => { diff --git a/src/renderer/components/editor/EditorPreview.vue b/src/renderer/components/editor/EditorPreview.vue index 4940f12b..41f1915d 100644 --- a/src/renderer/components/editor/EditorPreview.vue +++ b/src/renderer/components/editor/EditorPreview.vue @@ -8,7 +8,7 @@
diff --git a/src/renderer/components/editor/README.md b/src/renderer/components/editor/README.md index acf2f193..1f2aefb3 100644 --- a/src/renderer/components/editor/README.md +++ b/src/renderer/components/editor/README.md @@ -17,6 +17,7 @@ This is a list of language that supports in massCode. - AutoHotkey / AutoIt - Bash - BatchFile +- Bicep - C and C++ - C# - Cirru @@ -73,6 +74,7 @@ This is a list of language that supports in massCode. - JSX - Julia - Kotlin +- Kusto (KQL) - LaTeX - Latte - LESS diff --git a/src/renderer/components/editor/grammars/bicep.tmLanguage.json b/src/renderer/components/editor/grammars/bicep.tmLanguage.json new file mode 100644 index 00000000..aedc4187 --- /dev/null +++ b/src/renderer/components/editor/grammars/bicep.tmLanguage.json @@ -0,0 +1,143 @@ +{ + "scopeName": "source.bicep", + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "patterns": [{ "include": "#expression" }, { "include": "#comments" }], + "repository": { + "line-comment": { + "name": "comment.line.double-slash.bicep", + "match": "//.*(?=$)" + }, + "keyword": { + "name": "keyword.control.declaration.bicep", + "match": "\\b(metadata|targetScope|resource|module|param|var|output|for|in|if|existing|import|as|type|with)\\b" + }, + "object-literal": { + "begin": "{", + "end": "}", + "patterns": [ + { "include": "#object-property-key" }, + { "include": "#expression" }, + { "include": "#comments" } + ], + "name": "meta.object-literal.bicep" + }, + "string-literal-subst": { + "begin": "(?)", + "end": "(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*=>", + "name": "meta.lambda-start.bicep", + "beginCaptures": { + "1": { + "name": "meta.undefined.bicep", + "patterns": [{ "include": "#identifier" }, { "include": "#comments" }] + } + } + }, + "function-call": { + "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\(", + "end": "\\)", + "patterns": [{ "include": "#expression" }, { "include": "#comments" }], + "name": "meta.function-call.bicep", + "beginCaptures": { "1": { "name": "entity.name.function.bicep" } } + }, + "escape-character": { + "name": "constant.character.escape.bicep", + "match": "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)" + }, + "identifier": { + "name": "variable.other.readwrite.bicep", + "match": "\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?!(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\()" + }, + "string-literal": { + "begin": "'(?!'')", + "end": "'", + "patterns": [ + { "include": "#escape-character" }, + { "include": "#string-literal-subst" } + ], + "name": "string.quoted.single.bicep" + }, + "directive-variable": { + "name": "keyword.control.declaration.bicep", + "match": "\\b[_a-zA-Z-0-9]+\\b" + }, + "directive": { + "begin": "#\\b[_a-zA-Z-0-9]+\\b", + "end": "$", + "patterns": [ + { "include": "#directive-variable" }, + { "include": "#comments" } + ], + "name": "meta.directive.bicep" + }, + "decorator": { + "begin": "@(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*(?=\\b[_$[:alpha:]][_$[:alnum:]]*\\b)", + "end": "", + "patterns": [{ "include": "#expression" }, { "include": "#comments" }], + "name": "meta.decorator.bicep" + }, + "block-comment": { + "name": "comment.block.bicep", + "begin": "/\\*", + "end": "\\*/" + }, + "comments": { + "patterns": [ + { "include": "#line-comment" }, + { "include": "#block-comment" } + ] + }, + "numeric-literal": { "name": "constant.numeric.bicep", "match": "[0-9]+" }, + "expression": { + "patterns": [ + { "include": "#string-literal" }, + { "include": "#string-verbatim" }, + { "include": "#numeric-literal" }, + { "include": "#named-literal" }, + { "include": "#object-literal" }, + { "include": "#array-literal" }, + { "include": "#keyword" }, + { "include": "#identifier" }, + { "include": "#function-call" }, + { "include": "#decorator" }, + { "include": "#lambda-start" }, + { "include": "#directive" } + ] + }, + "named-literal": { + "name": "constant.language.bicep", + "match": "\\b(true|false|null)\\b" + } + }, + "name": "Bicep", + "fileTypes": [".bicep"] +} diff --git a/src/renderer/components/editor/grammars/kusto.tmLanguage.json b/src/renderer/components/editor/grammars/kusto.tmLanguage.json new file mode 100644 index 00000000..b46bd073 --- /dev/null +++ b/src/renderer/components/editor/grammars/kusto.tmLanguage.json @@ -0,0 +1,684 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "scopeName": "source.kusto", + "fileTypes": ["csl", "kusto", "kql"], + "name": "Kusto", + "patterns": [ + { + "match": "\\b(by|from|of|to|step|with)\\b", + "name": "keyword.other.operator.kusto", + "comment": "Tabular operators: common helper operators" + }, + { + "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b", + "name": "keyword.control.kusto", + "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements" + }, + { + "match": "\\b(and|or|has_all|has_any|matches|regex)\\b", + "name": "keyword.other.operator.kusto", + "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators" + }, + { + "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)", + "captures": { + "1": { + "name": "support.function.kusto" + }, + "2": { + "patterns": [ + { + "include": "#Strings" + } + ] + } + }, + "name": "meta.special.database.kusto", + "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction" + }, + { + "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b", + "name": "support.function.kusto", + "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction" + }, + { + "match": "(? import('./grammars/batchfile.tmLanguage.json'), scopeName: 'source.batchfile' }, + { + name: 'Bicep', + value: 'bicep', + grammar: () => import('./grammars/bicep.tmLanguage.json'), + scopeName: 'source.bicep' + }, { name: 'C and C++', value: 'c_cpp', @@ -430,6 +436,12 @@ export const languages: LanguageOption[] = [ grammar: () => import('./grammars/kotlin.tmLanguage.json'), scopeName: 'source.kotlin' }, + { + name: 'Kusto (KQL)', + value: 'kusto', + grammar: () => import('./grammars/kusto.tmLanguage.json'), + scopeName: 'source.kusto' + }, { name: 'LaTeX', value: 'latex', diff --git a/src/renderer/components/preferences/EditorPreferences.vue b/src/renderer/components/preferences/EditorPreferences.vue index 0aa26e4f..1519db1f 100644 --- a/src/renderer/components/preferences/EditorPreferences.vue +++ b/src/renderer/components/preferences/EditorPreferences.vue @@ -84,8 +84,8 @@ const trailingCommaOptions = [ value: 'all' }, { - label: i18n.t('preferences:editor.prettier.trailingComma.es6'), - value: 'es6' + label: i18n.t('preferences:editor.prettier.trailingComma.es5'), + value: 'es5' } ] diff --git a/src/renderer/components/screenshot/TheScreenshot.vue b/src/renderer/components/screenshot/TheScreenshot.vue index 493415a5..e89c9275 100644 --- a/src/renderer/components/screenshot/TheScreenshot.vue +++ b/src/renderer/components/screenshot/TheScreenshot.vue @@ -131,7 +131,8 @@ const props = defineProps() const appStore = useAppStore() const snippetStore = useSnippetStore() -const { escape } = useMagicKeys() +// eslint-disable-next-line camelcase +const { escape, Meta_C, Ctrl_C } = useMagicKeys() const frameRef = ref() const snippetRef = ref() @@ -200,6 +201,7 @@ const init = () => { ? getThemeName('dark:material') : getThemeName('light:github'), lineNumbers: false, + lineWrapping: true, tabSize: appStore.editor.tabSize, scrollbarStyle: 'null', readOnly: true @@ -249,6 +251,12 @@ const onSaveScreenshot = async (type: 'png' | 'svg' = 'png') => { track('snippets/create-screenshot') } +const copyToClipboard = async () => { + const data = await domToImage.toBlob(snippetRef.value!) + navigator.clipboard.write([new ClipboardItem({ 'image/png': data })]) + track('snippets/create-screenshot') +} + watch( () => appStore.screenshot.darkMode, v => { @@ -268,10 +276,6 @@ watch( { deep: true } ) -watch(escape, () => { - snippetStore.isScreenshotPreview = false -}) - watch( () => props.snippet, v => setValue(v) @@ -281,6 +285,21 @@ watch( v => setLang(v) ) +watch(escape, () => { + snippetStore.isScreenshotPreview = false +}) + +watch(Meta_C, v => { + if (v) { + copyToClipboard() + } +}) +watch(Ctrl_C, v => { + if (v) { + copyToClipboard() + } +}) + onMounted(() => { init() }) diff --git a/src/renderer/store/folders.ts b/src/renderer/store/folders.ts index 0605dbee..e5db4a16 100644 --- a/src/renderer/store/folders.ts +++ b/src/renderer/store/folders.ts @@ -1,5 +1,5 @@ import { useApi } from '@/composable' -import { store } from '@/electron' +import { i18n, store } from '@/electron' import { flatToNested } from '@/utils' import type { Folder, FolderTree } from '@shared/types/main/db' import { defineStore } from 'pinia' @@ -34,7 +34,7 @@ export const useFolderStore = defineStore('folders', { const snippetStore = useSnippetStore() const body: Partial = { - name: 'Untitled folder', + name: i18n.t('folder.untitled'), parentId: null, isOpen: false, isSystem: false, diff --git a/src/shared/types/renderer/editor/index.d.ts b/src/shared/types/renderer/editor/index.d.ts index 2902c2fa..1df4de50 100644 --- a/src/shared/types/renderer/editor/index.d.ts +++ b/src/shared/types/renderer/editor/index.d.ts @@ -14,6 +14,7 @@ export type Language = | 'assembly_x86' | 'autohotkey' | 'batchfile' + | 'bicep' | 'c_cpp' | 'c9search' | 'cirru' @@ -78,6 +79,7 @@ export type Language = | 'jsx' | 'julia' | 'kotlin' + | 'kusto' | 'latex' | 'latte' | 'less'