File tree Expand file tree Collapse file tree 5 files changed +47
-6
lines changed Expand file tree Collapse file tree 5 files changed +47
-6
lines changed Original file line number Diff line number Diff line change 3333 </NFormItem >
3434
3535 <NDivider style =" margin : 12px 0 8px 0 ;" />
36- <NH4 style =" margin : 0 0 12px 0 ; font-size : 14px ;" >提供商配置 </NH4 >
36+ <NH4 style =" margin : 0 0 12px 0 ; font-size : 14px ;" >{{ t('modelManager.provider.section') }} </NH4 >
3737
38- <NFormItem label =" 提供商 " >
38+ <NFormItem : label =" t('modelManager.provider.label') " >
3939 <NSelect
4040 v-model:value =" form.providerId"
4141 :options =" providerOptions"
4242 :loading =" isLoadingProviders"
43- placeholder =" 选择提供商 "
43+ : placeholder =" t('modelManager.provider.placeholder') "
4444 @update:value =" onProviderChange"
4545 required
4646 />
8282 </NFormItem >
8383
8484 <NDivider style =" margin : 12px 0 8px 0 ;" />
85- <NH4 style =" margin : 0 0 12px 0 ; font-size : 14px ;" >模型配置 </NH4 >
85+ <NH4 style =" margin : 0 0 12px 0 ; font-size : 14px ;" >{{ t('modelManager.model.section') }} </NH4 >
8686
8787 <NFormItem :label =" t('modelManager.selectModel')" >
8888 <NSpace align =" center" style =" width : 100% ;" >
Original file line number Diff line number Diff line change @@ -732,6 +732,15 @@ export default {
732732 addModel : "Add" ,
733733 addImageModel : "Add Image Model" ,
734734
735+ provider : {
736+ section : "Provider Configuration" ,
737+ label : "Provider" ,
738+ placeholder : "Select Provider" ,
739+ } ,
740+ model : {
741+ section : "Model Configuration" ,
742+ } ,
743+
735744 // Advanced Parameters
736745 advancedParameters : {
737746 title : "Advanced Parameters" ,
Original file line number Diff line number Diff line change @@ -713,6 +713,15 @@ export default {
713713 addModel : "添加" ,
714714 addImageModel : "添加图像模型" ,
715715
716+ provider : {
717+ section : "提供商配置" ,
718+ label : "提供商" ,
719+ placeholder : "选择提供商" ,
720+ } ,
721+ model : {
722+ section : "模型配置" ,
723+ } ,
724+
716725 // 高级参数
717726 advancedParameters : {
718727 title : "高级参数" ,
Original file line number Diff line number Diff line change @@ -712,6 +712,15 @@ export default {
712712 addModel : "新增" ,
713713 addImageModel : "新增圖像模型" ,
714714
715+ provider : {
716+ section : "提供商配置" ,
717+ label : "提供商" ,
718+ placeholder : "選擇提供商" ,
719+ } ,
720+ model : {
721+ section : "模型配置" ,
722+ } ,
723+
715724 // 進階參數
716725 advancedParameters : {
717726 title : "進階參數" ,
Original file line number Diff line number Diff line change 1515 * along with this program. If not, see <https://www.gnu.org/licenses/>.
1616 */
1717
18- import { createApp } from 'vue'
19- import { installI18nOnly } from '@prompt-optimizer/ui'
18+ import { createApp , watch } from 'vue'
19+ import { installI18nOnly , i18n } from '@prompt-optimizer/ui'
2020import App from './App.vue'
2121
2222import '@prompt-optimizer/ui/dist/style.css'
2323
2424const app = createApp ( App )
2525// 只安装i18n插件,语言初始化将在App.vue中服务准备好后进行
2626installI18nOnly ( app )
27+
28+ // 同步文档标题和语言属性
29+ if ( typeof document !== 'undefined' ) {
30+ const syncDocumentTitle = ( ) => {
31+ document . title = i18n . global . t ( 'common.appName' )
32+ const currentLocale = String ( i18n . global . locale . value || '' )
33+ const htmlLang = currentLocale . startsWith ( 'zh' ) ? 'zh' : 'en'
34+ document . documentElement . setAttribute ( 'lang' , htmlLang )
35+ }
36+
37+ syncDocumentTitle ( )
38+ watch ( i18n . global . locale , syncDocumentTitle )
39+ }
40+
2741app . mount ( '#app' )
2842
2943// 只在Vercel环境中加载Analytics
You can’t perform that action at this time.
0 commit comments