Skip to content

Commit a6216be

Browse files
chore: language support phase 2 (#6323)
* fix: adding langauge support for sidebar items * fix: worksapce sidebar item refactor * chore: code cleanup --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
1 parent 732963b commit a6216be

File tree

21 files changed

+431
-356
lines changed

21 files changed

+431
-356
lines changed

packages/constants/src/event.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const SIDEBAR_CLICKED = "Sidenav clicked";

packages/constants/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export * from "./ai";
22
export * from "./auth";
33
export * from "./endpoints";
4+
export * from "./event";
45
export * from "./file";
56
export * from "./instance";
67
export * from "./issue";

packages/constants/src/user.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,20 @@ export type TUserStatus = {
1919
status: EUserStatus | undefined;
2020
message?: string;
2121
};
22+
23+
export enum EUserPermissionsLevel {
24+
WORKSPACE = "WORKSPACE",
25+
PROJECT = "PROJECT",
26+
}
27+
28+
export enum EUserWorkspaceRoles {
29+
ADMIN = 20,
30+
MEMBER = 15,
31+
GUEST = 5,
32+
}
33+
34+
export enum EUserProjectRoles {
35+
ADMIN = 20,
36+
MEMBER = 15,
37+
GUEST = 5,
38+
}

packages/hooks/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from "./use-local-storage";
22
export * from "./use-outside-click-detector";
3+
export * from "./use-platform-os";
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { useState, useEffect } from "react";
2+
3+
export const usePlatformOS = () => {
4+
const [platformData, setPlatformData] = useState({
5+
isMobile: false,
6+
platform: "",
7+
});
8+
9+
useEffect(() => {
10+
const detectPlatform = () => {
11+
const userAgent = window.navigator.userAgent;
12+
const isMobile = /iPhone|iPad|iPod|Android/i.test(userAgent);
13+
let platform = "";
14+
15+
if (!isMobile) {
16+
if (userAgent.indexOf("Win") !== -1) {
17+
platform = "Windows";
18+
} else if (userAgent.indexOf("Mac") !== -1) {
19+
platform = "MacOS";
20+
} else if (userAgent.indexOf("Linux") !== -1) {
21+
platform = "Linux";
22+
} else {
23+
platform = "Unknown";
24+
}
25+
}
26+
27+
setPlatformData({ isMobile, platform });
28+
};
29+
30+
detectPlatform();
31+
}, []);
32+
33+
return platformData;
34+
};

packages/i18n/src/locales/en/translations.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"activity": "Activity",
4444
"appearance": "Appearance",
4545
"notifications": "Notifications",
46+
"inbox": "Inbox",
4647
"workspaces": "Workspaces",
4748
"create_workspace": "Create workspace",
4849
"invitations": "Invitations",

packages/i18n/src/locales/es/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,5 +314,6 @@
314314
"change_parent_issue": "Cambiar problema padre",
315315
"remove_parent_issue": "Eliminar problema padre",
316316
"add_parent": "Agregar padre",
317-
"loading_members": "Cargando miembros..."
317+
"loading_members": "Cargando miembros...",
318+
"inbox": "bandeja de entrada"
318319
}

packages/i18n/src/locales/fr/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,5 +314,6 @@
314314
"change_parent_issue": "Modifier le problème parent",
315315
"remove_parent_issue": "Supprimer le problème parent",
316316
"add_parent": "Ajouter un parent",
317-
"loading_members": "Chargement des membres..."
317+
"loading_members": "Chargement des membres...",
318+
"inbox": "boîte de réception"
318319
}

packages/i18n/src/locales/ja/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,5 +314,6 @@
314314
"change_parent_issue": "親問題を変更",
315315
"remove_parent_issue": "親問題を削除",
316316
"add_parent": "親問題を追加",
317-
"loading_members": "メンバーを読み込んでいます..."
317+
"loading_members": "メンバーを読み込んでいます...",
318+
"inbox": "受信箱"
318319
}

web/ce/constants/dashboard.ts

Lines changed: 0 additions & 113 deletions
This file was deleted.

0 commit comments

Comments
 (0)