From 5a369e9909eea7abf689efc02d09c58d99213230 Mon Sep 17 00:00:00 2001 From: Basile Spaenlehauer Date: Fri, 24 Feb 2023 17:42:25 +0100 Subject: [PATCH] feat: add player translations (#112) closes #101 --- src/constants/common.ts | 7 +++++++ src/constants/index.ts | 1 + src/constants/player.ts | 9 +++++++++ src/langs/de/common.json | 5 ++++- src/langs/de/player.json | 6 ++++++ src/langs/en/common.json | 7 ++++++- src/langs/en/player.json | 9 +++++++++ src/langs/fr/common.json | 7 ++++++- src/langs/fr/player.json | 9 +++++++++ src/langs/index.ts | 9 +++++++++ src/langs/it/player.json | 1 + 11 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 src/constants/player.ts create mode 100644 src/langs/de/player.json create mode 100644 src/langs/en/player.json create mode 100644 src/langs/fr/player.json create mode 100644 src/langs/it/player.json diff --git a/src/constants/common.ts b/src/constants/common.ts index c49fee4e..63f1b834 100644 --- a/src/constants/common.ts +++ b/src/constants/common.ts @@ -6,6 +6,13 @@ export const COMMON = { 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', + + CHAT_TOOLTIP: 'CHAT_TOOLTIP', + CANCEL_BUTTON: 'CANCEL_BUTTON', SAVE_BUTTON: 'SAVE_BUTTON', CLOSE_BUTTON: 'CLOSE_BUTTON', diff --git a/src/constants/index.ts b/src/constants/index.ts index 6f3a258e..fe332715 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -2,6 +2,7 @@ export * from './account'; export * from './association'; export * from './auth'; export * from './builder'; +export * from './player'; export * from './categories'; export * from './common'; export * from './chatbox'; diff --git a/src/constants/player.ts b/src/constants/player.ts new file mode 100644 index 00000000..b095c262 --- /dev/null +++ b/src/constants/player.ts @@ -0,0 +1,9 @@ +export const PLAYER = { + GRAASP_PLAYER: 'GRAASP_PLAYER', + SHOW_CHAT_TOOLTIP: 'SHOW_CHAT_TOOLTIP', + HIDE_CHAT_TOOLTIP: 'HIDE_CHAT_TOOLTIP', + SHOW_PINNED_ITEMS_TOOLTIP: 'SHOW_PINNED_ITEMS_TOOLTIP', + HIDE_PINNED_ITEMS_TOOLTIP: 'HIDE_PINNED_ITEMS_TOOLTIP', + PINNED_ITEMS: 'PINNED_ITEMS', + LOAD_MORE: 'LOAD_MORE', +}; diff --git a/src/langs/de/common.json b/src/langs/de/common.json index 6f883eb9..36c7ea38 100644 --- a/src/langs/de/common.json +++ b/src/langs/de/common.json @@ -8,5 +8,8 @@ "CLOSE_BUTTON": "Schliessen", "AVATAR_DEFAULT_ALT": "Benutzerbild", "MEMBER_DEFAULT_NAME": "Unbekannt", - "UNKNOWN_DATE": "Unbekannt" + "UNKNOWN_DATE": "Unbekannt", + "USER_OWN_ITEMS": "Mein Graasp", + "USER_SHARED_WITH_ITEMS": "Mit mir geteilt", + "CHAT_TOOLTIP": "Chat" } diff --git a/src/langs/de/player.json b/src/langs/de/player.json new file mode 100644 index 00000000..aef46801 --- /dev/null +++ b/src/langs/de/player.json @@ -0,0 +1,6 @@ +{ + "GRAASP_PLAYER": "Graasp Player", + "SHOW_CHAT_TOOLTIP": "Chat anzeigen", + "HIDE_CHAT_TOOLTIP": "Chat verstecken", + "LOAD_MORE": "Mehr laden" +} diff --git a/src/langs/en/common.json b/src/langs/en/common.json index c2f7fba6..f5736fae 100644 --- a/src/langs/en/common.json +++ b/src/langs/en/common.json @@ -8,5 +8,10 @@ "CLOSE_BUTTON": "Close", "AVATAR_DEFAULT_ALT": "avatar", "MEMBER_DEFAULT_NAME": "Unknown", - "UNKNOWN_DATE": "Unknown" + "UNKNOWN_DATE": "Unknown", + "USER_OWN_ITEMS": "My Graasp", + "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" } diff --git a/src/langs/en/player.json b/src/langs/en/player.json new file mode 100644 index 00000000..8deecd74 --- /dev/null +++ b/src/langs/en/player.json @@ -0,0 +1,9 @@ +{ + "GRAASP_PLAYER": "Graasp Player", + "SHOW_CHAT_TOOLTIP": "Show chat", + "HIDE_CHAT_TOOLTIP": "Hide chat", + "SHOW_PINNED_ITEMS_TOOLTIP": "Show pinned items", + "HIDE_PINNED_ITEMS_TOOLTIP": "Hide pinned items", + "PINNED_ITEMS": "Pinned items", + "LOAD_MORE": "Load more" +} diff --git a/src/langs/fr/common.json b/src/langs/fr/common.json index f505e387..df6c8529 100644 --- a/src/langs/fr/common.json +++ b/src/langs/fr/common.json @@ -8,5 +8,10 @@ "CLOSE_BUTTON": "Fermer", "AVATAR_DEFAULT_ALT": "avatar", "MEMBER_DEFAULT_NAME": "Inconnu", - "UNKNOWN_DATE": "Inconnu" + "UNKNOWN_DATE": "Inconnu", + "USER_OWN_ITEMS": "Mon Graasp", + "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" } diff --git a/src/langs/fr/player.json b/src/langs/fr/player.json new file mode 100644 index 00000000..6405bafd --- /dev/null +++ b/src/langs/fr/player.json @@ -0,0 +1,9 @@ +{ + "GRAASP_PLAYER": "Graasp Player", + "SHOW_CHAT_TOOLTIP": "Montrer le chat", + "HIDE_CHAT_TOOLTIP": "Cacher le chat", + "SHOW_PINNED_ITEMS_TOOLTIP": "Montrer les éléments épinglés", + "HIDE_PINNED_ITEMS_TOOLTIP": "Cacher les éléments épinglés", + "PINNED_ITEMS": "Éléments épinglés", + "LOAD_MORE": "Montrer plus" +} diff --git a/src/langs/index.ts b/src/langs/index.ts index b425eac5..606e91a3 100644 --- a/src/langs/index.ts +++ b/src/langs/index.ts @@ -22,6 +22,10 @@ import builderEN from './en/builder.json'; import builderFR from './fr/builder.json'; import builderDE from './de/builder.json'; import builderIT from './it/builder.json'; +import playerEN from './en/player.json'; +import playerFR from './fr/player.json'; +import playerDE from './de/player.json'; +import playerIT from './it/player.json'; import commonEN from './en/common.json'; import commonFR from './fr/common.json'; import commonDE from './de/common.json'; @@ -57,6 +61,7 @@ export const namespaces = { auth: 'auth', association: 'association', builder: 'builder', + player: 'player', categories: 'categories', chatbox: 'chatbox', common: 'common', @@ -71,6 +76,7 @@ const en = { [namespaces.auth]: authEN, [namespaces.association]: associationEN, [namespaces.builder]: builderEN, + [namespaces.player]: playerEN, [namespaces.categories]: categoriesEN, [namespaces.chatbox]: chatboxEN, [namespaces.common]: commonEN, @@ -89,6 +95,7 @@ const fr = { [namespaces.auth]: authFR, [namespaces.association]: associationFR, [namespaces.builder]: builderFR, + [namespaces.player]: playerFR, [namespaces.categories]: categoriesFR, [namespaces.chatbox]: chatboxFR, [namespaces.common]: commonFR, @@ -107,6 +114,7 @@ const de = { [namespaces.association]: associationDE, [namespaces.auth]: authDE, [namespaces.builder]: builderDE, + [namespaces.player]: playerDE, [namespaces.categories]: categoriesDE, [namespaces.chatbox]: chatboxDE, [namespaces.common]: commonDE, @@ -125,6 +133,7 @@ const it = { [namespaces.association]: associationIT, [namespaces.auth]: authIT, [namespaces.builder]: builderIT, + [namespaces.player]: playerIT, [namespaces.categories]: categoriesIT, [namespaces.chatbox]: chatboxIT, [namespaces.common]: commonIT, diff --git a/src/langs/it/player.json b/src/langs/it/player.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/langs/it/player.json @@ -0,0 +1 @@ +{}