Compare commits

...

4 Commits

Author SHA1 Message Date
seriousm4x 36d3afd62f fix: date-fns not loading locales correctly 2023-10-03 21:34:39 +02:00
seriousm4x 7e1491d69b Update README.md 2023-10-03 20:50:19 +02:00
seriousm4x 47ed85ffe6 add translating info to readme 2023-10-03 20:32:35 +02:00
seriousm4x 4b63d771f5 draft new releases first 2023-10-03 20:09:13 +02:00
6 changed files with 28 additions and 7 deletions
+16
View File
@@ -36,6 +36,12 @@
| ![](/assets/settings-dark.webp) | ![](/assets/settings-light.webp) |
| ![](/assets/users-dark.webp) | ![](/assets/users-light.webp) |
## 🐧 Install from the [AUR](https://aur.archlinux.org/packages/upsnap-bin)
```bash
yay -Sy upsnap-bin
```
## 🚀 Run the binary
Just download the latest binary from the [release page](https://github.com/seriousm4x/UpSnap/releases) and run it.
@@ -111,6 +117,16 @@ Although UpSnap has user authorisation, it is **not recommended to expose it to
**Recommended**: If you need access from outside your network, please use a vpn. Wireguard or OpenVPN is your way to go.
## 🌐 Help translating
UpSnap is available in the following languages so far:
- 🇺🇸 **English** (en-US)
- 🇩🇪 **German** (de-DE)
- 🇵🇹 **Portuguese** (pt-PT)
**If you want to contribute and help translating, check the wiki: [How to add languages](https://github.com/seriousm4x/UpSnap/wiki/How-to-add-languages)**
## 🔧 Help developing
Fork this branch and clone it.
+1 -1
View File
@@ -1,5 +1,5 @@
release:
#draft: true
draft: true
prerelease: auto
before:
hooks:
-1
View File
@@ -1,6 +1,5 @@
{
"adapter": "svelte",
"$schema": "https://unpkg.com/typesafe-i18n@5.26.2/schema/typesafe-i18n.json",
"baseLocale": "en-US",
"outputPath": "./src/lib/i18n/"
}
@@ -63,15 +63,21 @@
$: if ($locale !== undefined) {
(async () => {
switch ($locale) {
case 'de' || 'de-DE':
case 'de':
case 'de-DE':
dateFnsLocale = (await import('date-fns/locale/de/index.js')).default;
break;
case 'en' || 'en-US':
case 'en':
case 'en-US':
dateFnsLocale = (await import('date-fns/locale/en-US/index.js')).default;
break;
case 'pt' || 'pt-PT':
case 'pt':
case 'pt-PT':
dateFnsLocale = (await import('date-fns/locale/pt/index.js')).default;
break;
default:
dateFnsLocale = (await import('date-fns/locale/en-US/index.js')).default;
break;
}
})();
}
+1 -1
View File
@@ -7,7 +7,7 @@ import type {
} from 'typesafe-i18n';
export type BaseTranslation = BaseTranslationType;
export type BaseLocale = 'en-US';
export type BaseLocale = 'en';
export type Locales = 'de' | 'de-DE' | 'en' | 'en-US' | 'pt' | 'pt-PT';
+1 -1
View File
@@ -12,7 +12,7 @@ import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors';
import { initExtendDictionary } from 'typesafe-i18n/utils';
import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types';
export const baseLocale: Locales = 'en-US';
export const baseLocale: Locales = 'en';
export const locales: Locales[] = ['de', 'de-DE', 'en', 'en-US', 'pt', 'pt-PT'];