Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: translated aria-label of menu hamburger icon #591

Merged
merged 9 commits into from
Apr 3, 2024
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@

## Versione 11.9.0 (03/04/2024)

### Fix

- Tradotto il messaggio per Screen Reader del bottone per aprire e chiudere il menu in mobile.
### Migliorie

- Effettuate diverse migliorie di accessibilità.
Expand Down
15 changes: 15 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -3958,6 +3958,21 @@ msgstr ""
msgid "to"
msgstr ""

#: overrideTranslations
# defaultMessage: {action} il menu
msgid "toggle-menu"
msgstr ""

#: overrideTranslations
# defaultMessage: Chiudi
msgid "toggleMenu_close"
msgstr ""

#: overrideTranslations
# defaultMessage: Apri
msgid "toggleMenu_open"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
#: components/ItaliaTheme/Search/Search
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti
Expand Down
15 changes: 15 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -3943,6 +3943,21 @@ msgstr "title"
msgid "to"
msgstr "to"

#: overrideTranslations
# defaultMessage: {action} il menu
msgid "toggle-menu"
msgstr "{action} the menu"

#: overrideTranslations
# defaultMessage: Chiudi
msgid "toggleMenu_close"
msgstr "Close"

#: overrideTranslations
# defaultMessage: Apri
msgid "toggleMenu_open"
msgstr "Open"

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
#: components/ItaliaTheme/Search/Search
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti
Expand Down
15 changes: 15 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -3952,6 +3952,21 @@ msgstr "título"
msgid "to"
msgstr "a"

#: overrideTranslations
# defaultMessage: {action} il menu
msgid "toggle-menu"
msgstr ""

#: overrideTranslations
# defaultMessage: Chiudi
msgid "toggleMenu_close"
msgstr ""

#: overrideTranslations
# defaultMessage: Apri
msgid "toggleMenu_open"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
#: components/ItaliaTheme/Search/Search
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti
Expand Down
15 changes: 15 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -3960,6 +3960,21 @@ msgstr "titre"
msgid "to"
msgstr "au"

#: overrideTranslations
# defaultMessage: {action} il menu
msgid "toggle-menu"
msgstr ""

#: overrideTranslations
# defaultMessage: Chiudi
msgid "toggleMenu_close"
msgstr ""

#: overrideTranslations
# defaultMessage: Apri
msgid "toggleMenu_open"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
#: components/ItaliaTheme/Search/Search
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti
Expand Down
15 changes: 15 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -3943,6 +3943,21 @@ msgstr "titolo"
msgid "to"
msgstr "al"

#: overrideTranslations
# defaultMessage: {action} il menu
msgid "toggle-menu"
msgstr ""

#: overrideTranslations
# defaultMessage: Chiudi
msgid "toggleMenu_close"
msgstr ""

#: overrideTranslations
# defaultMessage: Apri
msgid "toggleMenu_open"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
#: components/ItaliaTheme/Search/Search
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti
Expand Down
19 changes: 17 additions & 2 deletions locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2024-04-02T15:16:18.332Z\n"
"POT-Creation-Date: 2024-03-28T15:22:56.240Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -3280,7 +3280,7 @@ msgid "search_startDate"
msgstr ""

#: helpers/Translations/searchBlockExtendedTranslations
# defaultMessage: Ricerca per: <em>{searchedtext}</em>.
# defaultMessage: Ricerca per: <em>{searchedtext}</em>.
msgid "searchedFor"
msgstr ""

Expand Down Expand Up @@ -3945,6 +3945,21 @@ msgstr ""
msgid "to"
msgstr ""

#: overrideTranslations
# defaultMessage: {action} il menu
msgid "toggle-menu"
msgstr ""

#: overrideTranslations
# defaultMessage: Chiudi
msgid "toggleMenu_close"
msgstr ""

#: overrideTranslations
# defaultMessage: Apri
msgid "toggleMenu_open"
msgstr ""

#: components/ItaliaTheme/Header/HeaderSearch/SearchModal
#: components/ItaliaTheme/Search/Search
#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderTassonomiaArgomenti
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ const Navigation = ({ pathname }) => {
<HeaderToggler
aria-controls="it-navigation-collapse"
aria-expanded={collapseOpen}
aria-label={intl.formatMessage(messages.toggleNavigation)}
aria-label={intl.formatMessage(messages.toggleMenu, {
action: collapseOpen
? intl.formatMessage(messages.toggleMenu_close)
: intl.formatMessage(messages.toggleMenu_open),
})}
onClick={() => {
setCollapseOpen(!collapseOpen);
setFocusTrapActive(!focusTrapActive);
Expand Down Expand Up @@ -185,9 +189,17 @@ const messages = defineMessages({
id: 'close-menu',
defaultMessage: 'Chiudi menu',
},
toggleNavigation: {
id: 'toggle-navigation',
defaultMessage: 'Apri il menu',
toggleMenu: {
id: 'toggle-menu',
defaultMessage: '{action} il menu',
},
toggleMenu_open: {
id: 'toggleMenu_open',
defaultMessage: 'Apri',
},
toggleMenu_close: {
id: 'toggleMenu_close',
defaultMessage: 'Chiudi',
},
});

Expand Down
12 changes: 12 additions & 0 deletions src/overrideTranslations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,16 @@ defineMessages({
id: 'form_default_cancel_label',
defaultMessage: 'Annulla',
},
toggleMenu: {
id: 'toggle-menu',
defaultMessage: '{action} il menu',
},
toggleMenu_open: {
id: 'toggleMenu_open',
defaultMessage: 'Apri',
},
toggleMenu_close: {
id: 'toggleMenu_close',
defaultMessage: 'Chiudi',
},
});
Loading