Skip to content

Commit

Permalink
feat: add player translations (#112)
Browse files Browse the repository at this point in the history
closes #101
  • Loading branch information
spaenleh authored Feb 24, 2023
1 parent 4fff82b commit 5a369e9
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/constants/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
9 changes: 9 additions & 0 deletions src/constants/player.ts
Original file line number Diff line number Diff line change
@@ -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',
};
5 changes: 4 additions & 1 deletion src/langs/de/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
6 changes: 6 additions & 0 deletions src/langs/de/player.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"GRAASP_PLAYER": "Graasp Player",
"SHOW_CHAT_TOOLTIP": "Chat anzeigen",
"HIDE_CHAT_TOOLTIP": "Chat verstecken",
"LOAD_MORE": "Mehr laden"
}
7 changes: 6 additions & 1 deletion src/langs/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
9 changes: 9 additions & 0 deletions src/langs/en/player.json
Original file line number Diff line number Diff line change
@@ -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"
}
7 changes: 6 additions & 1 deletion src/langs/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
9 changes: 9 additions & 0 deletions src/langs/fr/player.json
Original file line number Diff line number Diff line change
@@ -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"
}
9 changes: 9 additions & 0 deletions src/langs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -57,6 +61,7 @@ export const namespaces = {
auth: 'auth',
association: 'association',
builder: 'builder',
player: 'player',
categories: 'categories',
chatbox: 'chatbox',
common: 'common',
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/langs/it/player.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 5a369e9

Please sign in to comment.