Skip to content

Commit

Permalink
fix i18 special character
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Apr 17, 2024
1 parent b606af0 commit a7f639c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/renderer/src/locales/lang/en_US/pages/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export default {
placeholder: {
general: 'Please enter the content',
startPage: 'Please enter the start page path, such as /home/',
paramsPath: 'path',
paramsPasswd: 'password',
params: '{\n\t"path": { "password": "password" }\n}',
manualTip: 'Example of M3U:\n#EXTM3U\n#EXTINF:-1,Channel\nhttps://channel-url\n\nExample of genre\nChannel,https://channel-url',
groupTip: 'Please select a group',
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/src/locales/lang/zh_CN/pages/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export default {
placeholder: {
general: '请输入内容',
startPage: '请输入起始页路径, 例如/home/',
paramsPath: '路径',
paramsPasswd: '密码',
params: `{\n\t"路径": { "password": "密码" }\n}`,
manualTip: 'M3u格式示例:\n#EXTM3U\n#EXTINF:-1,Channel\nhttps://channel-url\n\ngenre格式示例\nChannel,https://channel-url',
groupTip: '请选择分组',
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/pages/setting/drive/DriveSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<dialog-add-view v-model:visible="isVisible.dialogAdd" @refresh-table-data="refreshEvent" />
<dialog-edit-view v-model:visible="isVisible.dialogEdit" :data="formData" />
<dialog-ali-auth-view v-model:visible="isVisible.dialogAliAuth" />
<!-- <dialog-ali-auth-view v-model:visible="isVisible.dialogAliAuth" /> -->
</div>
</template>

Expand Down
8 changes: 6 additions & 2 deletions src/renderer/src/pages/setting/drive/components/DialogAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<t-textarea
v-model="formData.params"
class="input-item input-textarea"
:placeholder="$t('pages.setting.placeholder.params')"
:placeholder="tip"
:autosize="{ minRows: 3, maxRows: 3 }"
/>
</t-form-item>
Expand All @@ -51,16 +51,20 @@

<script setup lang="ts">
import { MessagePlugin } from 'tdesign-vue-next';
import { ref, reactive, watch } from 'vue';
import { computed, ref, reactive, watch } from 'vue';
import { addDriveItem } from '@/api/drive';
import { t } from '@/locales';
const props = defineProps({
visible: {
type: Boolean,
default: false,
},
});
const tip = computed(() => {
return `{\n\t"${t('pages.setting.placeholder.paramsPath')}": { "password": "${t('pages.setting.placeholder.paramsPasswd')}" }\n}`
})
const formVisible = ref(false);
const formData = reactive({
name: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<t-textarea
v-model="formData.params"
class="input-item input-textarea"
:placeholder="$t('pages.setting.placeholder.params')"
:placeholder="tip"
:autosize="{ minRows: 3, maxRows: 3 }"
/>
</t-form-item>
Expand All @@ -51,7 +51,8 @@

<script setup lang="ts">
import { MessagePlugin } from 'tdesign-vue-next';
import { ref, watch } from 'vue';
import { computed, ref, watch } from 'vue';
import { t } from '@/locales';
import { updateDriveItem } from '@/api/drive';
Expand All @@ -67,6 +68,9 @@ const props = defineProps({
},
},
});
const tip = computed(() => {
return `{\n\t"${t('pages.setting.placeholder.paramsPath')}": { "password": "${t('pages.setting.placeholder.paramsPasswd')}" }\n}`
})
const formVisible = ref(false);
const formData = ref(props.data);
Expand Down

0 comments on commit a7f639c

Please sign in to comment.