Skip to content

Commit

Permalink
perf: i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Jun 15, 2023
1 parent 7daa5e9 commit b01da67
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
15 changes: 9 additions & 6 deletions frontend/providers/applaunchpad/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
"Pause": "Pause",
"Restart": "Restart",
"Update": "Update",
"Application Type": "Application Type",
"Application Type": "Type",
"Basic Information": "Basic Information",
"Deployment Mode": "Instance",
"Advanced Configuration": "Advanced",
"Command": "Command",
"Parameters": "Parameters",
"Not Configured": "Not Configured",
"Accessible to the Public": "Accessible to the Public",
"Configuration File": "Files",
"Configuration File": "Configmap",
"Storage": "Storage",
"Environment Variables": "Environment Variables",
"Environment Variables": "Environment",
"Replicas": "Replicas",
"Image Name": "Image Name",
"Private": "Private",
Expand Down Expand Up @@ -87,12 +87,12 @@
"file": "file",
"Image": "Image",
"App Name": "App Name",
"Basic Config": "Basics",
"Basic Config": "Basic",
"YAML File": "YAML",
"filename": "filename",
"file value": "file value",
"local storage": "Local Storage",
"multiple instances do not share data": "multiple instances do not share data",
"multiple instances do not share data": "volume does not support shared access by multiple instances",
"capacity": "capacity",
"mount path": "mount path",
"Container Ports": "Container Ports",
Expand All @@ -118,5 +118,8 @@
"websocket": "websocket",
"TotalPrice": "Total",
"Day": "Day",
"AnticipatedPrice": "Anticipated Price"
"AnticipatedPrice": "Anticipated Price",
"Pods List": "Pods List",
"Number of Instances": "Number of Instances",
"Restarts Num": "Restarts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,11 @@
"websocket": "websocket",
"TotalPrice": "总价",
"Day": "",
"AnticipatedPrice": "预估价格"
"AnticipatedPrice": "预估价格",
"Pods List": "实例列表",
"Number of Instances": "实例数",
"Pod Name": "实例名",
"Restarts Num": "重启次数",
"Age": "启动时长",
"Items": "个实例"
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const AppBaseInfo = ({ app = MOCK_APP_DETAIL }: { app: AppDetailType }) => {
_hover={{ backgroundColor: 'transparent' }}
>
<Box flex={1} color={'blackAlpha.800'}>
ConfigMap {t('Configuration File')}
{t('Configuration File')}
</Box>
<AccordionIcon />
</AccordionButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Pods = ({
console.log(err);
}
},
[toast]
[t, toast]
);

const columns: {
Expand All @@ -81,12 +81,12 @@ const Pods = ({
)
},
{
title: 'status',
title: 'Status',
key: 'status',
render: (item: PodDetailType) => <Box color={item.status.color}>{item.status.label}</Box>
},
{
title: 'Restarts',
title: 'Restarts Num',
key: 'restarts',
dataIndex: 'restarts'
},
Expand Down Expand Up @@ -114,7 +114,7 @@ const Pods = ({
)
},
{
title: 'control',
title: 'Operation',
key: 'control',
render: (item: PodDetailType, i: number) => (
<Flex>
Expand Down Expand Up @@ -191,9 +191,11 @@ const Pods = ({
<Flex px={6} alignItems={'center'}>
<MyIcon name="podList" w={'14px'} color={'myGray.500'} />
<Box ml={3} flex={1} color={'myGray.600'}>
Pods List
{t('Pods List')}
</Box>
<Box color={'myGray.500'}>
{pods.length} {t('Items')}
</Box>
<Box color={'myGray.500'}>{pods.length} Items</Box>
</Flex>
<TableContainer mt={5} overflow={'auto'}>
<Table variant={'simple'} backgroundColor={'white'}>
Expand All @@ -207,7 +209,7 @@ const Pods = ({
backgroundColor={'#F8F8FA'}
fontWeight={'500'}
>
{item.title}
{t(item.title)}
</Th>
))}
</Tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,7 @@ const Form = ({
<Divider my={'24px'} bg={'myGray.100'} />

<Box>
<Box className={styles.formSecondTitle}>
Configmap {t('Configuration File')}
</Box>
<Box className={styles.formSecondTitle}>{t('Configuration File')}</Box>
{configMaps.map((item, index) => (
<Flex key={item.id} _notLast={{ mb: 5 }} alignItems={'center'}>
<Flex
Expand Down Expand Up @@ -782,7 +780,7 @@ const Form = ({
leftIcon={<MyIcon name="plus" />}
w={'320px'}
>
{t('Add')} configmap
{t('Add')} {t('Configuration File')}
</Button>
</Box>

Expand Down

0 comments on commit b01da67

Please sign in to comment.