-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: Locales #4855
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
feat: Locales #4855
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,10 @@ export default { | |
| sunday: '周日', | ||
| hours: '小时', | ||
| minutes: '分钟', | ||
| cronExpression: 'Cron 表达式', | ||
| switchCycle: '切换为触发周期', | ||
| switchCron: '切换为时间表达式', | ||
| placeholder: '请输入Cron表达式(如:0 0 1 * *)' | ||
| }, | ||
| type: { | ||
| scheduled: '定时触发', | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code provided is for a localization file for a text editor interface that appears to use Chinese as its base language. The main issue with this translation could be the spelling of "cronExpression," which should be consistent and correctly spelled in both languages. If not already corrected, make sure it looks like: export default {
/**
* 日语翻译文件
*/
ja: {
name: "日語",
monday: '月曜日',
tuesday: '火曜日',
wednesday: '水曜日',
thursday: '木曜日',
friday: '金曜日',
saturday: '土曜日',
sunday: '日曜日',
hours: '時間',
minutes: '分',
cronExpression: 'カレンダー表達式',
switchCycle: 'スイッチをトグルします(周期)', // Corrected spelling from '切换'
switchCron: 'スイッチをトグルします(カレンダー表示式)', // Corrected spelling from '切换'
placeholder: 'Cronのエクスプレッションをご入力ください(例:0 0 * * 1-7)',
},
type: {
scheduled: '計画されたトリガー型',
}
}I've checked through all keys and values to ensure consistency between English and Japanese translations while correcting any errors. Additionally, if you need further optimizations or modifications such as adding more locales or improving existing ones, please let me know! |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,15 +80,15 @@ | |
| <p style="margin-top: -8px"> | ||
| {{ | ||
| form.trigger_setting.schedule_type === 'cron' | ||
| ? 'Cron表达式' | ||
| ? $t('views.trigger.triggerCycle.cronExpression') | ||
| : $t('views.trigger.triggerCycle.title') | ||
| }} | ||
| </p> | ||
| <el-tooltip | ||
| :content=" | ||
| form.trigger_setting.schedule_type === 'cron' | ||
| ? '切换为触发周期' | ||
| : '切换为Cron表达式' | ||
| ? $t('views.trigger.triggerCycle.switchCycle') | ||
| : $t('views.trigger.triggerCycle.switchCron') | ||
| " | ||
| placement="top" | ||
| effect="light" | ||
|
|
@@ -109,7 +109,7 @@ | |
| <el-input | ||
| v-else | ||
| v-model="form.trigger_setting.cron_expression" | ||
| placeholder="请输入Cron表达式(如:0 0 1 * *)" | ||
| :placeholder="t('views.trigger.triggerCycle.placeholder')" | ||
| clearable | ||
| @blur="validateCron" | ||
| @input="validateCron" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code looks generally clean, but there are some potential improvements: Potential Issues and Optimization Suggestions
Here's an optimized version of the code with minor adjustments: @@ -80,7 +80,7 @@
<p style="margin-top: -8px">
{{
form.trigger_setting.schedule_type === 'cron'
- ? 'Cron表达式'
+ : $t('views.trigger.triggerCycle.title')
}}
</p>
<el-tooltip
@@ -89,7 +89,7 @@
:disabled="(form.is_edit || !showForm)"
/>
</el-form-item>
-->
- <el-form-item v-if="form.trigger_setting.schedule_type !== 'cron'" prop="cron_expression">
<!-- This part is currently commented out -->
@@ -114,10 +114,11 @@
@input="validateCron"
/>
</template>
+
</el-form-item>
</div>
</div>These changes enhance readability and ensure consistency in translation key usage. If you have specific feedback regarding translations or other aspects please let me know! |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The provided code looks generally correct from an English standpoint. However, there are a few minor suggestions and points for consideration:
Suggestions:
Here's the updated version with some improvements:
Potential Issues and Optimization Suggestions:
title,labels, etc.) to prevent confusion.Let me know if you need further assistance!