From 5955567b5e5d79b36590bf6f210b52ca4771a840 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sat, 8 Aug 2020 08:52:30 +0530 Subject: [PATCH] - add "Present" key string in i18n --- src/i18n/locales/ar.json | 3 ++- src/i18n/locales/da.json | 3 ++- src/i18n/locales/de.json | 3 ++- src/i18n/locales/en.json | 1 + src/i18n/locales/es.json | 3 ++- src/i18n/locales/fi.json | 3 ++- src/i18n/locales/fr.json | 3 ++- src/i18n/locales/ja.json | 3 ++- src/i18n/locales/kn.json | 3 ++- src/i18n/locales/nb.json | 3 ++- src/i18n/locales/nl.json | 3 ++- src/i18n/locales/pt-br.json | 3 ++- src/i18n/locales/tr.json | 3 ++- src/utils/index.js | 3 ++- 14 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json index 38f57e89..b860a043 100644 --- a/src/i18n/locales/ar.json +++ b/src/i18n/locales/ar.json @@ -23,7 +23,8 @@ "email": "يجب أن يكون عنوان بريد إلكتروني صالح.", "required": "هذا مطلوب.", "url": "يجب أن يكون عنوان URL صالحًا." - } + }, + "present": "" }, "buttons": { "add": "أضف", diff --git a/src/i18n/locales/da.json b/src/i18n/locales/da.json index f58c2b5b..6e9a3e18 100644 --- a/src/i18n/locales/da.json +++ b/src/i18n/locales/da.json @@ -23,7 +23,8 @@ "email": "Dette skal være en gyldig mailadresse.", "required": "Dette er et obligatorisk felt.", "url": "Skal være en korrekt URL." - } + }, + "present": "" }, "buttons": { "add": "Tilføj", diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index ed24708a..614d3dfc 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -23,7 +23,8 @@ "email": "Keine gültige E-Mail-Adresse.", "required": "Dies ist ein Pflichtfeld.", "url": "Ungültige Url." - } + }, + "present": "" }, "buttons": { "add": "Hinzufügen", diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index dd03410a..baf9360e 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -9,6 +9,7 @@ "required": "required", "website": "Website", "date": "Date", + "present": "Present", "position": "Position", "startDate": "Start Date", "endDate": "End Date", diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 965b155a..523bfe66 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -23,7 +23,8 @@ "email": "Debe ser una cuenta de correo electrónico válida.", "required": "Este es un campo obligatorio.", "url": "Debe ser una URL válida." - } + }, + "present": "" }, "buttons": { "add": "Agregar", diff --git a/src/i18n/locales/fi.json b/src/i18n/locales/fi.json index 22c32641..f37271de 100644 --- a/src/i18n/locales/fi.json +++ b/src/i18n/locales/fi.json @@ -23,7 +23,8 @@ "email": "Anna kelvollinen sähköpostiosoite.", "required": "Tämä on pakollinen kenttä.", "url": "URL: n muoto ei ole oikea." - } + }, + "present": "" }, "buttons": { "add": "Lisää", diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index 0b6c412f..48d7e642 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -23,7 +23,8 @@ "email": "L'adresse e-mail doit être valide.", "required": "Ce champ est requis.", "url": "L'URL doit être valide." - } + }, + "present": "" }, "buttons": { "add": "Ajouter", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index 8b034cf8..da1e30a2 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -23,7 +23,8 @@ "email": "メールアドレスのフォーマットが不正です。", "required": "必須項目です。", "url": "有効なURIである必要があります。" - } + }, + "present": "" }, "buttons": { "add": "追加", diff --git a/src/i18n/locales/kn.json b/src/i18n/locales/kn.json index 6ad2089b..39e5229a 100644 --- a/src/i18n/locales/kn.json +++ b/src/i18n/locales/kn.json @@ -23,7 +23,8 @@ "email": "ಮಾನ್ಯವಾದ ಇಮೇಲ್ ವಿಳಾಸವಾಗಿರಬೇಕು.", "required": "ಇದು ಅಗತ್ಯವಾದ ಕ್ಷೇತ್ರವಾಗಿದೆ.", "url": "ಮಾನ್ಯವಾದ ಯುಅರಎಲ್ ಆಗಿರಬೇಕು." - } + }, + "present": "" }, "buttons": { "add": "ಸೇರಿಸಿ", diff --git a/src/i18n/locales/nb.json b/src/i18n/locales/nb.json index cd2afdf9..11c0c12b 100644 --- a/src/i18n/locales/nb.json +++ b/src/i18n/locales/nb.json @@ -23,7 +23,8 @@ "email": "Dette må være en gyldig e-postadresse.", "required": "Dette er et obligatorisk felt.", "url": "Må være en korrekt URL." - } + }, + "present": "" }, "buttons": { "add": "Legg til", diff --git a/src/i18n/locales/nl.json b/src/i18n/locales/nl.json index 734d86cf..797cb45e 100644 --- a/src/i18n/locales/nl.json +++ b/src/i18n/locales/nl.json @@ -23,7 +23,8 @@ "email": "Dit moet een geldig e-mailadres zijn.", "required": "Dit is een verplicht veld.", "url": "Moet een geldige URL zijn" - } + }, + "present": "" }, "buttons": { "add": "Toevoegen", diff --git a/src/i18n/locales/pt-br.json b/src/i18n/locales/pt-br.json index b000298d..2159b353 100644 --- a/src/i18n/locales/pt-br.json +++ b/src/i18n/locales/pt-br.json @@ -23,7 +23,8 @@ "email": "Insira um email válido.", "required": "Esse campo é obrigatório.", "url": "A URL precisa ser válida." - } + }, + "present": "" }, "buttons": { "add": "Adicionar", diff --git a/src/i18n/locales/tr.json b/src/i18n/locales/tr.json index 5aeeef1f..5001db25 100644 --- a/src/i18n/locales/tr.json +++ b/src/i18n/locales/tr.json @@ -23,7 +23,8 @@ "email": "Geçerli bir email adresi olmak zorundadır.", "required": "Zorunlu alan.", "url": "Geçerli bir URL olmalıdır." - } + }, + "present": "" }, "buttons": { "add": "Ekle", diff --git a/src/utils/index.js b/src/utils/index.js index 286a0a2f..156daef8 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -27,13 +27,14 @@ export const formatDate = ({ date, language = 'en' }) => { }; export const formatDateRange = ({ startDate, endDate, language = 'en' }) => { + const { t } = useTranslation(); const start = `${dayjs(startDate) .locale(language.substr(0, 2)) .format('MMMM YYYY')}`; const end = dayjs(endDate).isValid() ? `${dayjs(endDate).locale(language.substr(0, 2)).format('MMMM YYYY')}` - : 'Present'; + : t('shared.forms.present'); return `${start} - ${end}`; };