Skip to content

Commit

Permalink
Merge pull request #9 from beclab/fix/i18n
Browse files Browse the repository at this point in the history
fix: update i18n
  • Loading branch information
wushuangs authored Sep 23, 2024
2 parents 8b9f86d + b1d73c7 commit baddeed
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 10 deletions.
5 changes: 3 additions & 2 deletions packages/frontend/src/components/NeedFrpDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
/>

<div class="dialog-desc" style="textalign: left">
You may not be able to access this Terminus in other network
environments.
{{ t('message_reverse_proxy') }}
</div>

<terminus-dialog-footer
Expand All @@ -27,12 +26,14 @@
<script lang="ts" setup>
import { useDialogPluginComponent } from 'quasar';
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import TerminusDialogBar from './TerminusDialogBar.vue';
import TerminusDialogFooter from './TerminusDialogFooter.vue';
const { dialogRef, onDialogOK, onDialogHide } = useDialogPluginComponent();
const { t } = useI18n();
const show = ref(true);
const submit = async () => {
onDialogOK();
Expand Down
5 changes: 3 additions & 2 deletions packages/frontend/src/components/NotNeedFrpDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
/>

<div class="dialog-desc" style="textalign: left">
If you have a fixed IP, using Cloudflare Tunnel may reduce the access
speed.
{{ t('message_not_need_frp') }}
</div>

<terminus-dialog-footer
Expand All @@ -27,12 +26,14 @@
<script lang="ts" setup>
import { useDialogPluginComponent } from 'quasar';
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import TerminusDialogBar from './TerminusDialogBar.vue';
import TerminusDialogFooter from './TerminusDialogFooter.vue';
const { dialogRef, onDialogOK, onDialogHide } = useDialogPluginComponent();
const { t } = useI18n();
const show = ref(true);
const submit = async () => {
onDialogOK();
Expand Down
5 changes: 4 additions & 1 deletion packages/frontend/src/components/TerminusDialogBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
</div>
<q-space />
<q-btn dense flat icon="close" @click="onCancel">
<q-tooltip>Close</q-tooltip>
<q-tooltip>{{ t('close') }}</q-tooltip>
</q-btn>
</q-bar>
</template>

<script lang="ts" setup>
import { useI18n } from 'vue-i18n';
defineProps({
label: {
type: String,
Expand All @@ -30,6 +32,7 @@ defineProps({
}
});
const { t } = useI18n();
const emit = defineEmits(['close']);
const onCancel = () => {
Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/src/components/TerminusDialogFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
dense
class="but-creat row justify-center items-center q-px-md q-mr-sm"
>
Loading
{{ t('loading') }}
</q-item>
</q-card-actions>
</template>

<script lang="ts" setup>
import { useI18n } from 'vue-i18n';
defineProps({
okText: {
type: String,
Expand All @@ -52,6 +54,8 @@ defineProps({
}
});
const { t } = useI18n();
const emit = defineEmits(['close', 'submit']);
const onCancel = () => {
Expand Down
10 changes: 9 additions & 1 deletion packages/frontend/src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,13 @@ export default {
dns_failed_content: 'Retry on TermiPass',
reset_password_title: 'Resetting password...',
reset_password_content:
'Create a new Terminus login password in TermiPass app. This will invalidate your initial password.'
'Create a new Terminus login password in TermiPass app. This will invalidate your initial password.',

use_reverse_proxy: 'Use a reverse proxy',
use_not_reverse_proxy: 'Not using a reverse proxy',
message_reverse_proxy:
'Reverse proxy is required for access to Terminus in a different network.',
message_not_need_frp: 'If you have a public IP, no reverse proxy is needed.',
close: 'Close',
loading: 'Loading'
};
9 changes: 8 additions & 1 deletion packages/frontend/src/i18n/zh-CN/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,12 @@ export default {
dns_failed_content: '在 TermiPass 上重试',
reset_password_title: '正在重置密码……',
reset_password_content:
'在 TermiPass 应用中创建新的 Terminus 登录密码。这将使初始密码无效。'
'在 TermiPass 应用中创建新的 Terminus 登录密码。这将使初始密码无效。',

use_reverse_proxy: '使用反向代理',
use_not_reverse_proxy: '不使用反向代理',
message_need_frp: '网络环境已变化。建议使用反向代理访问 Terminus。',
message_not_need_frp: '如果您有固定 IP,无需选择反向代理。',
close: '关闭',
loading: '加载中'
};
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/step/Step3Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ const { t } = useI18n();
const $q = useQuasar();
const options = [
{
label: 'Not using a reverse proxy',
label: t('use_not_reverse_proxy'),
value: false
},
{
label: 'Use Cloudflare Tunnel',
label: t('use_reverse_proxy'),
value: true
}
];
Expand Down

0 comments on commit baddeed

Please sign in to comment.