diff --git a/build/extract-l10n.js b/build/extract-l10n.js index 4b274c195..4efc8f80a 100644 --- a/build/extract-l10n.js +++ b/build/extract-l10n.js @@ -1,23 +1,33 @@ -import { GettextExtractor, JsExtractors } from 'gettext-extractor' +import { GettextExtractor, JsExtractors, HtmlExtractors } from 'gettext-extractor' -let extractor = new GettextExtractor(); +const extractor = new GettextExtractor() -extractor - .createJsParser([ - JsExtractors.callExpression('t', { - arguments: { - text: 0, - } - }), - JsExtractors.callExpression('n', { - arguments: { - text: 1, - textPlural: 2, - } - }), - ]) - .parseFilesGlob('./lib/**/*.@(ts|js|vue)'); +const jsParser = extractor.createJsParser([ + JsExtractors.callExpression('t', { + arguments: { + text: 0, + }, + }), + JsExtractors.callExpression('n', { + arguments: { + text: 0, + textPlural: 1, + }, + }), +]) + .parseFilesGlob('./lib/**/*.@(ts|js)') -extractor.savePotFile('./l10n/messages.pot'); +extractor.createHtmlParser([ + HtmlExtractors.embeddedJs('*', jsParser), + HtmlExtractors.embeddedAttributeJs(/:[a-z]+/, jsParser), +]) + .parseFilesGlob('./lib/**/*.vue') -extractor.printStats(); +// remove references to avoid conflicts +extractor.getMessages().forEach((msg) => { + msg.references = [] +}) + +extractor.savePotFile('./l10n/messages.pot') + +extractor.printStats() diff --git a/l10n/messages.pot b/l10n/messages.pot index 7c295afc8..a7f3f221c 100644 --- a/l10n/messages.pot +++ b/l10n/messages.pot @@ -2,92 +2,113 @@ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" -#: lib/components/FilePicker/FilePickerBreadcrumbs.vue:91 msgid "\"{name}\" is an invalid file name." msgstr "" -#: lib/components/FilePicker/FilePickerBreadcrumbs.vue:93 msgid "\"{name}\" is not an allowed filetype" msgstr "" -#: lib/components/FilePicker/FilePickerBreadcrumbs.vue:89 msgid "\"/\" is not allowed inside a file name." msgstr "" -#: lib/components/FilePicker/FilePickerNavigation.vue:57 msgid "All files" msgstr "" -#: lib/filepicker.ts:207 msgid "Choose" msgstr "" -#: lib/filepicker.ts:207 msgid "Choose {file}" msgstr "" -#: lib/filepicker.ts:214 msgid "Copy" msgstr "" -#: lib/filepicker.ts:214 msgid "Copy to {target}" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:249 msgid "Could not create the new folder" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:159 -#: lib/components/FilePicker/FilePickerNavigation.vue:65 +msgid "Create directory" +msgstr "" + +msgid "Current view selector" +msgstr "" + msgid "Favorites" msgstr "" -#: lib/components/FilePicker/FilePickerBreadcrumbs.vue:87 msgid "File name cannot be empty." msgstr "" -#: lib/components/FilePicker/FilePicker.vue:235 +msgid "Filepicker sections" +msgstr "" + msgid "Files and folders you mark as favorite will show up here." msgstr "" -#: lib/components/FilePicker/FilePicker.vue:233 msgid "Files and folders you recently modified will show up here." msgstr "" -#: lib/components/FilePicker/FileList.vue:47 +msgid "Filter file list" +msgstr "" + +msgid "Home" +msgstr "" + +msgid "Mime type {mime}" +msgstr "" + msgid "Modified" msgstr "" -#: lib/filepicker.ts:222 msgid "Move" msgstr "" -#: lib/filepicker.ts:222 msgid "Move to {target}" msgstr "" -#: lib/components/FilePicker/FileList.vue:27 msgid "Name" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:159 -#: lib/components/FilePicker/FilePickerNavigation.vue:61 +msgid "New" +msgstr "" + +msgid "New folder" +msgstr "" + +msgid "New folder name" +msgstr "" + +msgid "No files in here" +msgstr "" + +msgid "No files matching your filter were found." +msgstr "" + +msgid "No matching files" +msgstr "" + msgid "Recent" msgstr "" -#: lib/components/FilePicker/FileList.vue:8 +msgid "Select all entries" +msgstr "" + msgid "Select entry" msgstr "" -#: lib/components/FilePicker/FileList.vue:37 +msgid "Select the row for {nodename}" +msgstr "" + msgid "Size" msgstr "" -#: lib/toast.ts:242 msgid "Undo" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:231 +msgid "unknown" +msgstr "" + msgid "Upload some content or sync with your devices!" msgstr ""