mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 05:25:26 +02:00
Merge branch 'mealie-next' into fix-site-maintenance-missing-words
This commit is contained in:
commit
3a9fd11344
20 changed files with 312 additions and 214 deletions
|
@ -3,196 +3,241 @@ export const LOCALES = [
|
|||
{
|
||||
name: "繁體中文 (Chinese traditional)",
|
||||
value: "zh-TW",
|
||||
progress: 28,
|
||||
progress: 30,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "简体中文 (Chinese simplified)",
|
||||
value: "zh-CN",
|
||||
progress: 65,
|
||||
progress: 98,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Tiếng Việt (Vietnamese)",
|
||||
value: "vi-VN",
|
||||
progress: 2,
|
||||
progress: 1,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Українська (Ukrainian)",
|
||||
value: "uk-UA",
|
||||
progress: 99,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Türkçe (Turkish)",
|
||||
value: "tr-TR",
|
||||
progress: 50,
|
||||
progress: 53,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Svenska (Swedish)",
|
||||
value: "sv-SE",
|
||||
progress: 71,
|
||||
progress: 94,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "српски (Serbian)",
|
||||
value: "sr-SP",
|
||||
progress: 4,
|
||||
progress: 32,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Slovenian",
|
||||
value: "sl-SI",
|
||||
progress: 49,
|
||||
progress: 47,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Slovak",
|
||||
value: "sk-SK",
|
||||
progress: 97,
|
||||
progress: 93,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Pусский (Russian)",
|
||||
value: "ru-RU",
|
||||
progress: 99,
|
||||
progress: 98,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Română (Romanian)",
|
||||
value: "ro-RO",
|
||||
progress: 32,
|
||||
progress: 42,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Português (Portuguese)",
|
||||
value: "pt-PT",
|
||||
progress: 99,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Português do Brasil (Brazilian Portuguese)",
|
||||
value: "pt-BR",
|
||||
progress: 98,
|
||||
progress: 97,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Polski (Polish)",
|
||||
value: "pl-PL",
|
||||
progress: 97,
|
||||
progress: 98,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Norsk (Norwegian)",
|
||||
value: "no-NO",
|
||||
progress: 85,
|
||||
progress: 99,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Nederlands (Dutch)",
|
||||
value: "nl-NL",
|
||||
progress: 98,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Latvian",
|
||||
value: "lv-LV",
|
||||
progress: 1,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Lithuanian",
|
||||
value: "lt-LT",
|
||||
progress: 97,
|
||||
progress: 93,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "한국어 (Korean)",
|
||||
value: "ko-KR",
|
||||
progress: 5,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "日本語 (Japanese)",
|
||||
value: "ja-JP",
|
||||
progress: 11,
|
||||
progress: 12,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Italiano (Italian)",
|
||||
value: "it-IT",
|
||||
progress: 96,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Icelandic",
|
||||
value: "is-IS",
|
||||
progress: 0,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Magyar (Hungarian)",
|
||||
value: "hu-HU",
|
||||
progress: 99,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Croatian",
|
||||
value: "hr-HR",
|
||||
progress: 97,
|
||||
progress: 93,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "עברית (Hebrew)",
|
||||
value: "he-IL",
|
||||
progress: 99,
|
||||
progress: 97,
|
||||
dir: "rtl",
|
||||
},
|
||||
{
|
||||
name: "Galician",
|
||||
value: "gl-ES",
|
||||
progress: 1,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Français (French)",
|
||||
value: "fr-FR",
|
||||
progress: 99,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "French, Canada",
|
||||
value: "fr-CA",
|
||||
progress: 97,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Suomi (Finnish)",
|
||||
value: "fi-FI",
|
||||
progress: 95,
|
||||
progress: 91,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Español (Spanish)",
|
||||
value: "es-ES",
|
||||
progress: 76,
|
||||
progress: 79,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "American English",
|
||||
value: "en-US",
|
||||
progress: 100.0,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "British English",
|
||||
value: "en-GB",
|
||||
progress: 4,
|
||||
progress: 3,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Ελληνικά (Greek)",
|
||||
value: "el-GR",
|
||||
progress: 35,
|
||||
progress: 34,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Deutsch (German)",
|
||||
value: "de-DE",
|
||||
progress: 99,
|
||||
progress: 100,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Dansk (Danish)",
|
||||
value: "da-DK",
|
||||
progress: 100,
|
||||
progress: 98,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Čeština (Czech)",
|
||||
value: "cs-CZ",
|
||||
progress: 66,
|
||||
progress: 64,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Català (Catalan)",
|
||||
value: "ca-ES",
|
||||
progress: 61,
|
||||
progress: 75,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "Bulgarian",
|
||||
value: "bg-BG",
|
||||
progress: 99,
|
||||
dir: "ltr",
|
||||
},
|
||||
{
|
||||
name: "العربية (Arabic)",
|
||||
value: "ar-SA",
|
||||
progress: 16,
|
||||
progress: 20,
|
||||
dir: "rtl",
|
||||
},
|
||||
{
|
||||
name: "Afrikaans (Afrikaans)",
|
||||
value: "af-ZA",
|
||||
progress: 96,
|
||||
progress: 92,
|
||||
dir: "ltr",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -4,14 +4,31 @@ import { LOCALES } from "./available-locales";
|
|||
export const useLocales = () => {
|
||||
const { i18n, $vuetify } = useContext();
|
||||
|
||||
function getLocale(value: string) {
|
||||
const currentLocale = LOCALES.filter((locale) => locale.value === value);
|
||||
return currentLocale.length ? currentLocale[0] : null;
|
||||
}
|
||||
|
||||
const locale = computed<string>({
|
||||
get() {
|
||||
$vuetify.lang.current = i18n.locale; // dirty hack
|
||||
// dirty hack
|
||||
$vuetify.lang.current = i18n.locale;
|
||||
const currentLocale = getLocale(i18n.locale);
|
||||
if (currentLocale) {
|
||||
$vuetify.rtl = currentLocale.dir === "rtl";
|
||||
}
|
||||
|
||||
return i18n.locale;
|
||||
},
|
||||
set(value) {
|
||||
i18n.setLocale(value);
|
||||
$vuetify.lang.current = value; // this does not persist after window reload :-(
|
||||
|
||||
// this does not persist after window reload :-(
|
||||
$vuetify.lang.current = value;
|
||||
const currentLocale = getLocale(value);
|
||||
if (currentLocale) {
|
||||
$vuetify.rtl = currentLocale.dir === "rtl";
|
||||
}
|
||||
|
||||
// Reload the page to update the language - not all strings are reactive
|
||||
window.location.reload();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { BaseAPI } from "../base/base-clients";
|
||||
import { AdminAboutInfo, DockerVolumeText, CheckAppConfig } from "~/lib/api/types/admin";
|
||||
import { AdminAboutInfo, CheckAppConfig } from "~/lib/api/types/admin";
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
|
@ -24,10 +24,6 @@ export class AdminAboutAPI extends BaseAPI {
|
|||
return await this.requests.get<CheckAppConfig>(routes.check);
|
||||
}
|
||||
|
||||
async checkDocker() {
|
||||
return await this.requests.get<DockerVolumeText>(routes.docker);
|
||||
}
|
||||
|
||||
async getDockerValidateFileContents() {
|
||||
return await this.requests.get<string>(routes.validationFile);
|
||||
}
|
||||
|
|
|
@ -151,9 +151,6 @@ export interface CustomPageOut {
|
|||
categories?: RecipeCategoryResponse[];
|
||||
id: number;
|
||||
}
|
||||
export interface DockerVolumeText {
|
||||
text: string;
|
||||
}
|
||||
export interface EmailReady {
|
||||
ready: boolean;
|
||||
}
|
||||
|
|
|
@ -195,6 +195,7 @@ export default {
|
|||
{ code: "fr-FR", file: "fr-FR.json" },
|
||||
{ code: "zh-TW", file: "zh-TW.json" },
|
||||
{ code: "af-ZA", file: "af-ZA.json" },
|
||||
{ code: "is-IS", file: "is-IS.json" },
|
||||
{ code: "sl-SI", file: "sl-SI.json" },
|
||||
{ code: "ru-RU", file: "ru-RU.json" },
|
||||
{ code: "he-IL", file: "he-IL.json" },
|
||||
|
|
|
@ -147,7 +147,7 @@ export default defineComponent({
|
|||
async function createBackup() {
|
||||
const { data } = await adminApi.backups.create();
|
||||
|
||||
if (!data?.error) {
|
||||
if (data?.error === false) {
|
||||
refreshBackups();
|
||||
alert.success(i18n.tc("settings.backup.backup-created"));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue