mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 01:14:12 +03:00
fix: Set detected language on first login, remove auto-detect language option
This commit is contained in:
@@ -29,8 +29,7 @@ const AccountPane = React.memo(() => {
|
|||||||
|
|
||||||
const handleLanguageChange = useCallback(
|
const handleLanguageChange = useCallback(
|
||||||
(_, { value }) => {
|
(_, { value }) => {
|
||||||
// FIXME: hack
|
dispatch(entryActions.updateCurrentUserLanguage(value));
|
||||||
dispatch(entryActions.updateCurrentUserLanguage(value === 'auto' ? null : value));
|
|
||||||
},
|
},
|
||||||
[dispatch],
|
[dispatch],
|
||||||
);
|
);
|
||||||
@@ -62,18 +61,12 @@ const AccountPane = React.memo(() => {
|
|||||||
<Dropdown
|
<Dropdown
|
||||||
fluid
|
fluid
|
||||||
selection
|
selection
|
||||||
options={[
|
options={locales.map((locale) => ({
|
||||||
{
|
|
||||||
value: 'auto',
|
|
||||||
text: t('common.detectAutomatically'),
|
|
||||||
},
|
|
||||||
...locales.map((locale) => ({
|
|
||||||
value: locale.language,
|
value: locale.language,
|
||||||
flag: locale.country,
|
flag: locale.country,
|
||||||
text: locale.name,
|
text: locale.name,
|
||||||
})),
|
}))}
|
||||||
]}
|
value={user.language}
|
||||||
value={user.language || 'auto'}
|
|
||||||
onChange={handleLanguageChange}
|
onChange={handleLanguageChange}
|
||||||
/>
|
/>
|
||||||
{(isUsernameEditable || isEmailEditable || isPasswordEditable) && (
|
{(isUsernameEditable || isEmailEditable || isPasswordEditable) && (
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ i18n.loadCoreLocale = async (language = i18n.resolvedLanguage) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n.detectLanguage = () => {
|
/* i18n.detectLanguage = () => {
|
||||||
const {
|
const {
|
||||||
services: { languageDetector, languageUtils },
|
services: { languageDetector, languageUtils },
|
||||||
} = i18n;
|
} = i18n;
|
||||||
@@ -164,6 +164,6 @@ i18n.detectLanguage = () => {
|
|||||||
|
|
||||||
i18n.resolvedLanguage = undefined;
|
i18n.resolvedLanguage = undefined;
|
||||||
i18n.setResolvedLanguage(i18n.language);
|
i18n.setResolvedLanguage(i18n.language);
|
||||||
};
|
}; */
|
||||||
|
|
||||||
export default i18n;
|
export default i18n;
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'الوصف',
|
description: 'الوصف',
|
||||||
detectAutomatically: 'الكشف تلقائياً',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'أفلت الملف لرفعه',
|
dropFileToUpload: 'أفلت الملف لرفعه',
|
||||||
dueDate_title: 'تاريخ الاستحقاق',
|
dueDate_title: 'تاريخ الاستحقاق',
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Описание',
|
description: 'Описание',
|
||||||
detectAutomatically: 'Aвтоматично откриване',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Пуснете файл за качване',
|
dropFileToUpload: 'Пуснете файл за качване',
|
||||||
dueDate_title: 'Краен срок',
|
dueDate_title: 'Краен срок',
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Smazat webhook',
|
deleteWebhook_title: 'Smazat webhook',
|
||||||
deletedUser_title: 'Smazaný uživatel',
|
deletedUser_title: 'Smazaný uživatel',
|
||||||
description: 'Popis',
|
description: 'Popis',
|
||||||
detectAutomatically: 'Automatická detekce',
|
|
||||||
display: 'Zobrazit',
|
display: 'Zobrazit',
|
||||||
dropFileToUpload: 'Přetažením nahrát soubor',
|
dropFileToUpload: 'Přetažením nahrát soubor',
|
||||||
dueDate_title: 'Termín',
|
dueDate_title: 'Termín',
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: 'Slettet bruger',
|
deletedUser_title: 'Slettet bruger',
|
||||||
description: 'Beskrivelse',
|
description: 'Beskrivelse',
|
||||||
detectAutomatically: 'Registrer automatisk',
|
|
||||||
display: 'Vis',
|
display: 'Vis',
|
||||||
dropFileToUpload: 'Slip fil for at uploade',
|
dropFileToUpload: 'Slip fil for at uploade',
|
||||||
dueDate_title: 'Frist',
|
dueDate_title: 'Frist',
|
||||||
|
|||||||
@@ -170,7 +170,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: 'Gelöschter Benutzer',
|
deletedUser_title: 'Gelöschter Benutzer',
|
||||||
description: 'Beschreibung',
|
description: 'Beschreibung',
|
||||||
detectAutomatically: 'Automatisch erkennen',
|
|
||||||
display: 'Anzeige',
|
display: 'Anzeige',
|
||||||
dropFileToUpload: 'Datei für Upload ablegen',
|
dropFileToUpload: 'Datei für Upload ablegen',
|
||||||
dueDate_title: 'Fälligkeitsdatum',
|
dueDate_title: 'Fälligkeitsdatum',
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: 'Διαγραμμένος χρήστης',
|
deletedUser_title: 'Διαγραμμένος χρήστης',
|
||||||
description: 'Περιγραφή',
|
description: 'Περιγραφή',
|
||||||
detectAutomatically: 'Αυτόματη ανίχνευση',
|
|
||||||
display: 'Εμφάνιση',
|
display: 'Εμφάνιση',
|
||||||
dropFileToUpload: 'Σύρετε το αρχείο για μεταφόρτωση',
|
dropFileToUpload: 'Σύρετε το αρχείο για μεταφόρτωση',
|
||||||
dueDate_title: 'Ημερομηνία λήξης',
|
dueDate_title: 'Ημερομηνία λήξης',
|
||||||
|
|||||||
@@ -160,7 +160,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Delete Webhook',
|
deleteWebhook_title: 'Delete Webhook',
|
||||||
deletedUser_title: 'Deleted User',
|
deletedUser_title: 'Deleted User',
|
||||||
description: 'Description',
|
description: 'Description',
|
||||||
detectAutomatically: 'Detect automatically',
|
|
||||||
display: 'Display',
|
display: 'Display',
|
||||||
dropFileToUpload: 'Drop file to upload',
|
dropFileToUpload: 'Drop file to upload',
|
||||||
dueDate_title: 'Due Date',
|
dueDate_title: 'Due Date',
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Delete Webhook',
|
deleteWebhook_title: 'Delete Webhook',
|
||||||
deletedUser_title: 'Deleted User',
|
deletedUser_title: 'Deleted User',
|
||||||
description: 'Description',
|
description: 'Description',
|
||||||
detectAutomatically: 'Detect automatically',
|
|
||||||
display: 'Display',
|
display: 'Display',
|
||||||
dropFileToUpload: 'Drop file to upload',
|
dropFileToUpload: 'Drop file to upload',
|
||||||
dueDate_title: 'Due Date',
|
dueDate_title: 'Due Date',
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Eliminar webhook',
|
deleteWebhook_title: 'Eliminar webhook',
|
||||||
deletedUser_title: 'Usuario eliminado',
|
deletedUser_title: 'Usuario eliminado',
|
||||||
description: 'Descripción',
|
description: 'Descripción',
|
||||||
detectAutomatically: 'Detectar automáticamente',
|
|
||||||
display: 'Mostrar',
|
display: 'Mostrar',
|
||||||
dropFileToUpload: 'Arrastra archivo para subir',
|
dropFileToUpload: 'Arrastra archivo para subir',
|
||||||
dueDate_title: 'Fecha de vencimiento',
|
dueDate_title: 'Fecha de vencimiento',
|
||||||
|
|||||||
@@ -160,7 +160,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: 'Kustutatud kasutaja',
|
deletedUser_title: 'Kustutatud kasutaja',
|
||||||
description: 'Kirjeldus',
|
description: 'Kirjeldus',
|
||||||
detectAutomatically: 'Tuletage automaatselt',
|
|
||||||
display: 'Kuva',
|
display: 'Kuva',
|
||||||
dropFileToUpload: 'Lase faili üleslaadida',
|
dropFileToUpload: 'Lase faili üleslaadida',
|
||||||
dueDate_title: 'Tähtaeg',
|
dueDate_title: 'Tähtaeg',
|
||||||
|
|||||||
@@ -143,7 +143,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'توضیحات',
|
description: 'توضیحات',
|
||||||
detectAutomatically: 'تشخیص خودکار',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'فایل را برای آپلود بکشید',
|
dropFileToUpload: 'فایل را برای آپلود بکشید',
|
||||||
dueDate_title: 'تاریخ سررسید',
|
dueDate_title: 'تاریخ سررسید',
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: 'Poistettu käyttäjä',
|
deletedUser_title: 'Poistettu käyttäjä',
|
||||||
description: 'Kuvaus',
|
description: 'Kuvaus',
|
||||||
detectAutomatically: 'Tunnista automaattisesti',
|
|
||||||
display: 'Näyttö',
|
display: 'Näyttö',
|
||||||
dropFileToUpload: 'Pudota tiedosto ladattavaksi',
|
dropFileToUpload: 'Pudota tiedosto ladattavaksi',
|
||||||
dueDate_title: 'Määräpäivä',
|
dueDate_title: 'Määräpäivä',
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Supprimer le webhook',
|
deleteWebhook_title: 'Supprimer le webhook',
|
||||||
deletedUser_title: 'Utilisateur supprimé',
|
deletedUser_title: 'Utilisateur supprimé',
|
||||||
description: 'Description',
|
description: 'Description',
|
||||||
detectAutomatically: 'Détecter automatiquement',
|
|
||||||
display: 'Affichage',
|
display: 'Affichage',
|
||||||
dropFileToUpload: 'Déposer le fichier à télécharger',
|
dropFileToUpload: 'Déposer le fichier à télécharger',
|
||||||
dueDate_title: "Date d'échéance",
|
dueDate_title: "Date d'échéance",
|
||||||
|
|||||||
@@ -153,7 +153,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Webhook törlése',
|
deleteWebhook_title: 'Webhook törlése',
|
||||||
deletedUser_title: 'Törölt felhasználó',
|
deletedUser_title: 'Törölt felhasználó',
|
||||||
description: 'Leírás',
|
description: 'Leírás',
|
||||||
detectAutomatically: 'Automatikus érzékelés',
|
|
||||||
display: 'Megjelenítés',
|
display: 'Megjelenítés',
|
||||||
dropFileToUpload: 'Dobja ide a fájlt a feltöltéshez',
|
dropFileToUpload: 'Dobja ide a fájlt a feltöltéshez',
|
||||||
dueDate_title: 'Esedékesség dátuma',
|
dueDate_title: 'Esedékesség dátuma',
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Deskripsi',
|
description: 'Deskripsi',
|
||||||
detectAutomatically: 'Deteksi otomatis',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Tarik berkas untuk menggungah',
|
dropFileToUpload: 'Tarik berkas untuk menggungah',
|
||||||
dueDate_title: 'Tenggat Waktu',
|
dueDate_title: 'Tenggat Waktu',
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Elimina webhook',
|
deleteWebhook_title: 'Elimina webhook',
|
||||||
deletedUser_title: 'Utente eliminato',
|
deletedUser_title: 'Utente eliminato',
|
||||||
description: 'Descrizione',
|
description: 'Descrizione',
|
||||||
detectAutomatically: 'Rileva automaticamente',
|
|
||||||
display: 'Mostra',
|
display: 'Mostra',
|
||||||
dropFileToUpload: 'Trascina il file da caricare',
|
dropFileToUpload: 'Trascina il file da caricare',
|
||||||
dueDate_title: 'Data di scadenza',
|
dueDate_title: 'Data di scadenza',
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: '説明',
|
description: '説明',
|
||||||
detectAutomatically: '自動的に検知',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'ファイルをドロップしてアップロード',
|
dropFileToUpload: 'ファイルをドロップしてアップロード',
|
||||||
dueDate_title: '期限',
|
dueDate_title: '期限',
|
||||||
|
|||||||
@@ -143,7 +143,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: '설명',
|
description: '설명',
|
||||||
detectAutomatically: '자동 감지',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: '업로드할 파일을 드롭하세요',
|
dropFileToUpload: '업로드할 파일을 드롭하세요',
|
||||||
dueDate_title: '마감일',
|
dueDate_title: '마감일',
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Beschrijving',
|
description: 'Beschrijving',
|
||||||
detectAutomatically: 'Automatisch detecteren',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Sleep bestand om te uploaden',
|
dropFileToUpload: 'Sleep bestand om te uploaden',
|
||||||
dueDate_title: 'Vervaldatum',
|
dueDate_title: 'Vervaldatum',
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: 'Usunięty Użytkownik',
|
deletedUser_title: 'Usunięty Użytkownik',
|
||||||
description: 'Opis',
|
description: 'Opis',
|
||||||
detectAutomatically: 'Wykryj automatycznie',
|
|
||||||
display: 'Wyświetlanie',
|
display: 'Wyświetlanie',
|
||||||
dropFileToUpload: 'Upuść plik aby wgrać',
|
dropFileToUpload: 'Upuść plik aby wgrać',
|
||||||
dueDate_title: 'Termin',
|
dueDate_title: 'Termin',
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Excluir Webhook',
|
deleteWebhook_title: 'Excluir Webhook',
|
||||||
deletedUser_title: 'Usuário Excluído',
|
deletedUser_title: 'Usuário Excluído',
|
||||||
description: 'Descrição',
|
description: 'Descrição',
|
||||||
detectAutomatically: 'Detectar automaticamente',
|
|
||||||
display: 'Exibir',
|
display: 'Exibir',
|
||||||
dropFileToUpload: 'Solte o arquivo para enviar',
|
dropFileToUpload: 'Solte o arquivo para enviar',
|
||||||
dueDate_title: 'Data de Vencimento',
|
dueDate_title: 'Data de Vencimento',
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Descrição',
|
description: 'Descrição',
|
||||||
detectAutomatically: 'Detetar automaticamente',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Largue o ficheiro para carregar',
|
dropFileToUpload: 'Largue o ficheiro para carregar',
|
||||||
dueDate_title: 'Data de Vencimento',
|
dueDate_title: 'Data de Vencimento',
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Descriere',
|
description: 'Descriere',
|
||||||
detectAutomatically: 'Detectează automat',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Aruncă fișierul pentru a încărca',
|
dropFileToUpload: 'Aruncă fișierul pentru a încărca',
|
||||||
dueDate_title: 'Data scadentă',
|
dueDate_title: 'Data scadentă',
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: 'Удалённый пользователь',
|
deletedUser_title: 'Удалённый пользователь',
|
||||||
description: 'Описание',
|
description: 'Описание',
|
||||||
detectAutomatically: 'Определить автоматически',
|
|
||||||
display: 'Отображение',
|
display: 'Отображение',
|
||||||
dropFileToUpload: 'Перетяните файл, чтобы загрузить',
|
dropFileToUpload: 'Перетяните файл, чтобы загрузить',
|
||||||
dueDate_title: 'Срок исполнения',
|
dueDate_title: 'Срок исполнения',
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Popis',
|
description: 'Popis',
|
||||||
detectAutomatically: null,
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Potiahnutím nahraj súbor',
|
dropFileToUpload: 'Potiahnutím nahraj súbor',
|
||||||
dueDate_title: 'Termín do',
|
dueDate_title: 'Termín do',
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Опис',
|
description: 'Опис',
|
||||||
detectAutomatically: 'Детектуј аутоматски',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Превуци датотеку за слање',
|
dropFileToUpload: 'Превуци датотеку за слање',
|
||||||
dueDate_title: 'Рок',
|
dueDate_title: 'Рок',
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Opis',
|
description: 'Opis',
|
||||||
detectAutomatically: 'Detektuj automatski',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Prevuci datoteku za slanje',
|
dropFileToUpload: 'Prevuci datoteku za slanje',
|
||||||
dueDate_title: 'Rok',
|
dueDate_title: 'Rok',
|
||||||
|
|||||||
@@ -144,7 +144,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Beskrivning',
|
description: 'Beskrivning',
|
||||||
detectAutomatically: null,
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Släpp en fil för att ladda upp',
|
dropFileToUpload: 'Släpp en fil för att ladda upp',
|
||||||
dueDate_title: 'Förfallodatum',
|
dueDate_title: 'Förfallodatum',
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'açıklama',
|
description: 'açıklama',
|
||||||
detectAutomatically: 'Otomatik olarak algıla',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Yüklenecek dosyayı buraya bırakın',
|
dropFileToUpload: 'Yüklenecek dosyayı buraya bırakın',
|
||||||
dueDate_title: 'Termin Tarihi',
|
dueDate_title: 'Termin Tarihi',
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ export default {
|
|||||||
deleteWebhook_title: 'Видалити вебхук',
|
deleteWebhook_title: 'Видалити вебхук',
|
||||||
deletedUser_title: 'Видалений користувач',
|
deletedUser_title: 'Видалений користувач',
|
||||||
description: 'Опис',
|
description: 'Опис',
|
||||||
detectAutomatically: 'Визначити автоматично',
|
|
||||||
display: 'Дисплей',
|
display: 'Дисплей',
|
||||||
dropFileToUpload: 'Перетягніть файл для завантаження',
|
dropFileToUpload: 'Перетягніть файл для завантаження',
|
||||||
dueDate_title: 'Крайній Термін',
|
dueDate_title: 'Крайній Термін',
|
||||||
|
|||||||
@@ -141,7 +141,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: 'Tavsif',
|
description: 'Tavsif',
|
||||||
detectAutomatically: null,
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: 'Faylni yuklash uchun qoldiring',
|
dropFileToUpload: 'Faylni yuklash uchun qoldiring',
|
||||||
dueDate_title: 'Muddati',
|
dueDate_title: 'Muddati',
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ export default {
|
|||||||
deleteWebhook_title: '删除Webhook',
|
deleteWebhook_title: '删除Webhook',
|
||||||
deletedUser_title: '已删除用户',
|
deletedUser_title: '已删除用户',
|
||||||
description: '描述',
|
description: '描述',
|
||||||
detectAutomatically: '自动检测',
|
|
||||||
display: '显示',
|
display: '显示',
|
||||||
dropFileToUpload: '拖放文件以上传',
|
dropFileToUpload: '拖放文件以上传',
|
||||||
dueDate_title: '截止日期',
|
dueDate_title: '截止日期',
|
||||||
|
|||||||
@@ -139,7 +139,6 @@ export default {
|
|||||||
deleteWebhook_title: null,
|
deleteWebhook_title: null,
|
||||||
deletedUser_title: null,
|
deletedUser_title: null,
|
||||||
description: '描述',
|
description: '描述',
|
||||||
detectAutomatically: '自動偵測',
|
|
||||||
display: null,
|
display: null,
|
||||||
dropFileToUpload: '拖放文件以上傳',
|
dropFileToUpload: '拖放文件以上傳',
|
||||||
dueDate_title: '截止日期',
|
dueDate_title: '截止日期',
|
||||||
|
|||||||
@@ -79,15 +79,9 @@ export function* initializeCore() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function* changeCoreLanguage(language) {
|
export function* changeCoreLanguage(language) {
|
||||||
if (language === null) {
|
|
||||||
yield call(i18n.detectLanguage);
|
|
||||||
yield call(i18n.loadCoreLocale);
|
|
||||||
yield call(i18n.changeLanguage, i18n.resolvedLanguage);
|
|
||||||
} else {
|
|
||||||
yield call(i18n.loadCoreLocale, language);
|
yield call(i18n.loadCoreLocale, language);
|
||||||
yield call(i18n.changeLanguage, language);
|
yield call(i18n.changeLanguage, language);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export function* toggleFavorites(isEnabled) {
|
export function* toggleFavorites(isEnabled) {
|
||||||
yield put(actions.toggleFavorites(isEnabled));
|
yield put(actions.toggleFavorites(isEnabled));
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ export function* acceptTerms(signature) {
|
|||||||
({ item: accessToken } = yield call(api.acceptTerms, {
|
({ item: accessToken } = yield call(api.acceptTerms, {
|
||||||
pendingToken,
|
pendingToken,
|
||||||
signature,
|
signature,
|
||||||
|
initialLanguage: i18n.resolvedLanguage,
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
yield put(actions.acceptTerms.failure(error));
|
yield put(actions.acceptTerms.failure(error));
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ services:
|
|||||||
# Configure knex to accept SSL certificates
|
# Configure knex to accept SSL certificates
|
||||||
# - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false
|
# - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false
|
||||||
|
|
||||||
# Used for per-board notifications
|
# The default application language used as a fallback when a user's language is not set.
|
||||||
|
# This language is also used for per-board notifications.
|
||||||
# - DEFAULT_LANGUAGE=en-US
|
# - DEFAULT_LANGUAGE=en-US
|
||||||
|
|
||||||
# Do not comment out DEFAULT_ADMIN_EMAIL if you want to prevent this user from being edited/deleted
|
# Do not comment out DEFAULT_ADMIN_EMAIL if you want to prevent this user from being edited/deleted
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ services:
|
|||||||
# Configure knex to accept SSL certificates
|
# Configure knex to accept SSL certificates
|
||||||
# - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false
|
# - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false
|
||||||
|
|
||||||
# Used for per-board notifications
|
# The default application language used as a fallback when a user's language is not set.
|
||||||
|
# This language is also used for per-board notifications.
|
||||||
# - DEFAULT_LANGUAGE=en-US
|
# - DEFAULT_LANGUAGE=en-US
|
||||||
|
|
||||||
# Do not comment out DEFAULT_ADMIN_EMAIL if you want to prevent this user from being edited/deleted
|
# Do not comment out DEFAULT_ADMIN_EMAIL if you want to prevent this user from being edited/deleted
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ SECRET_KEY=notsecretkey
|
|||||||
# Configure knex to accept SSL certificates
|
# Configure knex to accept SSL certificates
|
||||||
# KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false
|
# KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false
|
||||||
|
|
||||||
# Used for per-board notifications
|
# The default application language used as a fallback when a user's language is not set.
|
||||||
|
# This language is also used for per-board notifications.
|
||||||
# DEFAULT_LANGUAGE=en-US
|
# DEFAULT_LANGUAGE=en-US
|
||||||
|
|
||||||
# Do not comment out DEFAULT_ADMIN_EMAIL if you want to prevent this user from being edited/deleted
|
# Do not comment out DEFAULT_ADMIN_EMAIL if you want to prevent this user from being edited/deleted
|
||||||
|
|||||||
@@ -33,6 +33,12 @@
|
|||||||
* maxLength: 64
|
* maxLength: 64
|
||||||
* description: Terms signature hash based on user role
|
* description: Terms signature hash based on user role
|
||||||
* example: 940226c4c41f51afe3980ceb63704e752636526f4c52a4ea579e85b247493d94
|
* example: 940226c4c41f51afe3980ceb63704e752636526f4c52a4ea579e85b247493d94
|
||||||
|
* initialLanguage:
|
||||||
|
* type: string
|
||||||
|
* enum: [ar-YE, bg-BG, cs-CZ, da-DK, de-DE, el-GR, en-GB, en-US, es-ES, et-EE, fa-IR, fi-FI, fr-FR, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-Cyrl-RS, sr-Latn-RS, sv-SE, tr-TR, uk-UA, uz-UZ, zh-CN, zh-TW]
|
||||||
|
* nullable: true
|
||||||
|
* description: Preferred language for user interface and notifications (used only if user language is not set)
|
||||||
|
* example: en-US
|
||||||
* responses:
|
* responses:
|
||||||
* 200:
|
* 200:
|
||||||
* description: Terms accepted successfully
|
* description: Terms accepted successfully
|
||||||
@@ -120,6 +126,11 @@ module.exports = {
|
|||||||
maxLength: 64,
|
maxLength: 64,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
initialLanguage: {
|
||||||
|
type: 'string',
|
||||||
|
isIn: User.LANGUAGES,
|
||||||
|
allowNull: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
exits: {
|
exits: {
|
||||||
@@ -179,10 +190,16 @@ module.exports = {
|
|||||||
throw Errors.INVALID_SIGNATURE;
|
throw Errors.INVALID_SIGNATURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
({ user } = await User.qm.updateOne(user.id, {
|
const values = {
|
||||||
termsSignature,
|
termsSignature,
|
||||||
termsAcceptedAt: new Date().toISOString(),
|
termsAcceptedAt: new Date().toISOString(),
|
||||||
}));
|
};
|
||||||
|
|
||||||
|
if (!user.language && inputs.initialLanguage) {
|
||||||
|
values.language = inputs.initialLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
|
({ user } = await User.qm.updateOne(user.id, values));
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = await Config.qm.getOneMain();
|
const config = await Config.qm.getOneMain();
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
* type: string
|
* type: string
|
||||||
* enum: [ar-YE, bg-BG, cs-CZ, da-DK, de-DE, el-GR, en-GB, en-US, es-ES, et-EE, fa-IR, fi-FI, fr-FR, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-Cyrl-RS, sr-Latn-RS, sv-SE, tr-TR, uk-UA, uz-UZ, zh-CN, zh-TW]
|
* enum: [ar-YE, bg-BG, cs-CZ, da-DK, de-DE, el-GR, en-GB, en-US, es-ES, et-EE, fa-IR, fi-FI, fr-FR, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-Cyrl-RS, sr-Latn-RS, sv-SE, tr-TR, uk-UA, uz-UZ, zh-CN, zh-TW]
|
||||||
* nullable: true
|
* nullable: true
|
||||||
* description: Preferred language for user interface and notifications
|
* description: Preferred language for user interface and notifications (if null - will be set automatically on the first login)
|
||||||
* example: en-US
|
* example: en-US
|
||||||
* subscribeToOwnCards:
|
* subscribeToOwnCards:
|
||||||
* type: boolean
|
* type: boolean
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
* language:
|
* language:
|
||||||
* type: string
|
* type: string
|
||||||
* enum: [ar-YE, bg-BG, cs-CZ, da-DK, de-DE, el-GR, en-GB, en-US, es-ES, et-EE, fa-IR, fi-FI, fr-FR, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-Cyrl-RS, sr-Latn-RS, sv-SE, tr-TR, uk-UA, uz-UZ, zh-CN, zh-TW]
|
* enum: [ar-YE, bg-BG, cs-CZ, da-DK, de-DE, el-GR, en-GB, en-US, es-ES, et-EE, fa-IR, fi-FI, fr-FR, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-Cyrl-RS, sr-Latn-RS, sv-SE, tr-TR, uk-UA, uz-UZ, zh-CN, zh-TW]
|
||||||
* nullable: true
|
|
||||||
* description: Preferred language for user interface and notifications
|
* description: Preferred language for user interface and notifications
|
||||||
* example: en-US
|
* example: en-US
|
||||||
* subscribeToOwnCards:
|
* subscribeToOwnCards:
|
||||||
@@ -167,7 +166,6 @@ module.exports = {
|
|||||||
language: {
|
language: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
isIn: User.LANGUAGES,
|
isIn: User.LANGUAGES,
|
||||||
allowNull: true,
|
|
||||||
},
|
},
|
||||||
subscribeToOwnCards: {
|
subscribeToOwnCards: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ module.exports = {
|
|||||||
cover180: `${fileManager.buildUrl(`${sails.config.custom.userAvatarsPathSegment}/${inputs.record.avatar.uploadedFileId}/cover-180.${inputs.record.avatar.extension}`)}`,
|
cover180: `${fileManager.buildUrl(`${sails.config.custom.userAvatarsPathSegment}/${inputs.record.avatar.uploadedFileId}/cover-180.${inputs.record.avatar.extension}`)}`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
language: inputs.record.language || sails.config.i18n.defaultLocale,
|
||||||
termsType: sails.hooks.terms.getTypeByUserRole(inputs.record.role),
|
termsType: sails.hooks.terms.getTypeByUserRole(inputs.record.role),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user