-
{variables.getMessage('modals.welcome.tip')}
-
{variables.getMessage('modals.welcome.sections.theme.tip')}
+
{t('modals.welcome.tip')}
+
{t('modals.welcome.sections.theme.tip')}
);
}
diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json
index f67fa7a0..35702f27 100644
--- a/src/i18n/locales/ar.json
+++ b/src/i18n/locales/ar.json
@@ -864,4 +864,4 @@
"link_copied": "تم نسخ الرابط",
"stats_reset": "تم إعادة تعيين الإحصائيات"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/arz.json b/src/i18n/locales/arz.json
index 996fc71c..e7d12a43 100644
--- a/src/i18n/locales/arz.json
+++ b/src/i18n/locales/arz.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/az.json b/src/i18n/locales/az.json
index bf20540f..b5d2b702 100644
--- a/src/i18n/locales/az.json
+++ b/src/i18n/locales/az.json
@@ -864,4 +864,4 @@
"link_copied": "Keçid kopyalandı",
"stats_reset": "Statistikalar sıfırlandı"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/azb.json b/src/i18n/locales/azb.json
index 9954a41c..3e01e431 100644
--- a/src/i18n/locales/azb.json
+++ b/src/i18n/locales/azb.json
@@ -864,4 +864,4 @@
"link_copied": "Link kopyalandı",
"stats_reset": "Statistikalar sıfırlandı"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/bn.json b/src/i18n/locales/bn.json
index 3c09a6e4..974729ca 100644
--- a/src/i18n/locales/bn.json
+++ b/src/i18n/locales/bn.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/de_DE.json b/src/i18n/locales/de_DE.json
index 813e79d1..b07a54c9 100644
--- a/src/i18n/locales/de_DE.json
+++ b/src/i18n/locales/de_DE.json
@@ -864,4 +864,4 @@
"link_copied": "Link kopiert",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/el.json b/src/i18n/locales/el.json
index d8244526..da2d9164 100644
--- a/src/i18n/locales/el.json
+++ b/src/i18n/locales/el.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/en_GB.json b/src/i18n/locales/en_GB.json
index e6401638..7c335d51 100644
--- a/src/i18n/locales/en_GB.json
+++ b/src/i18n/locales/en_GB.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/en_US.json b/src/i18n/locales/en_US.json
index 0b7c12bc..6b206f6b 100644
--- a/src/i18n/locales/en_US.json
+++ b/src/i18n/locales/en_US.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json
index a963a637..1f0cf532 100644
--- a/src/i18n/locales/es.json
+++ b/src/i18n/locales/es.json
@@ -864,4 +864,4 @@
"link_copied": "Enlace copiado",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/es_419.json b/src/i18n/locales/es_419.json
index e1044829..077de949 100644
--- a/src/i18n/locales/es_419.json
+++ b/src/i18n/locales/es_419.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/et.json b/src/i18n/locales/et.json
index 8e079c12..c14e27e4 100644
--- a/src/i18n/locales/et.json
+++ b/src/i18n/locales/et.json
@@ -864,4 +864,4 @@
"link_copied": "Link kopeeritud",
"stats_reset": "Statistika lähtestatud"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/fa.json b/src/i18n/locales/fa.json
index e2359e6f..1ee0715c 100644
--- a/src/i18n/locales/fa.json
+++ b/src/i18n/locales/fa.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "ریست امار"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json
index 980ab387..ec93a8c8 100644
--- a/src/i18n/locales/fr.json
+++ b/src/i18n/locales/fr.json
@@ -864,4 +864,4 @@
"link_copied": "Lien copié",
"stats_reset": "Statistiques réinitialisées"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/hu.json b/src/i18n/locales/hu.json
index 2943b340..7cc448a0 100644
--- a/src/i18n/locales/hu.json
+++ b/src/i18n/locales/hu.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/id_ID.json b/src/i18n/locales/id_ID.json
index 2ee2a6b0..96948d5e 100644
--- a/src/i18n/locales/id_ID.json
+++ b/src/i18n/locales/id_ID.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json
index 043b9eef..45ee2314 100644
--- a/src/i18n/locales/ja.json
+++ b/src/i18n/locales/ja.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/lt.json b/src/i18n/locales/lt.json
index b4bf20e0..016d218d 100644
--- a/src/i18n/locales/lt.json
+++ b/src/i18n/locales/lt.json
@@ -864,4 +864,4 @@
"link_copied": "Nuoroda nukopijuota",
"stats_reset": "Statistika atstatyta"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/lv.json b/src/i18n/locales/lv.json
index 5ac412ac..82c9ee12 100644
--- a/src/i18n/locales/lv.json
+++ b/src/i18n/locales/lv.json
@@ -864,4 +864,4 @@
"link_copied": "Saite nokopēta",
"stats_reset": "Statistika atiestatīta"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/nl.json b/src/i18n/locales/nl.json
index 4302d1f9..ae88c501 100644
--- a/src/i18n/locales/nl.json
+++ b/src/i18n/locales/nl.json
@@ -864,4 +864,4 @@
"link_copied": "Link gekopieerd",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/no.json b/src/i18n/locales/no.json
index 9d4954a2..c812f3d7 100644
--- a/src/i18n/locales/no.json
+++ b/src/i18n/locales/no.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/peo.json b/src/i18n/locales/peo.json
index 8aeab6f5..0744f8f2 100644
--- a/src/i18n/locales/peo.json
+++ b/src/i18n/locales/peo.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/pt.json b/src/i18n/locales/pt.json
index 9d02dcc9..f375261f 100644
--- a/src/i18n/locales/pt.json
+++ b/src/i18n/locales/pt.json
@@ -864,4 +864,4 @@
"link_copied": "Ligação copiada",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/pt_BR.json b/src/i18n/locales/pt_BR.json
index fc9002f0..41e0d158 100644
--- a/src/i18n/locales/pt_BR.json
+++ b/src/i18n/locales/pt_BR.json
@@ -864,4 +864,4 @@
"link_copied": "Link copiado",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json
index 2d1460c1..dfc3ca7e 100644
--- a/src/i18n/locales/ru.json
+++ b/src/i18n/locales/ru.json
@@ -864,4 +864,4 @@
"link_copied": "Ссылка скопирована",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/sl.json b/src/i18n/locales/sl.json
index 12910ea0..85a281ae 100644
--- a/src/i18n/locales/sl.json
+++ b/src/i18n/locales/sl.json
@@ -864,4 +864,4 @@
"link_copied": "Povezava kopirana",
"stats_reset": "Statistika ponastavljena"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/sv.json b/src/i18n/locales/sv.json
index f6e200bd..6fa8fbdd 100644
--- a/src/i18n/locales/sv.json
+++ b/src/i18n/locales/sv.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/ta.json b/src/i18n/locales/ta.json
index 1bf15715..913281f8 100644
--- a/src/i18n/locales/ta.json
+++ b/src/i18n/locales/ta.json
@@ -864,4 +864,4 @@
"link_copied": "இணைப்பு நகலெடுக்கப்பட்டது",
"stats_reset": "புள்ளிவிவரங்கள் மீட்டமைக்கப்படுகின்றன"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/tr_TR.json b/src/i18n/locales/tr_TR.json
index 9d55958b..ce7dda60 100644
--- a/src/i18n/locales/tr_TR.json
+++ b/src/i18n/locales/tr_TR.json
@@ -864,4 +864,4 @@
"link_copied": "Bağlantı kopyalandı",
"stats_reset": "İstatistikler sıfırlandı"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json
index eda02a12..8cd0110d 100644
--- a/src/i18n/locales/uk.json
+++ b/src/i18n/locales/uk.json
@@ -864,4 +864,4 @@
"link_copied": "Посилання скопійовано",
"stats_reset": "Статистику скинуто"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/vi.json b/src/i18n/locales/vi.json
index dc6f35b5..3aaf8f66 100644
--- a/src/i18n/locales/vi.json
+++ b/src/i18n/locales/vi.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/zh_CN.json b/src/i18n/locales/zh_CN.json
index 96e68f6c..8a73f917 100644
--- a/src/i18n/locales/zh_CN.json
+++ b/src/i18n/locales/zh_CN.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/i18n/locales/zh_Hant.json b/src/i18n/locales/zh_Hant.json
index 5c2fb464..6555e486 100644
--- a/src/i18n/locales/zh_Hant.json
+++ b/src/i18n/locales/zh_Hant.json
@@ -864,4 +864,4 @@
"link_copied": "Link copied",
"stats_reset": "Stats reset"
}
-}
\ No newline at end of file
+}
diff --git a/src/index.jsx b/src/index.jsx
index 94a1339c..8d7a4c7f 100644
--- a/src/index.jsx
+++ b/src/index.jsx
@@ -1,10 +1,10 @@
import { createRoot } from 'react-dom/client';
+import variables from 'config/variables';
import * as Sentry from '@sentry/react';
import App from './App';
import ErrorBoundary from './ErrorBoundary';
-import variables from './config/variables';
import { migrateAPIUsersToPhotoPacks } from './utils/migrations';
import './scss/index.scss';
@@ -17,8 +17,7 @@ variables.language = initTranslations(languagecode);
variables.languagecode = languagecode;
document.documentElement.lang = languagecode.replace('_', '-');
-variables.getMessage = (text, optional) =>
- variables.language.getMessage(variables.languagecode, text, optional || {});
+window.t = (text, optional) => variables.language.getMessage(variables.languagecode, text, optional || {});
migrateAPIUsersToPhotoPacks();
diff --git a/src/utils/deepLinking.js b/src/utils/deepLinking.js
index cfc85962..7b16c649 100644
--- a/src/utils/deepLinking.js
+++ b/src/utils/deepLinking.js
@@ -42,8 +42,7 @@ export const parseDeepLink = (hash = window.location.hash) => {
if (result.tab === 'settings') {
if (result.subSection && !result.itemId) {
result.itemId = null;
- }
- else if (!result.subSection) {
+ } else if (!result.subSection) {
result.subSection = null;
}
}
@@ -56,15 +55,13 @@ export const parseDeepLink = (hash = window.location.hash) => {
} else {
result.itemId = null;
}
- }
- else if (['preset_settings', 'photo_packs', 'quote_packs', 'all'].includes(result.section)) {
+ } else if (['preset_settings', 'photo_packs', 'quote_packs', 'all'].includes(result.section)) {
result.category = result.section;
if (result.subSection) {
result.itemId = result.subSection;
result.subSection = null;
}
- }
- else if (result.section && !result.subSection) {
+ } else if (result.section && !result.subSection) {
result.itemId = result.section;
result.section = null;
}
@@ -91,17 +88,13 @@ export const createDeepLink = (tab, options = {}) => {
if (tab === 'discover') {
if (options.collection && options.itemId && options.fromCollection) {
hash += `/collection/${options.collection}/${options.itemId}`;
- }
- else if (options.collection) {
+ } else if (options.collection) {
hash += `/collection/${options.collection}`;
- }
- else if (options.itemId && options.category) {
+ } else if (options.itemId && options.category) {
hash += `/${options.category}/${options.itemId}`;
- }
- else if (options.itemId) {
+ } else if (options.itemId) {
hash += `/${options.itemId}`;
- }
- else if (options.category) {
+ } else if (options.category) {
hash += `/${options.category}`;
}
} else if (options.section) {
diff --git a/src/utils/settings/load.js b/src/utils/settings/load.js
index b40ee2d1..eaf11f69 100644
--- a/src/utils/settings/load.js
+++ b/src/utils/settings/load.js
@@ -32,8 +32,7 @@ export function loadSettings(hotreload) {
custom.forEach((element) => {
try {
document.head.removeChild(document.getElementById(element));
- } catch (e) {
- }
+ } catch (e) {}
});
}
@@ -52,16 +51,14 @@ export function loadSettings(hotreload) {
elements.forEach((element) => {
try {
document.querySelector('.' + element).classList.add('textBorder');
- } catch (e) {
- }
+ } catch (e) {}
});
} else {
const elements = ['greeting', 'clock', 'quote', 'quoteauthor', 'date'];
elements.forEach((element) => {
try {
document.querySelector('.' + element).classList.remove('textBorder');
- } catch (e) {
- }
+ } catch (e) {}
});
}
diff --git a/src/utils/wikidata/wikidataAuthorFetcher.js b/src/utils/wikidata/wikidataAuthorFetcher.js
index 130066c8..3992aefe 100644
--- a/src/utils/wikidata/wikidataAuthorFetcher.js
+++ b/src/utils/wikidata/wikidataAuthorFetcher.js
@@ -126,12 +126,12 @@ async function extractOccupations(claims, language) {
}
try {
- const occupations = claims.P106
- .filter((claim) => claim.mainsnak?.datavalue?.value?.id)
- .map((claim) => ({
+ const occupations = claims.P106.filter((claim) => claim.mainsnak?.datavalue?.value?.id).map(
+ (claim) => ({
id: claim.mainsnak.datavalue.value.id,
rank: claim.rank || 'normal', // 'preferred', 'normal', 'deprecated'
- }));
+ }),
+ );
if (occupations.length === 0) {
return null;