From afbd57531b310dbd0abfd6820c4443a1b33e775f Mon Sep 17 00:00:00 2001 From: Giulia Ghisini Date: Wed, 31 Mar 2021 12:32:23 +0200 Subject: [PATCH] added accessibility labels and translations --- locales/de/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/en/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/es/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/eu/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/fr/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/it/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/ja/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/nl/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/pt/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/pt_BR/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/ro/LC_MESSAGES/volto.po | 14 +++++++++++++- locales/volto.pot | 19 +++++++++++++++++-- .../theme/Navigation/Navigation.jsx | 10 +++++++++- src/i18n.js | 9 ++++++--- 14 files changed, 175 insertions(+), 17 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index d3e49d1..ca67aaa 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "Close menu" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "Main navigation" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "Open menu" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "Unknown Block {block}" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index c94d18e..e3a489e 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "Chiudi il menu" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "Navigazione principale" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "Apri il menu" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "Blocco {block} sconosciuto" diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 5f0ea22..8dab981 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -11,7 +11,19 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu msgid "Unknown Block" msgstr "" diff --git a/locales/volto.pot b/locales/volto.pot index 3853daa..6fb3ba6 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" - "POT-Creation-Date: 2021-03-30T07:18:46.247Z\n" + "POT-Creation-Date: 2021-03-31T10:30:09.132Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -13,7 +13,22 @@ msgid "" "Preferred-Encodings: utf-8\n" "Domain: volto\n" - #: components/DropdownMenu + #: customizations/components/theme/Navigation/Navigation +# defaultMessage: Close menu +msgid "Close menu" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +# defaultMessage: Main navigation +msgid "Main navigation" +msgstr "" + +#: customizations/components/theme/Navigation/Navigation +# defaultMessage: Open menu +msgid "Open menu" +msgstr "" + +#: components/DropdownMenu # defaultMessage: Unknown Block {block} msgid "Unknown Block" msgstr "" diff --git a/src/customizations/components/theme/Navigation/Navigation.jsx b/src/customizations/components/theme/Navigation/Navigation.jsx index 6e60f43..2b34f82 100644 --- a/src/customizations/components/theme/Navigation/Navigation.jsx +++ b/src/customizations/components/theme/Navigation/Navigation.jsx @@ -27,6 +27,10 @@ const messages = defineMessages({ id: 'Open menu', defaultMessage: 'Open menu', }, + dropdownmenu_aria: { + id: 'Main navigation', + defaultMessage: 'Main navigation', + }, }); const Navigation = ({ pathname, type }) => { @@ -105,7 +109,11 @@ const Navigation = ({ pathname, type }) => { const menu = getItemsByPath(dropdownMenuNavItems, pathname); return ( -