-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat]: Technical: Translate localization to typescript #1705
Conversation
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>
Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>
@@ -21,7 +21,17 @@ | |||
import React from 'react'; | |||
import {FormattedMessage} from 'react-intl'; | |||
|
|||
const EnhancedFormattedMessage = props => ( | |||
type FormattedMessageType = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For react components... Replace Type with Props?
type FormattedMessageType = { | |
type FormattedMessageProps = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, use EnhancedFormattedMessageProps
to match the component name
src/localization/locales.ts
Outdated
@@ -50,4 +50,7 @@ export const LOCALES = { | |||
* ``` | |||
*/ | |||
|
|||
export const LOCALE_CODES = Object.keys(LOCALES).reduce((acc, key) => ({...acc, [key]: key}), {}); | |||
export const LOCALE_CODES: {[key: string]: string} = Object.keys(LOCALES).reduce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a LocaleCodesType
for this constant
Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>
No description provided.