From c840734122c3256a3b2896b331367801f5cb30a2 Mon Sep 17 00:00:00 2001 From: ov Date: Tue, 25 Aug 2020 08:20:16 +0100 Subject: [PATCH] Spanish translation: Editor- Editor Accessibility- Timer (#1567) * Editor translation for ARIA labels * Timer translation for ARIA labels * Remove unused i18next import * Editor KeyUp translation --- client/modules/IDE/components/Editor.jsx | 14 +++++++------ .../IDE/components/EditorAccessibility.jsx | 8 +++++--- client/modules/IDE/components/Timer.jsx | 20 +++++++++++-------- translations/locales/en-US/translations.json | 17 ++++++++++++++++ translations/locales/es-419/translations.json | 17 ++++++++++++++++ 5 files changed, 59 insertions(+), 17 deletions(-) diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index e07dd001..f8269ed0 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import CodeMirror from 'codemirror'; import beautifyJS from 'js-beautify'; +import { withTranslation } from 'react-i18next'; import 'codemirror/mode/css/css'; import 'codemirror/addon/selection/active-line'; import 'codemirror/addon/lint/lint'; @@ -136,7 +137,7 @@ class Editor extends React.Component { }, 1000)); this._cm.on('keyup', () => { - const temp = `line ${parseInt((this._cm.getCursor().line) + 1, 10)}`; + const temp = this.props.t('Editor.KeyUpLineNumber', { lineNumber: parseInt((this._cm.getCursor().line) + 1, 10) }); document.getElementById('current-line').innerHTML = temp; }); @@ -317,14 +318,14 @@ class Editor extends React.Component {