aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers/l10nBundle.ts
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2022-11-02 11:08:39 +0100
committersonartech <sonartech@sonarsource.com>2022-11-02 20:03:01 +0000
commit2ab6fc273ecbf405f7c126fab11ddc0b9bf516da (patch)
treea6e005b4f57fb488d3e551b7df52399e69b0674c /server/sonar-web/src/main/js/helpers/l10nBundle.ts
parent60e4b88e4567c1af3051b6cdc4c8858f8b0fca21 (diff)
downloadsonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.tar.gz
sonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.zip
SONAR-13368 Bump to prettier@2.7.1
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/l10nBundle.ts')
-rw-r--r--server/sonar-web/src/main/js/helpers/l10nBundle.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/helpers/l10nBundle.ts b/server/sonar-web/src/main/js/helpers/l10nBundle.ts
index fc1a4414d57..0962637f029 100644
--- a/server/sonar-web/src/main/js/helpers/l10nBundle.ts
+++ b/server/sonar-web/src/main/js/helpers/l10nBundle.ts
@@ -25,7 +25,7 @@ import { toNotSoISOString } from './dates';
const DEFAULT_LOCALE = 'en';
const DEFAULT_MESSAGES = {
// eslint-disable-next-line camelcase
- default_error_message: 'The request cannot be processed. Try again later.'
+ default_error_message: 'The request cannot be processed. Try again later.',
};
export function getMessages() {
@@ -59,11 +59,11 @@ export async function loadL10nBundle() {
}
}
- const { effectiveLocale, messages } = await fetchL10nBundle(params).catch(response => {
+ const { effectiveLocale, messages } = await fetchL10nBundle(params).catch((response) => {
if (response && response.status === 304) {
return {
effectiveLocale: cachedBundle.locale || browserLocale || DEFAULT_LOCALE,
- messages: cachedBundle.messages ?? {}
+ messages: cachedBundle.messages ?? {},
};
}
throw new Error(`Unexpected status code: ${response.status}`);
@@ -72,7 +72,7 @@ export async function loadL10nBundle() {
const bundle = {
timestamp: toNotSoISOString(new Date()),
locale: effectiveLocale,
- messages
+ messages,
};
persistL10nBundleInCache(bundle);
@@ -85,9 +85,9 @@ function getPreferredLanguage() {
}
function getL10nBundleFromCache() {
- return ((window as unknown) as any).sonarQubeL10nBundle ?? {};
+ return (window as unknown as any).sonarQubeL10nBundle ?? {};
}
function persistL10nBundleInCache(bundle: L10nBundle) {
- ((window as unknown) as any).sonarQubeL10nBundle = bundle;
+ (window as unknown as any).sonarQubeL10nBundle = bundle;
}