merge devel with arabic support

This commit is contained in:
or-else
2025-05-28 17:31:59 +03:00
12 changed files with 1774 additions and 7 deletions
+1
View File
@@ -41,6 +41,7 @@ The app is fully internationalized using [React-Intl](https://github.com/formatj
The app is currently available in the following languages:
* English - default
* Arabic
* Chinese simplified
* Chinese traditional
* French
+1
View File
@@ -46,6 +46,7 @@
"web"
],
"locales": [
"ar",
"de",
"en",
"es",
+9 -4
View File
@@ -53,10 +53,14 @@ const i18n = {
'zh-TW': {
'new_message': "新訊息",
'new_chat': "新聊天",
},
'ar': {
'new_message': "رسالة جديدة",
'new_chat': "محادثة جديدة",
}
};
self.i18nMessage = function(id) {
self.i18nMessage = function (id) {
if (!id) {
return null;
}
@@ -82,7 +86,7 @@ fbMessaging.onBackgroundMessage(payload => {
return;
}
const titles = {'msg': 'new_message', 'sub': 'new_chat'};
const titles = { 'msg': 'new_message', 'sub': 'new_chat' };
const pushType = payload.data.what || 'msg';
const title = payload.data.title || self.i18nMessage(titles[pushType]);
if (title) {
@@ -119,7 +123,8 @@ self.addEventListener('notificationclick', event => {
event.waitUntil(self.clients.matchAll({
type: 'window',
includeUncontrolled: true})
includeUncontrolled: true
})
.then(windowClients => {
let anyClient = null;
for (let i = 0; i < windowClients.length; i++) {
@@ -162,7 +167,7 @@ self.addEventListener('fetch', event => {
const reqUrl = new URL(event.request.url);
// Using ignoreSearch=true to read cached images and docs despite different auth signatures.
const cachedResponse = await cache.match(event.request, {ignoreSearch: (self.location.origin == reqUrl.origin)});
const cachedResponse = await cache.match(event.request, { ignoreSearch: (self.location.origin == reqUrl.origin) });
if (cachedResponse) {
return cachedResponse;
}
File diff suppressed because one or more lines are too long
+1742
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -24,6 +24,7 @@ if (typeof FIREBASE_INIT != 'undefined' && FIREBASE_INIT && FIREBASE_INIT.measur
// Allow loading translation strings for just one language.
const messageLoader = {
'ar': _ => import('./i18n.min/ar.json'),
'de': _ => import('./i18n.min/de.json'),
'en': _ => import('./i18n.min/en.json'),
'es': _ => import('./i18n.min/es.json'),
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -22406,6 +22406,7 @@ if (typeof FIREBASE_INIT != 'undefined' && FIREBASE_INIT && FIREBASE_INIT.measur
gtag('config', FIREBASE_INIT.measurementId);
}
const messageLoader = {
'ar': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_ar_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/ar.json */ "./src/i18n.min/ar.json", 19)),
'de': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_de_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/de.json */ "./src/i18n.min/de.json", 19)),
'en': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_en_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/en.json */ "./src/i18n.min/en.json", 19)),
'es': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_es_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/es.json */ "./src/i18n.min/es.json", 19)),
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long