File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 3636 'tools' : 'Cryptography toolbox prepared for novice (WIP)' ,
3737 'visualize' : 'Visualize cryptographic algorithm(WIP)' ,
3838 } ,
39+ 'lab' : {
40+ 'endpoint' : 'Endpoint ' ,
41+ 'clear' : 'Clear'
42+ } ,
3943 'wip' : 'Work In Progress' ,
4044 i18n : {
4145 'en-US' : 'English' ,
6771 'visualize' : '图解密码学算法(施工中)' ,
6872 } ,
6973 'wip' : '施工中' ,
74+ 'lab' : {
75+ 'endpoint' : '服务器 ' ,
76+ 'clear' : '关闭所有'
77+ } ,
7078 i18n : {
7179 'en-US' : '英文' ,
7280 'zh-CN' : '简体中文'
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ interface Match {
4646}
4747
4848export const Page : React . FC = ( ) => {
49- const { i18n } = useTranslation ( )
49+ const { t , i18n } = useTranslation ( )
5050 const language = i18n . language
5151 const { params : { category, lab } } = useRouteMatch < Match > ( )
5252 const query = useLabQuery ( {
@@ -72,10 +72,10 @@ export const Page: React.FC = () => {
7272 setTermianls ( terminals . concat ( [ endpoint ] ) )
7373 }
7474 }
75- return < Button key = { id } onClick = { onClick } intent = { Intent . PRIMARY } outlined = { true } > { endpoint . host } </ Button >
75+ return < Button key = { id } onClick = { onClick } intent = { Intent . PRIMARY } outlined = { true } > { t ( 'lab. endpoint' ) + id . toString ( ) } </ Button >
7676 } )
7777 }
78- < Button onClick = { ( ) => setTermianls ( [ ] ) } intent = { Intent . DANGER } outlined = { true } > clear</ Button >
78+ < Button onClick = { ( ) => setTermianls ( [ ] ) } intent = { Intent . DANGER } outlined = { true } > { t ( 'lab. clear' ) } </ Button >
7979 </ EndpointContainer >
8080 </ >
8181 } )
You can’t perform that action at this time.
0 commit comments