Skip to content

Commit

Permalink
fixed a11y Logo Issue and added Translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Molochem committed Jan 31, 2024
1 parent 81065c3 commit 7b34225
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/volto/locales/ca/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ msgstr ""
msgid "Back"
msgstr "Enrere"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Torna a la pàgina d'inici"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ msgstr "Verfügbare Inhaltsregeln:"
msgid "Back"
msgstr "Zurück"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Zurück zur Startseite"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ msgstr ""
msgid "Back"
msgstr ""

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr ""

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ msgstr "Reglas de contenido disponibles:"
msgid "Back"
msgstr "Volver"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Volver a la página de inicio"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/eu/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ msgstr "Erabilgarri dauden eduki-erregelak:"
msgid "Back"
msgstr "Atzera"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Itzuli hasierako orrialdera"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/fi/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ msgstr "Saatavilla olevat sisältösäännöt:"
msgid "Back"
msgstr "Takaisin"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Takaisin kotisivulle"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ msgstr "Règles de contenu disponibles :"
msgid "Back"
msgstr "Retour"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Retour à la page d'accueil"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ msgstr "Regole di contenuto disponibili:"
msgid "Back"
msgstr "Indietro"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Torna alla home page"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/ja/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ msgstr ""
msgid "Back"
msgstr "戻る"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "ホームページに戻ります"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/nl/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ msgstr ""
msgid "Back"
msgstr ""

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Terug naar de startpagina"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/pt/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,11 @@ msgstr ""
msgid "Back"
msgstr "Voltar"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Voltar à página inicial"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/pt_BR/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ msgstr "Regras de conteúdo disponíveis:"
msgid "Back"
msgstr "Voltar"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Voltar à página inicial"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/ro/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ msgstr ""
msgid "Back"
msgstr "Înapoi"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "Înapoi la pagina de start"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
7 changes: 6 additions & 1 deletion packages/volto/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-01-12T09:21:12.378Z\n"
"POT-Creation-Date: 2024-01-31T14:54:12.513Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"Content-Type: text/plain; charset=utf-8\n"
Expand Down Expand Up @@ -458,6 +458,11 @@ msgstr ""
msgid "Back"
msgstr ""

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr ""

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
5 changes: 5 additions & 0 deletions packages/volto/locales/zh_CN/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ msgstr "可用的内容规则"
msgid "Back"
msgstr "返回"

#. Default: "Back to homepage"
#: components/theme/Logo/Logo
msgid "Back to homepage"
msgstr "返回首页"

#. Default: "Base"
#: components/manage/Diff/Diff
msgid "Base"
Expand Down
13 changes: 11 additions & 2 deletions packages/volto/src/components/theme/Logo/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Logo component.
* @module components/theme/Logo/Logo
*/
import { defineMessages, useIntl } from 'react-intl';
import { useEffect } from 'react';
import { Image } from 'semantic-ui-react';
import { ConditionalLink } from '@plone/volto/components';
Expand All @@ -26,6 +27,14 @@ const Logo = () => {
const site = useSelector((state) => state.site.data);
const navroot = useSelector((state) => state.navroot.data);
const dispatch = useDispatch();
const intl = useIntl();

const messages = defineMessages({
homepage: {
id: 'Back to homepage',
defaultMessage: 'Back to homepage',
},
});

useEffect(() => {
if (pathname && !hasApiExpander('navroot', getBaseUrl(pathname))) {
Expand All @@ -50,8 +59,8 @@ const Logo = () => {
? flattenToAppURL(site['plone.site_logo'])
: LogoImage
}
alt={navroot?.navroot?.title}
title={navroot?.navroot?.title}
alt={intl.formatMessage(messages.homepage)}
title={intl.formatMessage(messages.homepage)}
/>
</ConditionalLink>
);
Expand Down

0 comments on commit 7b34225

Please sign in to comment.