Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: optimize i18n English translations #5191

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions frontend/desktop/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"account_settings": "Account Settings",
"added": "Added",
"agree_policy": "I have read and agree to the",
"alarm_pod": "Alarm Pod: {{count}}",
"alarm_pod": "Unhealthy Pods: {{count}}",
"alerts": "Alerts",
"all_apps": "All Apps",
"already_sent_code": "Already sent code",
Expand All @@ -19,7 +19,7 @@
"attachment": "appendix",
"avatar": "Avatar",
"balance": "Balance",
"bind": "Bind",
"bind": "Link",
"bind_success": "Binding successful",
"bonus": "Bonus",
"bound": "Bound",
Expand Down Expand Up @@ -70,13 +70,13 @@
"enterprise_name": "Company name",
"enterprise_name_required": "Please enter the correct company name",
"enterprise_verification": "Enterprise real name",
"expected_to_use_next_month": "Expected to use next month",
"expected_used": "Expected used",
"expected_to_use_next_month": "Estimated Next Invoice",
"expected_used": "Estimated Runaway",
"face_recognition_failed": "Personal real name failed",
"face_recognition_success": "Personal real-name success",
"failed_to_generate_invitation_link": "Failed to generate invitation link",
"failed_to_get_qr_code": "Failed to obtain real name QR code",
"flow": "Traffic",
"flow": " Network",
"force_delete_keywords": "All resources cannot be recovered after account deletion.",
"force_delete_tips": "There are still undeleted resources in your account. Once deleted, all resources will be unrecoverable. Please ensure you have backed up or transferred all important data.",
"from": "From",
Expand All @@ -91,7 +91,7 @@
"guide_objectstorage": "Massive storage space, almost bare metal speed experience",
"handle": "Handle",
"have_read": "Have read",
"healthy_pod": "Healthy Pod: {{count}}",
"healthy_pod": "Healthy Pods: {{count}}",
"hello_welcome": "Hello, welcome to",
"help_you_enable_high_availability_database": "Help you enable high availability database",
"home": "home",
Expand Down Expand Up @@ -125,15 +125,15 @@
"login_with_google": "Login with Google",
"login_with_oauth2": "login with OAuth2.0",
"login_with_wechat": "Login with Wechat",
"manage_team": "Manage Workspace",
"manage_team": "Manage Workspaces",
"member_list": "Member List",
"memory": "Memory",
"merge": "merge",
"merge_account_tips1": "The account you are trying to bind has been used by another user. Due to conflicting binding methods, the accounts cannot be merged.",
"merge_account_tips2": "The account you are trying to bind has been used by another user. You can choose to merge accounts to manage your information and settings in a unified way. After the merge is completed, your private workspace may be converted into a regular workspace. Do you want to merge accounts now?",
"merge_account_title": "Account has been bound",
"message_center": "Message Center",
"modify_member": "Modify Member",
"modify_member": "Modify Member",
"monitor": "Monitor",
"more_apps": "More Apps",
"name": "Name",
Expand All @@ -147,7 +147,7 @@
"nickname": "Nickname",
"no_apps_found": "No Apps Found",
"no_realname_auth": "NO REALNAME AUTH",
"notification": "notify",
"notification": "Notification",
"noworkspacecreated": "You haven't created a workspace yet",
"official_account_login": "Official account login",
"old_email": "Old email",
Expand Down Expand Up @@ -233,12 +233,12 @@
"total_amount": "Total Amount",
"unbind": "Unbind",
"unbind_success": "Unbinding successfully",
"unbound": "Unbound",
"unbound": "Not Linked",
"under_active_development": "Under active development 🚧",
"unread": "Unread",
"upload_success": "Upload successful",
"used_last_month": "Used last month",
"used_resources": "Used Resources",
"used_last_month": " Last Invoice",
"used_resources": "Resources Used",
"user_name": "User Name",
"username": "Username",
"username_tips": "Username must be 3-16 characters, including letters, numbers",
Expand Down Expand Up @@ -267,4 +267,4 @@
"you_can_view_fees_through_the_fee_center": "You can view fees through the fee center",
"you_have_not_purchased_the_license": "You have not purchased the License",
"yuan": "Yuan"
}
}
6 changes: 3 additions & 3 deletions frontend/desktop/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"account_settings": "账户设置",
"added": "已加入",
"agree_policy": "我已阅读并同意",
"alarm_pod": "告警 Pod: {{count}}",
"alarm_pod": "告警 Pods: {{count}}",
"alerts": "告警",
"all_apps": "所有应用",
"already_sent_code": "已经发送验证码",
Expand Down Expand Up @@ -88,7 +88,7 @@
"guide_objectstorage": "海量存储空间,近乎裸机的速度体验",
"handle": "操作",
"have_read": "已读",
"healthy_pod": "健康 Pod: {{count}}",
"healthy_pod": "健康 Pods: {{count}}",
"hello_welcome": "您好, 欢迎来到",
"help_you_enable_high_availability_database": "帮您启用高可用数据库",
"home": "首页",
Expand Down Expand Up @@ -260,4 +260,4 @@
"you_can_view_fees_through_the_fee_center": "您可通过费用中心查看费用",
"you_have_not_purchased_the_license": "您还没有购买 License",
"yuan": "元"
}
}
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default function Account() {
py={'12px'}
px={'16px'}
>
<Text>kubeconfig</Text>
<Text>Kubeconfig</Text>
<Flex alignItems={'center'}>
<IconButton
variant={'white-bg-icon'}
Expand Down
8 changes: 5 additions & 3 deletions frontend/desktop/src/components/desktop_content/monitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function Monitor({ needStyles = true }: { needStyles?: boolean })
</Flex>
)}

<Flex alignItems={'center'} mt={'12px'} gap={'20px'}>
<Flex alignItems={'center'} mt={'12px'} gap={'12px'}>
<CircularProgress
size={'90px'}
trackColor={runningPodPercentage === 0 ? '#FFFFFF33' : '#FF8398'}
Expand All @@ -81,11 +81,13 @@ export default function Monitor({ needStyles = true }: { needStyles?: boolean })
>
<Flex alignItems={'center'} gap={'8px'}>
<Box bg={'#2BE0B3'} w={'7px'} h={'7px'} borderRadius={'2px'}></Box>
<Text>{t('common:healthy_pod', { count: runningPodCount })}</Text>
<Text fontSize={'11px'}>{t('common:healthy_pod', { count: runningPodCount })}</Text>
</Flex>
<Flex alignItems={'center'} gap={'8px'}>
<Box bg={'#FF8398'} w={'7px'} h={'7px'} borderRadius={'2px'}></Box>
<Text>{t('common:alarm_pod', { count: totalPodCount - runningPodCount })}</Text>
<Text fontSize={'11px'}>
{t('common:alarm_pod', { count: totalPodCount - runningPodCount })}
</Text>
</Flex>
</Flex>
</Flex>
Expand Down
22 changes: 13 additions & 9 deletions frontend/providers/applaunchpad/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"Active": "Active",
"Add": "Add",
"Add Port": "Add Port",
"Add volume": "Add Storage",
"Advanced Configuration": "Advanced Config",
"Add volume": "Add Volumes",
"Advanced Configuration": "Advanced Configuration",
"Age": "Age",
"Amount": "Amount",
"AnticipatedPrice": "The Estimated Cost",
Expand All @@ -30,11 +30,11 @@
"Auto scaling": "Scaling",
"Balance": "Balance",
"Basic Config": "Basic",
"Basic Information": "Basic",
"Basic Information": "Basic Infomation",
"Can help you deploy any Docker image": "Rich image warehouse, supporting any Docker image",
"Can not change storage path": "Storage mount path cannot be modified",
"Cancel": "Cancel",
"capacity": "capacity",
"capacity": "Capacity",
"Card": "cards",
"Click on any shadow to skip": "Click on any shadow to skip",
"Click the Deploy Application button": "Click \\\"Deploy Application\\\"",
Expand Down Expand Up @@ -72,14 +72,14 @@
"Creation Time": "Created At",
"Custom Domain": "Custom Domain",
"Custom Domain Error": "Failed to add custom domain. Please verify CNAME configuration.",
"Data cannot be communicated between multiple instances": "Data is not shared between instances",
"Data cannot be communicated between multiple instances": "Data cannot be shared between instances",
"Day": "Day",
"Delete": "Delete",
"Deletion warning": "Deletion warning",
"Deploy": "Deploy",
"Deploy Application": "Deploy Application",
"Deployment Failed": "Deployment Failed",
"Deployment Mode": "Deployment Mode",
"Deployment Mode": "Deployment Infomation",
"Deployment Successful": "Deployment succeeded",
"Details": "Details",
"download": "Download",
Expand Down Expand Up @@ -107,7 +107,7 @@
"Group": "Group",
"grpcs": "gRPCS",
"https": "HTTPS",
"If no, the default command is used": "Leave blank to use default command",
"If no, the default command is used": "Leave blank to use the default command",
"Image": "Image",
"Image Address": "Image Registry",
"Image Name": "Image Name",
Expand All @@ -129,7 +129,7 @@
"Memory": "Memory",
"Memory target value": "Target Memory Usage",
"Min Storage Value": "Minimum size is",
"mount path": "Mount path",
"mount path": "Mount Path",
"Mount Path Auth": "Mount path must match: /^[0-9a-zA-Z_/][0-9a-zA-Z_/.-]*[0-9a-zA-Z_/]$/",
"Name": "Name",
"Network Configuration": "Network",
Expand Down Expand Up @@ -272,5 +272,9 @@
"first_charge_tip": "For some specifications, you can enjoy double the gift amount when you recharge for the first time.",
"gift": "gift",
"balance": "balance",
"guide_deploy_button": "Complete creation and get it now"
"guide_deploy_button": "Complete creation and get it now",
"form": {
"add_configmap": "Add Configmaps",
"storage_path_placeholder": "For Example: /data"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,9 @@
"first_charge_tip": "部分规格首次充值可享双倍赠送金额",
"gift": "",
"balance": "余额",
"guide_deploy_button": "完成创建,立即获得"
"guide_deploy_button": "完成创建,立即获得",
"form": {
"add_configmap": "新增配置文件",
"storage_path_placeholder": "如:/data"
}
}
4 changes: 2 additions & 2 deletions frontend/providers/applaunchpad/src/constants/editApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const defaultEditVal: AppEditType = {
runCMD: '',
cmdParam: '',
replicas: 1,
cpu: 1000,
memory: 1024,
cpu: 200,
memory: 256,
networks: [
{
networkName: '',
Expand Down
4 changes: 2 additions & 2 deletions frontend/providers/applaunchpad/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const App = ({ Component, pageProps }: AppProps) => {
</Head>
<QueryClientProvider client={queryClient}>
<ChakraProvider theme={theme}>
{/* <button
<button
onClick={() => {
const lastLang = getLangStore();
let lang = lastLang === 'en' ? 'zh' : 'en';
Expand All @@ -196,7 +196,7 @@ const App = ({ Component, pageProps }: AppProps) => {
}}
>
changeLanguage
</button> */}
</button>
<Component {...pageProps} />
<ConfirmChild />
<Loading loading={loading} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,8 @@ const Form = ({
<Box>{t('Advanced Configuration')}</Box>
<Center
bg={'grayModern.200'}
w={'48px'}
minW={'48px'}
px={'8px'}
height={'28px'}
ml={'14px'}
fontSize={'11px'}
Expand Down Expand Up @@ -1056,8 +1057,7 @@ const Form = ({
onClick={() => setConfigEdit({ mountPath: '', value: '' })}
leftIcon={<MyIcon name="plus" w={'16px'} fill="#485264" />}
>
{t('Add')}
{t('Configuration File')}
{t('form.add_configmap')}
</Button>
</Flex>
<Box mt={4} pl={`${labelWidth}px`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const StoreModal = ({
</Box>
<Input
width={'100%'}
placeholder="如:/data"
placeholder={t('form.storage_path_placeholder')}
title={
isEditStore
? t('Can not change storage path') || 'Can not change storage path'
Expand Down
Loading
Loading