File tree 3 files changed +15
-3
lines changed 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,24 @@ import GroupOutlinedIcon from "@material-ui/icons/GroupOutlined"
4
4
import { FC } from "react"
5
5
import * as TypesGen from "../../api/typesGenerated"
6
6
import Tooltip from "@material-ui/core/Tooltip"
7
+ import { useTranslation } from "react-i18next"
7
8
8
9
export interface ShareIconProps {
9
10
app : TypesGen . WorkspaceApp
10
11
}
11
12
12
13
export const ShareIcon : FC < ShareIconProps > = ( { app } ) => {
14
+ const { t } = useTranslation ( "agent" )
15
+
13
16
let shareIcon = < LockOutlinedIcon />
14
- let shareTooltip = "Private, only accessible by you"
17
+ let shareTooltip = t ( "shareTooltip.private" )
15
18
if ( app . sharing_level === "authenticated" ) {
16
19
shareIcon = < GroupOutlinedIcon />
17
- shareTooltip = "Shared with all authenticated users"
20
+ shareTooltip = t ( "shareTooltip. authenticated" )
18
21
}
19
22
if ( app . sharing_level === "public" ) {
20
23
shareIcon = < PublicOutlinedIcon />
21
- shareTooltip = "Shared publicly"
24
+ shareTooltip = t ( "shareTooltip.public" )
22
25
}
23
26
24
27
return < Tooltip title = { shareTooltip } > { shareIcon } </ Tooltip >
Original file line number Diff line number Diff line change
1
+ {
2
+ "shareTooltip" : {
3
+ "private" : " Private, only accessible by you" ,
4
+ "authenticated" : " Shared with all authenticated users" ,
5
+ "public" : " Shared publicly"
6
+ }
7
+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import createWorkspacePage from "./createWorkspacePage.json"
4
4
import templatePage from "./templatePage.json"
5
5
import templatesPage from "./templatesPage.json"
6
6
import workspacePage from "./workspacePage.json"
7
+ import agent from "./agent.json"
7
8
8
9
export const en = {
9
10
common,
@@ -12,4 +13,5 @@ export const en = {
12
13
templatePage,
13
14
templatesPage,
14
15
createWorkspacePage,
16
+ agent,
15
17
}
You can’t perform that action at this time.
0 commit comments