Skip to content

Commit

Permalink
chore: upgrade to volto 14, use @plone/script i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Oct 23, 2021
1 parent 7ae83ef commit 93b44fc
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 206 deletions.
18 changes: 17 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
module.exports = require('@plone/volto/babel');
module.exports = function (api) {
api.cache(true);
const presets = ['razzle/babel'];
const plugins = [
[
'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
{
messagesDir: './build/messages/',
},
],
];

return {
plugins,
presets,
};
};
2 changes: 1 addition & 1 deletion locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


2 changes: 1 addition & 1 deletion locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


26 changes: 13 additions & 13 deletions locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2021-08-07T17:39:51.701Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8\n"
"Domain: volto\n"
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2021-10-23T15:33:06.536Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8\n"
"Domain: volto\n"


8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@
"analytics"
],
"scripts": {
"i18n": "NODE_ENV=production node src/i18n.js"
"i18n": "rm -rf build/messages && NODE_ENV=production i18n -a"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"dependencies": {
"@plone/scripts": "^1.0.3"
},
"peerDependencies": {
"@plone/volto": ">=14.0.0"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
Expand Down
180 changes: 0 additions & 180 deletions src/i18n.js

This file was deleted.

0 comments on commit 93b44fc

Please sign in to comment.