From 929f34765a521eda6646d71db0183bbd33964783 Mon Sep 17 00:00:00 2001 From: Adamint Date: Sat, 14 Apr 2018 10:45:33 +0100 Subject: [PATCH] Correct spelling for action ADD_TRANSLATION_FOR_LANGUAGE - Fixes issue #65 - Some othe private string spellings fixed - Interface change @@localize/ADD_TRANSLATION_FOR_LANGUCorrect spelling for action ADD_TRANSLATION_FOR_LANGUAGE --- docs/features.md | 4 ++-- docs/getting-started.md | 2 +- src/index.d.ts | 2 +- src/locale.js | 36 ++++++++++++++++++------------------ tests/locale.test.js | 12 ++++++------ 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/features.md b/docs/features.md index 2fb3303..07df3f1 100644 --- a/docs/features.md +++ b/docs/features.md @@ -196,12 +196,12 @@ import { initialize } from 'react-localize-redux'; const languages = ['en', 'fr', 'es']; // just like the default message you can include the ${key} and ${code} placeholders -const missingTranslationMsg = 'Oh man you missed translation: ${key} for languge ${code}!'; +const missingTranslationMsg = 'Oh man you missed translation: ${key} for language ${code}!'; store.dispatch(initialize(languages, { missingTranslationMsg })); // Assuming there is no translation for "missing-key" doesn't exist it would render following: -//

Oh man you missed translation: missing-key for languge en!

+//

Oh man you missed translation: missing-key for language en!

const MyComponent = props =>

No translations here!

; // You also have the option to override the global missingTranslationMsg option diff --git a/docs/getting-started.md b/docs/getting-started.md index 039e94e..e93e597 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -175,7 +175,7 @@ const LanguageSelector = props => (

{ translate('heading') } - ({ activeLanguage.code })