retranslate
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -5,3 +5,3 @@ { | ||
"main": "build/retranslate.js", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"license": "MIT", | ||
@@ -12,2 +12,9 @@ "bugs": { | ||
}, | ||
"keywords": [ | ||
"react", | ||
"i18n", | ||
"localization", | ||
"translate", | ||
"translation" | ||
], | ||
"repository": { | ||
@@ -14,0 +21,0 @@ "type": "git", |
@@ -27,3 +27,3 @@ retranslate | ||
'main.subtitle': 'Real simple translations for react.', | ||
'current.language': 'Your current language is {{ language }}', | ||
'current.language': 'Your current language is {{ currentLanguage }}', | ||
}, | ||
@@ -39,7 +39,7 @@ et: { | ||
const LanguageShower = withTranslations(({ translations: { translate, language } }) => ( | ||
<p>{translate('current.language', { language })}</p> | ||
<p>{translate('current.language', { currentLanguage: language })}</p> | ||
)); | ||
const App = () => ( | ||
<TranslationProvider translations={translations} language={getLanguage()} fallbackLanguage="en"> | ||
<TranslationProvider messages={translations} language={getLanguage()} fallbackLanguage="en"> | ||
<h1><Message params={{ versionNumber: version }}>main.heading</Message></h1> | ||
@@ -55,3 +55,3 @@ <SomeComponent /> // this can also use the Message component, since there is a Provider up the tree. | ||
retranslate is configured using the `Provider`. You pass `Provider` `translations`, a `language` and a `fallbackLanguage` (just in case). Wrap your application with `Provider` to make retranslate work. | ||
retranslate is configured using the `Provider`. You pass `Provider` `messages`, a `language` and a `fallbackLanguage` (just in case). Wrap your application with `Provider` to make retranslate work. | ||
@@ -58,0 +58,0 @@ ### Message |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
306644