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

feat: Improve international language and style #7697

Merged
merged 1 commit into from
Jan 10, 2025
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
2 changes: 1 addition & 1 deletion frontend/src/components/router-button/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<el-card class="router_card p-1 sm:p-0">
<div class="flex w-full flex-col justify-start sm:items-center items-start sm:justify-between sm:flex-row">
<el-radio-group v-model="activeName" @change="handleChange">
<el-radio-group v-model="activeName" @change="handleChange" class="flex-1">
<el-radio-button
class="router_card_button"
:label="button.label"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main code difference you've highlighted is that the el-radio-button elements now have a class of flex-1, which may not be necessary or cause unintended layout issues. Here's my review:

  1. Class Usage: The use of flex-1 on the <div> wrapping the radio buttons suggests this might be unnecessary if it was intended to center the radios horizontally within their container. However, without additional context (like CSS styles or other siblings), it could lead to unexpected behavior.

  2. Potential Issues:

    • If there were specific reasons why using flex-1 was intended, they should be documented. Without that documentation, relying solely on class-based styling can be risky.
    • Ensure that this change doesn't inadvertently affect the responsive design at smaller screen sizes due to changes in layout behavior.
  3. Optimization Suggestions:

    • Remove the unused class from the <div>. This simplifies the HTML structure and makes the code cleaner.
    • Consider providing inline styles instead if adding the extra space is intentional and needed for alignment purposes.
    • Double-check any CSS overrides affecting the child radio buttons to ensure the default spacing behaves as expected.
  4. Code Improvement:

     <temple>
         <el-card class="router_card p-1 sm:p-0">
             <!-- Removed the unwanted class -->
             <div class="flex w-full flex-col justify-start sm:items-center items-star sm:justify-between sm:flex-row">
  
In general, always aim to minimize complexity and redundancy in your code, especially when making structural adjustments like adding new classes. It helps maintain clarity and reduces the likelihood of bugs down the line.

Expand Down
10 changes: 5 additions & 5 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const message = {
saveAndEnable: '保存して有効にします',
import: '輸入',
search: '検索',
refresh: 'リフレッシュします',
refresh: 'リロード',
get: '得る',
upgrade: 'アップグレード',
ignore: 'アップグレードを無視します',
Expand Down Expand Up @@ -1184,7 +1184,7 @@ const message = {
editPermissions: '編集@:file.mode',
owner: '所有者',
file: 'ファイル',
remoteFile: 'リモコンからダウンロードしてください',
remoteFile: 'リモートダウンロード',
share: '共有',
sync: 'データ同期',
size: 'サイズ',
Expand Down Expand Up @@ -1283,9 +1283,9 @@ const message = {
clashOpenAlert: '「リサイクルビン」ボタンをクリックして、リサイクルビンディレクトリを開きます',
right: 'フォワード',
back: '戻る',
top: '戻って行きます',
refresh: 'リフレッシュします',
up: '戻って行きます',
top: '戻る',
refresh: 'リロード',
up: '戻る',
openWithVscode: 'VSコードで開く',
vscodeHelper:
'VSコードがローカルにインストールされ、SSHリモートプラグインが構成されていることを確認してください',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look generally appropriate for a translation file, with some minor corrections to clarify text:

  1. Changed "リフレッシュします" (refresh) to "リロード".
  2. Added missing space after "戻って行きます."
  3. Corrected "戻って行きます" again where it was incorrectly translated twice.
  4. Fixed typos like "@:file.mode" becoming "編集@:file.mode."

Overall, the text is clear and maintains consistency across the translation strings.

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ const message = {
editPermissions: '@:file.mode',
owner: 'Владелец',
file: 'Файл',
remoteFile: 'Скачать с удаленного сервера',
remoteFile: 'Удалённая загрузка',
share: 'Поделиться',
sync: 'Синхронизация данных',
size: 'Размер',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/mysql/conn/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
prop="password"
>
<el-input
style="width: calc(100% - 167px)"
style="width: calc(100% - 205px)"
type="password"
show-password
clearable
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/postgresql/conn/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
prop="password"
>
<el-input
style="width: calc(100% - 147px)"
style="width: calc(100% - 205px)"
type="password"
show-password
clearable
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/redis/conn/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<el-divider border-style="dashed" />
<el-form-item :label="$t('commons.login.password')" v-if="form.from === 'local'" prop="password">
<el-input
style="width: calc(100% - 147px)"
style="width: calc(100% - 205px)"
type="password"
show-password
clearable
Expand Down
1 change: 1 addition & 0 deletions frontend/src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ onBeforeUnmount(() => {
font-size: 13px !important;
border: none !important;
width: 100% !important;
line-height: normal !important;
}

.monitor-tags {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/host/file-management/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,12 @@
</div>
</template>
</el-table-column>
<el-table-column :label="$t('file.mode')" prop="mode" max-width="50" min-width="110px">
<el-table-column :label="$t('file.mode')" prop="mode" min-width="110">
<template #default="{ row }">
<el-link :underline="false" @click="openMode(row)">{{ row.mode }}</el-link>
</template>
</el-table-column>
<el-table-column :label="$t('commons.table.user')" prop="user" show-overflow-tooltip>
<el-table-column :label="$t('commons.table.user')" prop="user" show-overflow-tooltip min-width="90">
<template #default="{ row }">
<el-link :underline="false" @click="openChown(row)">
{{ row.user ? row.user : '-' }} ({{ row.uid }})
Expand All @@ -405,7 +405,7 @@
</el-link>
</template>
</el-table-column>
<el-table-column :label="$t('file.size')" prop="size" max-width="50" sortable>
<el-table-column :label="$t('file.size')" prop="size" min-width="100" sortable>
<template #default="{ row, $index }">
<span v-if="row.isDir">
<el-button
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no major discrepancies between the lines highlighted. The minor adjustments focus on optimizing the minimum widths of table columns to ensure better readability and performance, especially with varying data sizes.

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/setting/panel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:model="form"
:label-position="mobile ? 'top' : 'left'"
label-width="auto"
class="sm:w-full md:w-4/5 lg:w-3/5 2xl:w-1/2 max-w-max"
class="sm:w-full md:w-4/5 lg:w-3/5 2xl:w-1/2 max-w-max ml-8"
>
<el-form-item :label="$t('setting.user')" prop="userName">
<el-input disabled v-model="form.userName">
Expand Down
Loading
Loading