-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7157 from marmelab/remove-with-translate
Remove withTranslate HOC
- Loading branch information
Showing
18 changed files
with
29 additions
and
140 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
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
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
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 |
---|---|---|
@@ -1,33 +1,14 @@ | ||
import translate from './translate'; | ||
import TranslationProvider, { | ||
TranslationProviderProps, | ||
} from './TranslationProvider'; | ||
import TestTranslationProvider from './TestTranslationProvider'; | ||
import useLocale from './useLocale'; | ||
import useSetLocale from './useSetLocale'; | ||
import useTranslate from './useTranslate'; | ||
|
||
// Alias to translate to avoid shadowed variable names error with tslint | ||
const withTranslate = translate; | ||
|
||
export { | ||
translate, // deprecated | ||
withTranslate, // deprecated | ||
TranslationProvider, | ||
TestTranslationProvider, | ||
useLocale, | ||
useSetLocale, | ||
useTranslate, | ||
}; | ||
|
||
export type { TranslationProviderProps }; | ||
|
||
export const DEFAULT_LOCALE = 'en'; | ||
|
||
export * from './TranslationUtils'; | ||
export * from './TestTranslationProvider'; | ||
export * from './TranslationContext'; | ||
export * from './TranslationMessages'; | ||
export * from './TranslatableContext'; | ||
export * from './TranslatableContextProvider'; | ||
export * from './TranslationProvider'; | ||
export * from './TranslationUtils'; | ||
export * from './useLocale'; | ||
export * from './useSetLocale'; | ||
export * from './useTranslatable'; | ||
export * from './useTranslatableContext'; | ||
export * from './useTranslate'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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