Compare commits

...

2 Commits

Author SHA1 Message Date
schlagmichdoch 46f33f894b increase version to v1.9.3 2023-10-20 20:24:53 +02:00
schlagmichdoch 84986e4eef try the generalized version of a language code before resorting to the default language (es-US -> es) 2023-10-20 19:27:15 +02:00
9 changed files with 23 additions and 11 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ If applicable, add screenshots to help explain your problem.
**Bug occurs on official PairDrop instance https://pairdrop.net/** **Bug occurs on official PairDrop instance https://pairdrop.net/**
No | Yes No | Yes
Version: v1.9.2 Version: v1.9.3
**Bug occurs on self-hosted PairDrop instance** **Bug occurs on self-hosted PairDrop instance**
No | Yes No | Yes
@@ -44,7 +44,7 @@ No | Yes
**Self-Hosted Setup** **Self-Hosted Setup**
Proxy: Nginx | Apache2 Proxy: Nginx | Apache2
Deployment: docker run | docker-compose | npm run start:prod Deployment: docker run | docker-compose | npm run start:prod
Version: v1.9.2 Version: v1.9.3
**Additional context** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "pairdrop", "name": "pairdrop",
"version": "1.9.2", "version": "1.9.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pairdrop", "name": "pairdrop",
"version": "1.9.2", "version": "1.9.3",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"express": "^4.18.2", "express": "^4.18.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "pairdrop", "name": "pairdrop",
"version": "1.9.2", "version": "1.9.3",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
+1 -1
View File
@@ -480,7 +480,7 @@
</svg> </svg>
<div class="title-wrapper" dir="ltr"> <div class="title-wrapper" dir="ltr">
<h1>PairDrop</h1> <h1>PairDrop</h1>
<div class="font-subheading">v1.9.2</div> <div class="font-subheading">v1.9.3</div>
</div> </div>
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div> <div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div>
<div class="row"> <div class="row">
+7 -1
View File
@@ -31,7 +31,13 @@ class Localization {
} }
static getSupportedOrDefault(locales) { static getSupportedOrDefault(locales) {
return locales.find(Localization.isSupported) || Localization.defaultLocale; let localesGeneric = locales
.map(locale => locale.split("-")[0])
.filter(locale => locales.indexOf(locale) === -1);
return locales.find(Localization.isSupported)
|| localesGeneric.find(Localization.isSupported)
|| Localization.defaultLocale;
} }
static async setTranslation(locale) { static async setTranslation(locale) {
+1 -1
View File
@@ -1,4 +1,4 @@
const cacheVersion = 'v1.9.2'; const cacheVersion = 'v1.9.3';
const cacheTitle = `pairdrop-cache-${cacheVersion}`; const cacheTitle = `pairdrop-cache-${cacheVersion}`;
const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions
const urlsToCache = [ const urlsToCache = [
+1 -1
View File
@@ -485,7 +485,7 @@
</svg> </svg>
<div class="title-wrapper" dir="ltr"> <div class="title-wrapper" dir="ltr">
<h1>PairDrop</h1> <h1>PairDrop</h1>
<div class="font-subheading">v1.9.2</div> <div class="font-subheading">v1.9.3</div>
</div> </div>
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div> <div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div>
<div class="row"> <div class="row">
@@ -31,7 +31,13 @@ class Localization {
} }
static getSupportedOrDefault(locales) { static getSupportedOrDefault(locales) {
return locales.find(Localization.isSupported) || Localization.defaultLocale; let localesGeneric = locales
.map(locale => locale.split("-")[0])
.filter(locale => locales.indexOf(locale) === -1);
return locales.find(Localization.isSupported)
|| localesGeneric.find(Localization.isSupported)
|| Localization.defaultLocale;
} }
static async setTranslation(locale) { static async setTranslation(locale) {
@@ -1,4 +1,4 @@
const cacheVersion = 'v1.9.2'; const cacheVersion = 'v1.9.3';
const cacheTitle = `pairdrop-included-ws-fallback-cache-${cacheVersion}`; const cacheTitle = `pairdrop-included-ws-fallback-cache-${cacheVersion}`;
const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions
const urlsToCache = [ const urlsToCache = [