-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Toaster): add close button label (#288)
- Loading branch information
Showing
6 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"label_close-button": "Close" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {registerKeyset} from '../../utils/registerKeyset'; | ||
import en from './en.json'; | ||
import ru from './ru.json'; | ||
|
||
const COMPONENT = 'Toaster'; | ||
|
||
export default registerKeyset( | ||
{ | ||
en, | ||
ru, | ||
}, | ||
COMPONENT, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"label_close-button": "Закрыть" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {i18n} from '../../i18n'; | ||
import {Lang} from './configure'; | ||
|
||
type KeysData = Parameters<typeof i18n.registerKeyset>[2]; | ||
|
||
export function registerKeyset<T extends KeysData>(data: Record<Lang, T>, keysetName: string) { | ||
Object.entries(data).forEach(([lang, keys]) => i18n.registerKeyset(lang, keysetName, keys)); | ||
|
||
return i18n.keyset(keysetName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters