Update french translation.
This commit is contained in:
parent
3fba14de6c
commit
aa06392bee
16
src/formatDistance.js
Normal file
16
src/formatDistance.js
Normal 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() });
|
||||||
|
}
|
|
@ -72,7 +72,7 @@ import translation_de from './translations/de.js'
|
||||||
import translation_ru from './translations/ru.js'
|
import translation_ru from './translations/ru.js'
|
||||||
import translation_nl from './translations/nl.js'
|
import translation_nl from './translations/nl.js'
|
||||||
import translation_fr from './translations/fr.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'
|
/*import "en-GB" as date_locale_en from 'date-fns/locale'
|
||||||
|
|
|
@ -28,7 +28,6 @@ module.exports = {
|
||||||
"submit_key_btn": "Submit Key",
|
"submit_key_btn": "Submit Key",
|
||||||
"unseal_input_btn": "Switch to Manual Key Input",
|
"unseal_input_btn": "Switch to Manual Key Input",
|
||||||
"unseal_qr_btn": "Switch to QR Key Input",
|
"unseal_qr_btn": "Switch to QR Key Input",
|
||||||
|
|
||||||
"key_input_placeholder": "Key",
|
"key_input_placeholder": "Key",
|
||||||
"unseal_keys_progress": "Keys: {{progress}}/{{keys_needed}}",
|
"unseal_keys_progress": "Keys: {{progress}}/{{keys_needed}}",
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@ module.exports = {
|
||||||
// Unseal Page
|
// Unseal Page
|
||||||
"unseal_vault_text": "Ouvrir le Vault",
|
"unseal_vault_text": "Ouvrir le Vault",
|
||||||
"submit_key_btn": "Ajouter la clé",
|
"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é",
|
"key_input_placeholder": "Clé",
|
||||||
"unseal_keys_progress": "Clés: {{progress}}/{{keys_needed}}",
|
"unseal_keys_progress": "Clés: {{progress}}/{{keys_needed}}",
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue