From 2fda17287b82dad0080773528c64b23b88b48632 Mon Sep 17 00:00:00 2001 From: oruburos Date: Wed, 22 Jul 2020 03:03:17 +0100 Subject: [PATCH 01/11] Minimal Viable Navigation Menu Translation with new namespace I18Next configuration leaning on default separator and namespace Broom: i18n + debug:false --- client/components/Nav.jsx | 76 +++--- client/i18n.js | 3 +- client/modules/IDE/components/About.jsx | 20 +- .../IDE/components/KeyboardShortcutModal.jsx | 28 +- .../IDE/components/Preferences/index.jsx | 56 ++-- client/modules/IDE/components/Toast.jsx | 2 +- client/modules/IDE/components/Toolbar.jsx | 9 +- client/modules/IDE/pages/IDEView.jsx | 7 +- translations/locales/en-US/translations.json | 238 ++++++++++------- translations/locales/es-419/translations.json | 245 +++++++++++------- 10 files changed, 391 insertions(+), 293 deletions(-) diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index 4c27d6fa1b..e35a32315d 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -100,11 +100,11 @@ class Nav extends React.PureComponent { const { unsavedChanges, warnIfUnsavedChanges } = this.props; if (!unsavedChanges) { this.props.showToast(1500); - this.props.setToastText('Opened new sketch.'); + this.props.setToastText('Toast.OpenedNewSketch'); this.props.newProject(); } else if (warnIfUnsavedChanges && warnIfUnsavedChanges()) { this.props.showToast(1500); - this.props.setToastText('Opened new sketch.'); + this.props.setToastText('Toast.OpenedNewSketch'); this.props.newProject(); } this.setDropdown('none'); @@ -172,7 +172,7 @@ class Nav extends React.PureComponent { handleLangSelection(event) { i18next.changeLanguage(event.target.value); this.props.showToast(1500); - this.props.setToastText('LangChange'); + this.props.setToastText('Toast.LangChange'); this.setDropdown('none'); } @@ -271,7 +271,7 @@ class Nav extends React.PureComponent { } }} > - {this.props.t('File')} + {this.props.t('Nav.File')}