From 35ce69952bd3072b2aa64aee6d1fa1f2897404c6 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 4 Aug 2023 15:10:27 +0200 Subject: [PATCH 1/2] feat: add lang translations in common --- src/constants/common.ts | 30 ++++++++++++++++-------------- src/langs/en/common.json | 3 ++- src/langs/fr/common.json | 3 ++- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/constants/common.ts b/src/constants/common.ts index 63f1b834..e9d140bc 100644 --- a/src/constants/common.ts +++ b/src/constants/common.ts @@ -1,19 +1,21 @@ export const COMMON = { - COOKIE_BANNER_TEXT: 'COOKIE_BANNER_TEXT', - COOKIE_BANNER_ACCEPT_BUTTON: 'COOKIE_BANNER_ACCEPT_BUTTON', - COOKIE_BANNER_DECLINE_BUTTON: 'COOKIE_BANNER_DECLINE_BUTTON', - AVATAR_DEFAULT_ALT: 'AVATAR_DEFAULT_ALT', - MEMBER_DEFAULT_NAME: 'MEMBER_DEFAULT_NAME', - UNKNOWN_DATE: 'UNKNOWN_DATE', + COOKIE_BANNER_TEXT: "COOKIE_BANNER_TEXT", + COOKIE_BANNER_ACCEPT_BUTTON: "COOKIE_BANNER_ACCEPT_BUTTON", + COOKIE_BANNER_DECLINE_BUTTON: "COOKIE_BANNER_DECLINE_BUTTON", + AVATAR_DEFAULT_ALT: "AVATAR_DEFAULT_ALT", + MEMBER_DEFAULT_NAME: "MEMBER_DEFAULT_NAME", + UNKNOWN_DATE: "UNKNOWN_DATE", - USER_OWN_ITEMS: 'USER_OWN_ITEMS', - USER_SHARED_WITH_ITEMS: 'USER_SHARED_WITH_ITEMS', - USER_NOT_SIGNED_IN: 'USER_NOT_SIGNED_IN', - USER_CAN_NOT_ACCESS_ITEM: 'USER_CAN_NOT_ACCESS_ITEM', + USER_OWN_ITEMS: "USER_OWN_ITEMS", + USER_SHARED_WITH_ITEMS: "USER_SHARED_WITH_ITEMS", + USER_NOT_SIGNED_IN: "USER_NOT_SIGNED_IN", + USER_CAN_NOT_ACCESS_ITEM: "USER_CAN_NOT_ACCESS_ITEM", - CHAT_TOOLTIP: 'CHAT_TOOLTIP', + CHAT_TOOLTIP: "CHAT_TOOLTIP", - CANCEL_BUTTON: 'CANCEL_BUTTON', - SAVE_BUTTON: 'SAVE_BUTTON', - CLOSE_BUTTON: 'CLOSE_BUTTON', + CANCEL_BUTTON: "CANCEL_BUTTON", + SAVE_BUTTON: "SAVE_BUTTON", + CLOSE_BUTTON: "CLOSE_BUTTON", + + LANGUAGE: "LANGUAGE", }; diff --git a/src/langs/en/common.json b/src/langs/en/common.json index f5736fae..dcaaf756 100644 --- a/src/langs/en/common.json +++ b/src/langs/en/common.json @@ -13,5 +13,6 @@ "USER_SHARED_WITH_ITEMS": "Shared with me", "USER_NOT_SIGNED_IN": "You are not signed in.", "USER_CAN_NOT_ACCESS_ITEM": "You cannot access this item.", - "CHAT_TOOLTIP": "Chat" + "CHAT_TOOLTIP": "Chat", + "LANGUAGE": "Language" } diff --git a/src/langs/fr/common.json b/src/langs/fr/common.json index df6c8529..ff01a350 100644 --- a/src/langs/fr/common.json +++ b/src/langs/fr/common.json @@ -13,5 +13,6 @@ "USER_SHARED_WITH_ITEMS": "Partagés avec moi", "USER_NOT_SIGNED_IN": "Vous n'êtes pas connecté.", "USER_CAN_NOT_ACCESS_ITEM": "Vous ne pouvez pas accéder à cet élément.", - "CHAT_TOOLTIP": "Chat" + "CHAT_TOOLTIP": "Chat", + "LANGUAGE": "Langue" } From 5b7f68100c85a377fe6257e862df0713dfe8204d Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 4 Aug 2023 16:03:55 +0200 Subject: [PATCH 2/2] refactor: fix lint --- src/constants/common.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/constants/common.ts b/src/constants/common.ts index e9d140bc..e108b5d0 100644 --- a/src/constants/common.ts +++ b/src/constants/common.ts @@ -1,21 +1,21 @@ export const COMMON = { - COOKIE_BANNER_TEXT: "COOKIE_BANNER_TEXT", - COOKIE_BANNER_ACCEPT_BUTTON: "COOKIE_BANNER_ACCEPT_BUTTON", - COOKIE_BANNER_DECLINE_BUTTON: "COOKIE_BANNER_DECLINE_BUTTON", - AVATAR_DEFAULT_ALT: "AVATAR_DEFAULT_ALT", - MEMBER_DEFAULT_NAME: "MEMBER_DEFAULT_NAME", - UNKNOWN_DATE: "UNKNOWN_DATE", + COOKIE_BANNER_TEXT: 'COOKIE_BANNER_TEXT', + COOKIE_BANNER_ACCEPT_BUTTON: 'COOKIE_BANNER_ACCEPT_BUTTON', + COOKIE_BANNER_DECLINE_BUTTON: 'COOKIE_BANNER_DECLINE_BUTTON', + AVATAR_DEFAULT_ALT: 'AVATAR_DEFAULT_ALT', + MEMBER_DEFAULT_NAME: 'MEMBER_DEFAULT_NAME', + UNKNOWN_DATE: 'UNKNOWN_DATE', - USER_OWN_ITEMS: "USER_OWN_ITEMS", - USER_SHARED_WITH_ITEMS: "USER_SHARED_WITH_ITEMS", - USER_NOT_SIGNED_IN: "USER_NOT_SIGNED_IN", - USER_CAN_NOT_ACCESS_ITEM: "USER_CAN_NOT_ACCESS_ITEM", + USER_OWN_ITEMS: 'USER_OWN_ITEMS', + USER_SHARED_WITH_ITEMS: 'USER_SHARED_WITH_ITEMS', + USER_NOT_SIGNED_IN: 'USER_NOT_SIGNED_IN', + USER_CAN_NOT_ACCESS_ITEM: 'USER_CAN_NOT_ACCESS_ITEM', - CHAT_TOOLTIP: "CHAT_TOOLTIP", + CHAT_TOOLTIP: 'CHAT_TOOLTIP', - CANCEL_BUTTON: "CANCEL_BUTTON", - SAVE_BUTTON: "SAVE_BUTTON", - CLOSE_BUTTON: "CLOSE_BUTTON", + CANCEL_BUTTON: 'CANCEL_BUTTON', + SAVE_BUTTON: 'SAVE_BUTTON', + CLOSE_BUTTON: 'CLOSE_BUTTON', - LANGUAGE: "LANGUAGE", + LANGUAGE: 'LANGUAGE', };