1
0
Fork 0

Update french translation.

This commit is contained in:
Kitteh 2021-04-24 18:42:13 +01:00
parent 3fba14de6c
commit aa06392bee
4 changed files with 19 additions and 2 deletions

16
src/formatDistance.js Normal file
View file

@ -0,0 +1,16 @@
import { de, enGB, fr, nl, ru } from 'date-fns/locale'
import { formatDistance as formatDistanceReal} from 'date-fns';
function getLocale() {
return {
"en": enGB,
"fr": fr,
"nl": nl,
"ru": ru,
"de": de,
}[localStorage.getItem("language") || "en"];
}
export function formatDistance(d1, d2) {
return formatDistanceReal(d1, d2, { locale: getLocale() });
}

View file

@ -72,7 +72,7 @@ import translation_de from './translations/de.js'
import translation_ru from './translations/ru.js'
import translation_nl from './translations/nl.js'
import translation_fr from './translations/fr.js'
import formatDistance from 'date-fns/formatDistance';
import {formatDistance} from './formatDistance.js';
/*import "en-GB" as date_locale_en from 'date-fns/locale'

View file

@ -28,7 +28,6 @@ module.exports = {
"submit_key_btn": "Submit Key",
"unseal_input_btn": "Switch to Manual Key Input",
"unseal_qr_btn": "Switch to QR Key Input",
"key_input_placeholder": "Key",
"unseal_keys_progress": "Keys: {{progress}}/{{keys_needed}}",

View file

@ -26,6 +26,8 @@ module.exports = {
// Unseal Page
"unseal_vault_text": "Ouvrir le Vault",
"submit_key_btn": "Ajouter la clé",
"unseal_input_btn": "Basculer en entrée de clé manuelle",
"unseal_qr_btn": "Basculer en entrée de QR code",
"key_input_placeholder": "Clé",
"unseal_keys_progress": "Clés: {{progress}}/{{keys_needed}}",