diff options
Diffstat (limited to 'app/assets/javascripts/locale')
-rw-r--r-- | app/assets/javascripts/locale/ensure_single_line.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/locale/index.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/locale/sprintf.js | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/locale/ensure_single_line.js b/app/assets/javascripts/locale/ensure_single_line.js index 47c52fe6c50..c2c63777001 100644 --- a/app/assets/javascripts/locale/ensure_single_line.js +++ b/app/assets/javascripts/locale/ensure_single_line.js @@ -18,7 +18,7 @@ module.exports = function ensureSingleLine(str) { if (str.includes('\n') || str.includes('\r')) { return str .split(SPLIT_REGEX) - .filter(s => s !== '') + .filter((s) => s !== '') .join(' '); } return str; diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js index 41aa0f4ddb9..35087b920c7 100644 --- a/app/assets/javascripts/locale/index.js +++ b/app/assets/javascripts/locale/index.js @@ -11,7 +11,7 @@ delete window.translations; @param text The text to be translated @returns {String} The translated text */ -const gettext = text => locale.gettext(ensureSingleLine(text)); +const gettext = (text) => locale.gettext(ensureSingleLine(text)); /** Translate the text with a number @@ -56,7 +56,7 @@ const pgettext = (keyOrContext, key) => { @param formatOptions for available options, please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat @returns {Intl.DateTimeFormat} */ -const createDateTimeFormat = formatOptions => Intl.DateTimeFormat(languageCode(), formatOptions); +const createDateTimeFormat = (formatOptions) => Intl.DateTimeFormat(languageCode(), formatOptions); export { languageCode }; export { gettext as __ }; diff --git a/app/assets/javascripts/locale/sprintf.js b/app/assets/javascripts/locale/sprintf.js index b4658a159d7..82fc816fe9e 100644 --- a/app/assets/javascripts/locale/sprintf.js +++ b/app/assets/javascripts/locale/sprintf.js @@ -15,7 +15,7 @@ export default (input, parameters, escapeParameters = true) => { let output = input; if (parameters) { - Object.keys(parameters).forEach(parameterName => { + Object.keys(parameters).forEach((parameterName) => { const parameterValue = parameters[parameterName]; const escapedParameterValue = escapeParameters ? escape(parameterValue) : parameterValue; output = output.replace(new RegExp(`%{${parameterName}}`, 'g'), escapedParameterValue); |