Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export const Controls = ({
className={b('saved-only-button', {savedOnly})}
size="xl"
onClick={handleSavedOnly}
selected={savedOnly}
>
<Icon data={Save} size={ICON_SIZE} className={b('icon', {savedOnly})} />
{i18n(Keyset.ActionSavedOnly)}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ export const Search = ({
handleChange.cancel();
setValue('');
onSubmit('');
inputRef.current?.focus();
}
};

return (
<button
className={b('input-icon')}
onClick={handleClick}
aria-label={i18n(Keyset.SearchAction)}
aria-label={value ? i18n(Keyset.ClearAction) : undefined}
aria-hidden={!value}
>
<Icon size={iconSize} data={iconData} />
</button>
Expand Down
6 changes: 3 additions & 3 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export enum Keyset {
PromptSignInOnLike = 'prompt_sign_in_on_like',
SignIn = 'Sign In',
Save = 'save',
SearchAction = 'search_action',
ClearAction = 'clear_action',
}

const en = {
Expand Down Expand Up @@ -51,7 +51,7 @@ const en = {
],
[Keyset.SignIn]: 'Sign In',
[Keyset.Save]: 'Save',
[Keyset.SearchAction]: 'Find',
[Keyset.ClearAction]: 'Clear',
};

const ru = {
Expand Down Expand Up @@ -80,7 +80,7 @@ const ru = {
],
[Keyset.SignIn]: 'Войти',
[Keyset.Save]: 'Сохранить',
[Keyset.SearchAction]: 'Найти',
[Keyset.ClearAction]: 'Очистить',
};

export const i18n = addComponentKeysets({en, ru}, NAMESPACE);