diff --git a/src/renderer/basics/Button.tsx b/src/renderer/basics/Button.tsx index 7f0eadcdd..86ffc81ce 100644 --- a/src/renderer/basics/Button.tsx +++ b/src/renderer/basics/Button.tsx @@ -117,6 +117,8 @@ class Button extends React.PureComponent { return ( { interface Props { src?: string; + alt?: string; className?: string; onLoadStart: () => void; onLoadEnd: () => void; diff --git a/src/renderer/basics/Cover/index.tsx b/src/renderer/basics/Cover/index.tsx index ff0a517f9..d284e6fd3 100644 --- a/src/renderer/basics/Cover/index.tsx +++ b/src/renderer/basics/Cover/index.tsx @@ -1,5 +1,6 @@ import classNames from "classnames"; import React from "react"; +import { _ } from "renderer/t"; import GifMarker from "renderer/basics/Cover/GifMarker"; import LoadingCircle from "renderer/basics/LoadingCircle"; import withHover, { HoverProps } from "renderer/hocs/withHover"; @@ -58,6 +59,7 @@ class Cover extends React.PureComponent { {url ? ( { diff --git a/src/renderer/basics/IconButton.tsx b/src/renderer/basics/IconButton.tsx index e49d3a9dc..893982cba 100644 --- a/src/renderer/basics/IconButton.tsx +++ b/src/renderer/basics/IconButton.tsx @@ -70,6 +70,7 @@ class IconButton extends React.PureComponent { return ( { })} data-rh={hint ? JSON.stringify(hint) : null} data-rh-at={hintPosition} + aria-label={hint ? JSON.stringify(hint) : null} + aria-disabled={disabled} + role="button" {...restProps} > {typeof icon === "string" ? : icon} diff --git a/src/renderer/basics/Link.tsx b/src/renderer/basics/Link.tsx index 9086d9783..d2cfc96dc 100644 --- a/src/renderer/basics/Link.tsx +++ b/src/renderer/basics/Link.tsx @@ -15,7 +15,7 @@ class Link extends React.PureComponent { const { label, children, ...restProps } = this.props; return ( - + {label} {children} diff --git a/src/renderer/basics/LoadingCircle/index.tsx b/src/renderer/basics/LoadingCircle/index.tsx index 3484c84a0..c79d59e2f 100644 --- a/src/renderer/basics/LoadingCircle/index.tsx +++ b/src/renderer/basics/LoadingCircle/index.tsx @@ -47,11 +47,19 @@ const CircleContainer = styled.span` class LoadingCircle extends React.PureComponent { render() { const { className, progress, bare, wide, huge } = this.props; + const percent = progress * 100.0; return ( - + 0 ? progress * 100.0 : 100 / 3} + percent={progress > 0 ? percent : 100 / 3} trailWidth={3} trailColor="#e0e0e2" strokeWidth={15} diff --git a/src/renderer/basics/NavigationBar.tsx b/src/renderer/basics/NavigationBar.tsx index fdbf06083..88da17c97 100644 --- a/src/renderer/basics/NavigationBar.tsx +++ b/src/renderer/basics/NavigationBar.tsx @@ -13,6 +13,7 @@ import IconButton from "renderer/basics/IconButton"; import { hook, hookWithProps } from "renderer/hocs/hook"; import * as styles from "renderer/styles"; import styled, { css } from "renderer/styles"; +import { _ } from "renderer/t"; import watching, { Watcher } from "renderer/hocs/watching"; import { withTab } from "renderer/hocs/withTab"; import { @@ -183,12 +184,14 @@ class NavigationBar extends React.PureComponent { { return ( <> {loading ? ( - + ) : ( - + )} {editingAddress ? ( diff --git a/src/renderer/basics/TitleBar/index.tsx b/src/renderer/basics/TitleBar/index.tsx index ce1e9ef22..ce7cd2a45 100644 --- a/src/renderer/basics/TitleBar/index.tsx +++ b/src/renderer/basics/TitleBar/index.tsx @@ -11,7 +11,7 @@ import UserMenu from "renderer/basics/TitleBar/UserMenu"; import { hookWithProps } from "renderer/hocs/hook"; import { modals } from "common/modals"; import styled, * as styles from "renderer/styles"; -import { T } from "renderer/t"; +import { _, T } from "renderer/t"; import { isSecretClick } from "common/helpers/secret-click"; const DraggableDiv = styled.div` @@ -128,14 +128,24 @@ class TitleBar extends React.PureComponent { <> {secondary ? null : ( <> - + )} - + ); } diff --git a/src/renderer/pages/BrowserPage/BrowserBar.tsx b/src/renderer/pages/BrowserPage/BrowserBar.tsx index b6392b973..e4ffde221 100644 --- a/src/renderer/pages/BrowserPage/BrowserBar.tsx +++ b/src/renderer/pages/BrowserPage/BrowserBar.tsx @@ -6,13 +6,18 @@ import FiltersContainer from "renderer/basics/FiltersContainer"; import IconButton from "renderer/basics/IconButton"; import { hookWithProps } from "renderer/hocs/hook"; import { withTab } from "renderer/hocs/withTab"; +import { _ } from "renderer/t"; class BrowserBar extends React.PureComponent { render() { const { loading } = this.props; return ( - + ); } diff --git a/src/renderer/pages/BrowserPage/BrowserContext/BrowserContextGame.tsx b/src/renderer/pages/BrowserPage/BrowserContext/BrowserContextGame.tsx index dec064cf6..81dffb76d 100644 --- a/src/renderer/pages/BrowserPage/BrowserContext/BrowserContextGame.tsx +++ b/src/renderer/pages/BrowserPage/BrowserContext/BrowserContextGame.tsx @@ -15,6 +15,7 @@ import StandardGameCover, { standardCoverWidth, } from "renderer/pages/common/StandardGameCover"; import styled from "renderer/styles"; +import { _ } from "renderer/t"; const Spacer = styled.div` flex-basis: 16px; @@ -48,7 +49,11 @@ class BrowserContextGame extends React.PureComponent { const { game, status } = this.props; return ( - + @@ -60,6 +65,7 @@ class BrowserContextGame extends React.PureComponent { huge emphasized icon="cog" + hint={_("icon.manage")} onClick={this.onManage} /> diff --git a/src/renderer/scenes/GateScene/RememberedProfiles/RememberedProfile.tsx b/src/renderer/scenes/GateScene/RememberedProfiles/RememberedProfile.tsx index 99746d49b..c05321c90 100644 --- a/src/renderer/scenes/GateScene/RememberedProfiles/RememberedProfile.tsx +++ b/src/renderer/scenes/GateScene/RememberedProfiles/RememberedProfile.tsx @@ -6,7 +6,7 @@ import TimeAgo from "renderer/basics/TimeAgo"; import { hook } from "renderer/hocs/hook"; import { modals } from "common/modals"; import styled, * as styles from "renderer/styles"; -import { T } from "renderer/t"; +import { _, T, _ } from "renderer/t"; import { Dispatch } from "common/types"; import { getUserCoverURL } from "common/constants/get-user-cover-url"; @@ -24,7 +24,9 @@ class RememberedProfile extends React.PureComponent { >
-

{displayName || username}

+

+ {displayName || username} +

{T(["login.remembered_session.last_connected"])}{" "} @@ -38,6 +40,7 @@ class RememberedProfile extends React.PureComponent { diff --git a/src/renderer/scenes/HubScene/Meats/Meat.tsx b/src/renderer/scenes/HubScene/Meats/Meat.tsx index 1122e219c..74fc3225e 100644 --- a/src/renderer/scenes/HubScene/Meats/Meat.tsx +++ b/src/renderer/scenes/HubScene/Meats/Meat.tsx @@ -171,14 +171,18 @@ class Meat extends React.PureComponent { if (ConcreteMeat) { return ( <> - +

+ +
); } else { return ( -
Invalid url: {JSON.stringify(this.props.url)}
+
+
Invalid url: {JSON.stringify(this.props.url)}
+
); } diff --git a/src/renderer/scenes/HubScene/Sidebar/Logo.tsx b/src/renderer/scenes/HubScene/Sidebar/Logo.tsx index 534d6d820..ffb8ed5a5 100644 --- a/src/renderer/scenes/HubScene/Sidebar/Logo.tsx +++ b/src/renderer/scenes/HubScene/Sidebar/Logo.tsx @@ -27,6 +27,8 @@ class Logo extends React.PureComponent { return ( { const { game } = this.props; return ( @@ -165,7 +168,7 @@ class PrimeDownloadContents extends React.PureComponent { <> {caveId ? ( - + ) : ( )} diff --git a/src/renderer/scenes/HubScene/Sidebar/Sidebar.tsx b/src/renderer/scenes/HubScene/Sidebar/Sidebar.tsx index 456d727d9..f1d6ba49a 100644 --- a/src/renderer/scenes/HubScene/Sidebar/Sidebar.tsx +++ b/src/renderer/scenes/HubScene/Sidebar/Sidebar.tsx @@ -131,7 +131,7 @@ class Sidebar extends React.PureComponent { const { enableTabs } = this.props; return ( - + diff --git a/src/static/locales/en.json b/src/static/locales/en.json index 4bb42b331..81961d550 100644 --- a/src/static/locales/en.json +++ b/src/static/locales/en.json @@ -701,5 +701,22 @@ "plan_install.disk_space_required": "Disk space required", "plan_install.disk_space_available": "Disk space available", - "empty_state.nothing_to_see_here": "Nothing to see here" + "empty_state.nothing_to_see_here": "Nothing to see here", + + "icon.back": "Back", + "icon.next": "Next", + "icon.reload": "Reload", + "icon.minimize": "Minimize", + "icon.maximize": "Maximize", + "icon.restore": "Restore", + "icon.close": "Close", + "icon.play": "Play", + "icon.forget_profile": "Forget profile", + "icon.manage": "Manage", + "icon.more": "More...", + + "alt.cover_image": "Cover image", + + "region.prime_download": "Prime download", + "region.game": "Game" }