diff --git a/contributor_docs/internationalization.md b/contributor_docs/internationalization.md index db6be435b0..31414e8353 100644 --- a/contributor_docs/internationalization.md +++ b/contributor_docs/internationalization.md @@ -82,6 +82,8 @@ The easiest way to do this is to add your language code (like "de" for German, " This will generate you a fresh translations file in `translations/{LANGUAGE_CODE}/`! Now you can begin populating it with your fresh translations! 🥖 +You'll also need to add an entry for it in `translations/index.js`. You can follow the pattern used in that file for `en` and `es`. + ### Further Reading See the [i18next translation function documentation](https://www.i18next.com/translation-function/essentials). Everything documented above is just a subset of their functionality. diff --git a/src/core/init.js b/src/core/init.js index 2233e8ac63..c3eabb983e 100644 --- a/src/core/init.js +++ b/src/core/init.js @@ -44,6 +44,6 @@ const waitForDocumentReady = () => // only load translations if we're using the full, un-minified library const waitingForTranslator = - typeof IS_MINIFIED === undefined ? initTranslator() : Promise.resolve(); + typeof IS_MINIFIED === 'undefined' ? initTranslator() : Promise.resolve(); Promise.all([waitForDocumentReady(), waitingForTranslator]).then(_globalInit); diff --git a/src/core/internationalization.js b/src/core/internationalization.js index 277cbbcb1a..04d82a44ba 100644 --- a/src/core/internationalization.js +++ b/src/core/internationalization.js @@ -31,6 +31,12 @@ export const initialize = () => nestingPrefix: '$tr(', nestingSuffix: ')', defaultNS: 'translation', + interpolation: { + escapeValue: false + }, + detection: { + checkWhitelist: false + }, resources }) .then( diff --git a/translations/es/translation.json b/translations/es/translation.json index 32180ee266..d91413c8eb 100644 --- a/translations/es/translation.json +++ b/translations/es/translation.json @@ -1,6 +1,6 @@ { "fes": { - "autoplay": "", + "autoplay": "Su browser impidÃo un medio tocar (de '{{src}}'), posiblemente porque las reglas de autoplay. Para aprender más, visite {{link}}.", "fileLoadError": { "bytes": "", "font": "",