Skip to content

Commit

Permalink
Volto 12 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Apr 19, 2021
1 parent f34d618 commit 23e3f30
Show file tree
Hide file tree
Showing 70 changed files with 3,184 additions and 6,435 deletions.
26 changes: 17 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
const jsConfig = require('./jsconfig').compilerOptions;
const path = require('path');
const projectRootPath = __dirname;
const packageJson = require(path.join(projectRootPath, 'package.json'));

const pathsConfig = jsConfig.paths;
let voltoPath = './node_modules/@plone/volto';
Object.keys(pathsConfig).forEach(pkg => {
if (pkg === '@plone/volto') {
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
}
});

const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
const reg = new AddonConfigurationRegistry(__dirname);

// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
const addonsAliases = [];
if (packageJson.addons) {
const addons = packageJson.addons;
addons.forEach(addon => {
const addonPath = `${addon}/src`;
addonsAliases.push([addon, addonPath]);
});
}
const addonAliases = Object.keys(reg.packages).map(o => [
o,
reg.packages[o].modulePath,
]);

module.exports = {
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
Expand All @@ -19,7 +27,7 @@ module.exports = {
alias: {
map: [
['@plone/volto', '@plone/volto/src'],
...addonsAliases,
...addonAliases,
['@package', `${__dirname}/src`],
['~', `${__dirname}/src`],
],
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-prefix ""
13 changes: 1 addition & 12 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
const baseCfg = require('@plone/volto/babel');

module.exports = function (api) {
const voltoConfig = baseCfg(api);
const presets = voltoConfig.presets;
const plugins = [...voltoConfig.plugins];
return {
plugins,
presets,
sourceType: 'unambiguous',
};
};
module.exports = require('@plone/volto/babel');
2 changes: 1 addition & 1 deletion docker-image.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eeacms/ims-frontend
eeacms/eprtr-frontend:1.4.5
224 changes: 0 additions & 224 deletions jest.config.js

This file was deleted.

22 changes: 8 additions & 14 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
{
"compilerOptions": {
"paths": {
"volto-tabsview": [
"develop/volto-tabsview/src"
],
"@eeacms/volto-grid-block": [
"develop/volto-grid-block/src"
"volto-addons": [
"addons/volto-addons/src"
],
"volto-datablocks": [
"develop/volto-datablocks/src"
],
"volto-addons": [
"develop/volto-addons/src"
"addons/volto-datablocks/src"
],
"volto-embed": [
"develop/volto-embed/src"
"addons/volto-embed/src"
],
"volto-matomo": [
"develop/volto-matomo/src"
"volto-tabsview": [
"addons/volto-tabsview/src"
],
"@eeacms/volto-sentry-rancher-config": [
"develop/volto-sentry-rancher-config/src"
"@eeacms/volto-grid-block": [
"addons/volto-grid-block/src"
]
},
"baseUrl": "src"
Expand Down
1 change: 1 addition & 0 deletions locales/eu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
17 changes: 17 additions & 0 deletions locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Translation of plone.pot to EU
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27T19:30:59.079Z\n"
"PO-Revision-Date: 2016-10-22 16:41-0500\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language: eu\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Language-Code: eu\n"
"Language-Name: eu\n"
"Preferred-Encodings: utf-8 latin1\n"
1 change: 1 addition & 0 deletions locales/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
27 changes: 27 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of plone.pot to French
# French Translation Team <plone-i18n@lists.sourceforge.net>, 2003-2006.
# Sebastien Douche <sdouche@gmail.com>, 2005-2007.
# Encolpe Degoute <encolpe.degoute@ingeniweb.com>, 2006, 2007, 2008.
# Gilles Lenfant <gilles.lenfant@ingeniweb.com>, 2008.
# Encolpe Degoute <encolpe@gmail.com>, 2008.
# Vincent Fretin <vincent.fretin@gmail.com>, 2009.
# Kevin Deldycke <kevin@deldycke.com>, 2009.
# JeanMichel FRANCOIS <toutpt@gmail.com>, 2010.
# Denis Bitouzé <denis.bitouze@univ-littoral.fr>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27T19:30:59.079Z\n"
"PO-Revision-Date: 2016-10-22 16:41-0500\n"
"Last-Translator: Benoît Suttor <benoit.suttor@imio.be>\n"
"Language: fr\n"
"Language-Team: French <plone-fr@lists.plone.org>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Language-Code: fr\n"
"Language-Name: French\n"
"Preferred-Encodings: utf-8 latin1\n"
"X-Is-Fallback-For: fr-be fr-ca fr-lu fr-mc fr-ch fr-fr\n"
1 change: 1 addition & 0 deletions locales/ro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
20 changes: 20 additions & 0 deletions locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Translation of plone.pot to Romanian
# Alin Voinea <avoinea@plone.org>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-27T19:30:59.079Z\n"
"PO-Revision-Date: 2016-10-22 16:41-0500\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language: ro\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Language-Code: ro\n"
"Language-Name: Romanian\n"
"Preferred-Encodings: utf-8 latin1\n"


Loading

0 comments on commit 23e3f30

Please sign in to comment.