diff --git a/Makefile b/Makefile index 811fe31..f493569 100644 --- a/Makefile +++ b/Makefile @@ -86,8 +86,7 @@ install: ## Install the local environment, Cypress, build acceptance containers # Dev Helpers .PHONY: i18n i18n: ## Sync i18n - @echo "$(YELLOW)==> Do not forget to setup the local environment (make install) $(RESET)" - yarn i18n + ${DEV_COMPOSE} run --rm -e ADDON_PATH=$(ADDON_PATH) --entrypoint '/app/i18n.sh' addon-dev .PHONY: format format: ## Format codebase diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..2f4e1e8 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,17 @@ +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, + }; +}; diff --git a/dockerfiles/Dockerfile.dev b/dockerfiles/Dockerfile.dev index 05ad56e..47a5e49 100644 --- a/dockerfiles/Dockerfile.dev +++ b/dockerfiles/Dockerfile.dev @@ -5,6 +5,9 @@ FROM plone/frontend-dev:${VOLTO_VERSION} ARG ADDON_NAME ARG ADDON_PATH +# Copy i18n helper +COPY --chown=node:node dockerfiles/i18n.sh /app/ + # Copy linter / prettier configs COPY --chown=node:node .eslintignore* .prettierignore* /app/ diff --git a/dockerfiles/i18n.sh b/dockerfiles/i18n.sh new file mode 100755 index 0000000..94cb6c5 --- /dev/null +++ b/dockerfiles/i18n.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cd "/app/src/addons/${ADDON_PATH}/" && /app/node_modules/.bin/i18n --addon && rm -Rf build || exit diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 9616ad2..36d1e9e 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -17,33 +17,54 @@ msgstr "" "Domain: volto\n" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authenticating msgid "Authenticating" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authentication failed. msgid "Authentication failed." msgstr "" #: components/Login/LoginForm +# defaultMessage: Loading +msgid "Loading" +msgstr "" + +#: components/Login/LoginForm +# defaultMessage: Login msgid "Log In" msgstr "" #: components/AuthProvider/AuthProvider +# defaultMessage: Log in with msgid "Log in with" msgstr "" #: components/Login/LoginForm +# defaultMessage: Login msgid "Login" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Login Failed msgid "Login Failed" msgstr "" #: components/Login/LoginForm +# defaultMessage: Select Login Provider msgid "Select Login Provider" msgstr "" #: components/AuthProvider/AuthProvider +# defaultMessage: Sign up with msgid "Sign up with" msgstr "" + +#: components/Logout/Logout +# defaultMessage: You have been logged out +msgid "You have been logged out" +msgstr "" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 9616ad2..36d1e9e 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -17,33 +17,54 @@ msgstr "" "Domain: volto\n" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authenticating msgid "Authenticating" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authentication failed. msgid "Authentication failed." msgstr "" #: components/Login/LoginForm +# defaultMessage: Loading +msgid "Loading" +msgstr "" + +#: components/Login/LoginForm +# defaultMessage: Login msgid "Log In" msgstr "" #: components/AuthProvider/AuthProvider +# defaultMessage: Log in with msgid "Log in with" msgstr "" #: components/Login/LoginForm +# defaultMessage: Login msgid "Login" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Login Failed msgid "Login Failed" msgstr "" #: components/Login/LoginForm +# defaultMessage: Select Login Provider msgid "Select Login Provider" msgstr "" #: components/AuthProvider/AuthProvider +# defaultMessage: Sign up with msgid "Sign up with" msgstr "" + +#: components/Logout/Logout +# defaultMessage: You have been logged out +msgid "You have been logged out" +msgstr "" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 4086798..0ec786e 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -20,33 +20,54 @@ msgstr "" "X-Is-Fallback-For: es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve\n" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authenticating msgid "Authenticating" msgstr "Autenticando" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authentication failed. msgid "Authentication failed." msgstr "Autenticación fallida." #: components/Login/LoginForm +# defaultMessage: Loading +msgid "Loading" +msgstr "" + +#: components/Login/LoginForm +# defaultMessage: Login msgid "Log In" msgstr "Inicio de Sesión" #: components/AuthProvider/AuthProvider +# defaultMessage: Log in with msgid "Log in with" msgstr "Inicio de sesión con" #: components/Login/LoginForm +# defaultMessage: Login msgid "Login" msgstr "Inicio de sesión" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Login Failed msgid "Login Failed" msgstr "Inicio de Sesión fallo" #: components/Login/LoginForm +# defaultMessage: Select Login Provider msgid "Select Login Provider" msgstr "Seleccionar proveedor de inicio de sesión" #: components/AuthProvider/AuthProvider +# defaultMessage: Sign up with msgid "Sign up with" msgstr "Regístrate con" + +#: components/Logout/Logout +# defaultMessage: You have been logged out +msgid "You have been logged out" +msgstr "" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 9616ad2..36d1e9e 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -17,33 +17,54 @@ msgstr "" "Domain: volto\n" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authenticating msgid "Authenticating" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authentication failed. msgid "Authentication failed." msgstr "" #: components/Login/LoginForm +# defaultMessage: Loading +msgid "Loading" +msgstr "" + +#: components/Login/LoginForm +# defaultMessage: Login msgid "Log In" msgstr "" #: components/AuthProvider/AuthProvider +# defaultMessage: Log in with msgid "Log in with" msgstr "" #: components/Login/LoginForm +# defaultMessage: Login msgid "Login" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Login Failed msgid "Login Failed" msgstr "" #: components/Login/LoginForm +# defaultMessage: Select Login Provider msgid "Select Login Provider" msgstr "" #: components/AuthProvider/AuthProvider +# defaultMessage: Sign up with msgid "Sign up with" msgstr "" + +#: components/Logout/Logout +# defaultMessage: You have been logged out +msgid "You have been logged out" +msgstr "" diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index 8c76b51..8bdbdc9 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -17,33 +17,54 @@ msgstr "" "Domain: volto\n" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authenticating msgid "Authenticating" msgstr "Autenticando" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Authentication failed. msgid "Authentication failed." msgstr "Falha na autenticaćão." #: components/Login/LoginForm +# defaultMessage: Loading +msgid "Loading" +msgstr "" + +#: components/Login/LoginForm +# defaultMessage: Login msgid "Log In" msgstr "Entrar" #: components/AuthProvider/AuthProvider +# defaultMessage: Log in with msgid "Log in with" msgstr "Entrar com" #: components/Login/LoginForm +# defaultMessage: Login msgid "Login" msgstr "Acessar" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC +# defaultMessage: Login Failed msgid "Login Failed" msgstr "Falha no acesso" #: components/Login/LoginForm +# defaultMessage: Select Login Provider msgid "Select Login Provider" msgstr "Escolha o provedor de autenticaćão" #: components/AuthProvider/AuthProvider +# defaultMessage: Sign up with msgid "Sign up with" msgstr "Cadastrar usando" + +#: components/Logout/Logout +# defaultMessage: You have been logged out +msgid "You have been logged out" +msgstr "" diff --git a/locales/volto.pot b/locales/volto.pot index 55817d9..5f643b0 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2022-07-18T19:46:58.284Z\n" +"POT-Creation-Date: 2023-11-17T22:25:53.666Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -14,15 +14,22 @@ msgstr "" "Domain: volto\n" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC # defaultMessage: Authenticating msgid "Authenticating" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC # defaultMessage: Authentication failed. msgid "Authentication failed." msgstr "" +#: components/Login/LoginForm +# defaultMessage: Loading +msgid "Loading" +msgstr "" + #: components/Login/LoginForm # defaultMessage: Login msgid "Log In" @@ -39,6 +46,7 @@ msgid "Login" msgstr "" #: components/LoginAuthomatic/LoginAuthomatic +#: components/LoginOIDC/LoginOIDC # defaultMessage: Login Failed msgid "Login Failed" msgstr "" @@ -52,3 +60,8 @@ msgstr "" # defaultMessage: Sign up with msgid "Sign up with" msgstr "" + +#: components/Logout/Logout +# defaultMessage: You have been logged out +msgid "You have been logged out" +msgstr ""