Skip to content

Commit

Permalink
Fix translations
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus-87 committed Feb 10, 2021
1 parent 2c4752a commit fd9360e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/components/WindowTopBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class WindowTopBar extends Component {
const {
removeWindow, windowId, classes, toggleWindowSideBar, t, windowDraggable,
maximizeWindow, maximized, minimizeWindow, focused, allowClose, allowMaximize,
focusWindow, allowFullscreen, allowTopMenuButton, allowWindowSideBar,
focusWindow, allowFullscreen, allowTopMenuButton, allowWindowSideBar, sideBarOpen,
} = this.props;

return (
Expand All @@ -46,7 +46,8 @@ export class WindowTopBar extends Component {
>
{allowWindowSideBar && (
<MiradorMenuButton
aria-label={t('toggleWindowSideBar')}
aria-expanded={sideBarOpen}
aria-label={sideBarOpen ? t('hideWindowSideBar') : t('showWindowSideBar')}
onClick={toggleWindowSideBar}
>
<MenuIcon />
Expand Down Expand Up @@ -100,6 +101,7 @@ WindowTopBar.propTypes = {
maximized: PropTypes.bool,
maximizeWindow: PropTypes.func,
minimizeWindow: PropTypes.func,
sideBarOpen: PropTypes.bool,
removeWindow: PropTypes.func.isRequired,
t: PropTypes.func,
toggleWindowSideBar: PropTypes.func.isRequired,
Expand All @@ -118,6 +120,7 @@ WindowTopBar.defaultProps = {
maximized: false,
maximizeWindow: () => {},
minimizeWindow: () => {},
sideBarOpen: false,
t: key => key,
windowDraggable: true,
};
3 changes: 2 additions & 1 deletion src/containers/WindowTopBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { withTranslation } from 'react-i18next';
import { withStyles } from '@material-ui/core';
import { withPlugins } from '../extend/withPlugins';
import * as actions from '../state/actions';
import { getWindowConfig, isFocused } from '../state/selectors';
import { getWindow, getWindowConfig, isFocused } from '../state/selectors';
import { WindowTopBar } from '../components/WindowTopBar';

/** mapStateToProps */
Expand All @@ -19,6 +19,7 @@ const mapStateToProps = (state, { windowId }) => {
allowWindowSideBar: config.allowWindowSideBar,
focused: isFocused(state, { windowId }),
maximized: config.maximized,
sideBarOpen: (getWindow(state, { windowId }) || {}).sideBarOpen,
};
};

Expand Down
4 changes: 3 additions & 1 deletion src/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"fetchManifest": "Hinzufügen",
"fullScreen": "Vollbild",
"gallery": "Galerie",
"hideWindowSideBar": "Seitenleiste ausblenden",
"hideZoomControls": "Zoomsteuerung verbergen",
"iiif_homepage": "Über diese Ressource",
"iiif_manifest": "IIIF-Manifest",
Expand Down Expand Up @@ -119,6 +120,7 @@
"searchTitle": "Suche",
"selectWorkspaceMenu": "Wählen Sie einen Arbeitsflächentyp",
"showingNumAnnotations": "{{number}} Annotationen werden angezeigt",
"showWindowSideBar": "Seitenleiste einblenden",
"showZoomControls": "Zoomsteuerung anzeigen",
"sidebarPanelsNavigation": "Hilfsfensternavigation",
"single": "Einzeln",
Expand All @@ -129,7 +131,7 @@
"thumbnailList": "Miniaturansicht",
"thumbnailNavigation": "Miniaturansicht",
"thumbnails": "Miniaturansicht",
"toggleWindowSideBar": "Seitenleiste ein-/ausblenden",
"toggleWindowSideBar": "Seitenleiste umschalten",
"tryAgain": "Wiederholen",
"untitled": "[Unbenannt]",
"view": "Ansicht",
Expand Down
4 changes: 3 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"fetchManifest": "Add",
"fullScreen": "Full Screen",
"gallery": "Gallery",
"hideWindowSideBar": "Hide sidebar",
"hideZoomControls": "Hide zoom controls",
"iiif_homepage": "About this resource",
"iiif_manifest": "IIIF manifest",
Expand Down Expand Up @@ -123,6 +124,7 @@
"selectWorkspaceMenu": "Select workspace type",
"showingNumAnnotations": "Showing {{number}} annotations",
"showCollection": "Show collection",
"showWindowSideBar": "Show sidebar",
"showZoomControls": "Show zoom controls",
"sidebarPanelsNavigation": "Sidebar panels navigation",
"single": "Single",
Expand All @@ -133,7 +135,7 @@
"thumbnailList": "Thumbnail list",
"thumbnailNavigation": "Thumbnails",
"thumbnails": "Thumbnails",
"toggleWindowSideBar": "Show / hide sidebar",
"toggleWindowSideBar": "Toggle sidebar",
"totalCollections": "{{count}} collections",
"totalManifests": "{{count}} manifests",
"tryAgain": "Try again",
Expand Down

0 comments on commit fd9360e

Please sign in to comment.