From 70f99a13bdc1c9164b7b967b00c4c9e583ce9e48 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Tue, 2 May 2017 19:22:24 -0400 Subject: [PATCH] Remove generated gutenberg.pot file from repository --- .babelrc | 10 ++- .gitignore | 1 + languages/README.md | 10 +++ languages/gutenberg.pot | 145 ---------------------------------------- package.json | 1 + 5 files changed, 19 insertions(+), 148 deletions(-) create mode 100644 languages/README.md delete mode 100644 languages/gutenberg.pot diff --git a/.babelrc b/.babelrc index 13dcd2edfb7efd..85b270458c4ce4 100644 --- a/.babelrc +++ b/.babelrc @@ -11,9 +11,6 @@ "transform-object-rest-spread", [ "transform-react-jsx", { "pragma": "wp.element.createElement" - } ], - [ "./i18n/babel-plugin", { - "output": "languages/gutenberg.pot" } ] ], "env": { @@ -24,6 +21,13 @@ }, "test": { "presets": [ "latest" ] + }, + "gettext": { + "plugins": [ + [ "./i18n/babel-plugin", { + "output": "languages/gutenberg.pot" + } ] + ] } } } diff --git a/.gitignore b/.gitignore index d70384c1c037e0..3c9740691985da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules build +gutenberg.pot .vscode *.log yarn.lock diff --git a/languages/README.md b/languages/README.md new file mode 100644 index 00000000000000..97a4dfbee34ca3 --- /dev/null +++ b/languages/README.md @@ -0,0 +1,10 @@ +Languages +========= + +The generated POT template file is not included in this repository. To create this file locally, follow instructions from [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) to install the project, then run the following command: + +``` +npm run gettext-strings +``` + +After the build completes, you'll find a `gutenberg.pot` strings file in this directory. diff --git a/languages/gutenberg.pot b/languages/gutenberg.pot deleted file mode 100644 index 9cf1223b944c49..00000000000000 --- a/languages/gutenberg.pot +++ /dev/null @@ -1,145 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=utf-8\n" -"X-Generator: babel-plugin-wp-i18n\n" - -#: blocks/components/editable/format-toolbar.js:12 -msgid "Bold" -msgstr "" - -#: blocks/components/editable/format-toolbar.js:121 -msgid "Link" -msgstr "" - -#: blocks/components/editable/format-toolbar.js:139 -msgid "Paste URL or type" -msgstr "" - -#: blocks/components/editable/format-toolbar.js:17 -msgid "Italic" -msgstr "" - -#: blocks/components/editable/format-toolbar.js:22 -msgid "Strikethrough" -msgstr "" - -#: blocks/components/editable/index.js:29 -#: blocks/library/image/index.js:44 -#: blocks/library/list/index.js:25 -msgid "Align left" -msgstr "" - -#: blocks/components/editable/index.js:34 -#: blocks/library/image/index.js:50 -#: blocks/library/list/index.js:33 -msgid "Align center" -msgstr "" - -#: blocks/components/editable/index.js:39 -#: blocks/library/image/index.js:56 -#: blocks/library/list/index.js:41 -msgid "Align right" -msgstr "" - -#: blocks/library/embed/index.js:10 -msgid "Embed" -msgstr "" - -#: blocks/library/embed/index.js:33 -#: blocks/library/image/index.js:107 -msgid "Write caption…" -msgstr "" - -#: blocks/library/freeform/index.js:9 -msgid "Freeform" -msgstr "" - -#: blocks/library/heading/index.js:10 -msgid "Heading" -msgstr "" - -#: blocks/library/heading/index.js:24 -msgid "Heading %s" -msgstr "" - -#: blocks/library/image/index.js:62 -msgid "No alignment" -msgstr "" - -#: blocks/library/image/index.js:68 -msgid "Wide width" -msgstr "" - -#: blocks/library/image/index.js:89 -msgid "Image" -msgstr "" - -#: blocks/library/image/index.js:92 -msgid "Drag image here or insert from media library" -msgstr "" - -#: blocks/library/image/index.js:95 -msgid "Insert from Media Library" -msgstr "" - -#: blocks/library/list/index.js:11 -msgid "List" -msgstr "" - -#: blocks/library/list/index.js:49 -msgid "Justify" -msgstr "" - -#: blocks/library/quote/index.js:11 -msgid "Quote" -msgstr "" - -#: blocks/library/quote/index.js:35 -msgid "Quote style %d" -msgstr "" - -#: blocks/library/text/index.js:10 -msgid "Text" -msgstr "" - -#: editor/components/inserter/index.js:50 -msgid "Insert block" -msgstr "" - -#: editor/components/inserter/menu.js:77 -msgid "Search…" -msgstr "" - -#: editor/header/mode-switcher/index.js:20 -msgid "Visual" -msgstr "" - -#: editor/header/saved-state/index.js:11 -msgid "Saved" -msgstr "" - -#: editor/header/tools/index.js:21 -msgid "Undo" -msgstr "" - -#: editor/header/tools/index.js:27 -msgid "Redo" -msgstr "" - -#: editor/header/tools/index.js:38 -msgid "Post Settings" -msgstr "" - -#: editor/header/tools/index.js:42 -msgid "Publish" -msgstr "" - -#: editor/header/mode-switcher/index.js:24 -msgctxt "Name for the Text editor tab (formerly HTML)" -msgid "Text" -msgstr "" - -#: editor/header/tools/index.js:34 -msgctxt "imperative verb" -msgid "Preview" -msgstr "" \ No newline at end of file diff --git a/package.json b/package.json index 502e3331740666..054c6f78192cb4 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "scripts": { "test-unit": "cross-env NODE_ENV=test webpack && mocha build --require bootstrap-test.js", "build": "cross-env BABEL_ENV=default NODE_ENV=production webpack", + "gettext-strings": "cross-env BABEL_ENV=gettext webpack", "lint": "eslint .", "dev": "cross-env BABEL_ENV=default webpack --watch", "test": "npm run lint && npm run test-unit",