feat(i18n): 支持系统中英文切换

为页面、菜单及提示接入中英文资源,保留业务值和导出中文标题,以支持用户切换界面语言。
This commit is contained in:
2026-11-02 11:16:43 +08:00
parent 4bc1da6491
commit e30bb4b1b7
859 changed files with 91079 additions and 11959 deletions
+67 -64
View File
@@ -1,10 +1,13 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainMenu_TestRun.aspx.cs" Inherits="FineUIPro.Web.mainMenu_TestRun" %>
<!DOCTYPE html>
<html>
<html lang="<%= FineUIPro.Web.UiLanguage.Current == "en" ? "en" : "zh-CN" %>">
<head id="Head1" runat="server">
<script src="<%= ResolveUrl("~/common/UiResources.ashx?module=Common") %>"></script>
<script src="<%= ResolveUrl("~/res/js/i18n.js") %>"></script>
<link rel="stylesheet" href="<%= ResolveUrl("~/res/css/i18n.css") %>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页</title>
<title><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_首页 %>" /></title>
<link href="../res/index/css/reset.css" rel="stylesheet" />
<link href="../res/index/css/home.css" rel="stylesheet" />
<link href="../res/index/css/swiper-3.4.2.min.css" rel="stylesheet" />
@@ -79,11 +82,11 @@
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="1">
<div class="t-item active">施工分包商</div>
<div class="t-item active"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_施工分包商 %>" /></div>
<div class="spline"></div>
<div class="t-item ">单位工程</div>
<div class="t-item "><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_单位工程 %>" /></div>
<div class="spline"></div>
<div class="t-item">专业</div>
<div class="t-item"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_专业 %>" /></div>
</div>
</div>
<div class="bw-item-content">
@@ -97,11 +100,11 @@
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="2">
<div class="t-item active">施工分包商</div>
<div class="t-item active"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_施工分包商 %>" /></div>
<div class="spline"></div>
<div class="t-item ">单位工程</div>
<div class="t-item "><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_单位工程 %>" /></div>
<div class="spline"></div>
<div class="t-item">专业</div>
<div class="t-item"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_专业 %>" /></div>
</div>
</div>
<div class="bw-item-content">
@@ -119,13 +122,13 @@
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="3">
<div class="t-item active">施工分包商</div>
<div class="t-item active"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_施工分包商 %>" /></div>
<div class="spline"></div>
<div class="t-item ">单位工程</div>
<div class="t-item "><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_单位工程 %>" /></div>
<div class="spline"></div>
<div class="t-item">专业</div>
<div class="t-item"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_专业 %>" /></div>
<div class="spline"></div>
<div class="t-item">问题类别</div>
<div class="t-item"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_问题类别 %>" /></div>
</div>
</div>
<div class="bw-item-content">
@@ -139,9 +142,9 @@
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="4">
<div class="t-item active">主项</div>
<div class="t-item active"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_主项 %>" /></div>
<div class="spline"></div>
<div class="t-item">专业</div>
<div class="t-item"><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_专业 %>" /></div>
</div>
</div>
<div class="bw-item-content">
@@ -155,14 +158,14 @@
<div class="bottom-wrap">
<div class="bw-b-bottom-up bottom-list">
<div class="bl-left">
<div>质量控制点:总数量200,已完成178,未完成22,完成百分比89%</div>
<div>质量问题:总数量100,已完成84,未完成16,完成百分比84%</div>
<div>设计变更:总数量65,已完成52,未完成13,完成百分比80%</div>
<div><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_质量控制点_总数量200_已完成178_未完成22_完成百分比89 %>" /></div>
<div><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_质量问题_总数量100_已完成84_未完成16_完成百分比84 %>" /></div>
<div><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_设计变更_总数量65_已完成52_未完成13_完成百分比80 %>" /></div>
</div>
<div class="bl-right">
<div>工程联系单:总数量65,已完成56,未完成9 </div>
<div>工作联系单:总数量42,已完成35,未完成7 </div>
<div>施工方案:总数量34,已完成30,未完成4 </div>
<div><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_工程联系单_总数量65_已完成56_未完成9 %>" /> </div>
<div><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_工作联系单_总数量42_已完成35_未完成7 %>" /> </div>
<div><asp:Literal runat="server" Mode="Encode" Text="<%$ Resources:UiText, T_施工方案_总数量34_已完成30_未完成4 %>" /> </div>
</div>
</div>
</div>
@@ -179,7 +182,7 @@
var option = {
title: {
// left:'center',
text: '质量验收一次合格率 施工资料同步率',
text: SGGLI18n.t("T_质量验收一次合格率_施工资料同步率"),
textStyle: {
color: '#fff',
fontWeight: 'normal',
@@ -252,13 +255,13 @@
var xArr = ["分包一", "分包二"]
var data = [
{
name: '质量一次性合格率',
name: SGGLI18n.t("T_质量一次性合格率"),
type: 'bar',
data: [0.85, 0.82],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
name: SGGLI18n.t("T_施工资料同步率"),
type: 'bar',
data: [0.69, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
@@ -274,7 +277,7 @@
var option = {
title: {
// left:'center',
text: '施工进度',
text: SGGLI18n.t("T_施工进度"),
textStyle: {
color: '#fff',
fontWeight: 'normal',
@@ -347,26 +350,26 @@
var xArr = ["分包一", "分包二", "分包三"]
var data = [
{
name: '计划值',
name: SGGLI18n.t("T_计划值"),
type: 'bar',
data: [0.23, 0.35, 0.42],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
name: SGGLI18n.t("T_实际值"),
type: 'bar',
data: [0.2, 0.28, 0.35],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
name: SGGLI18n.t("T_累计计划值"),
type: 'line',
smooth: true,
data: [0.23, 0.58, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
name: SGGLI18n.t("T_累计实际值"),
type: 'line',
smooth: true,
data: [0.2, 0.48, 0.83],
@@ -383,7 +386,7 @@
var option = {
title: {
// left:'center',
text: '设计变更',
text: SGGLI18n.t("T_设计变更"),
textStyle: {
color: '#fff',
fontWeight: 'normal',
@@ -431,7 +434,7 @@
}
},
series: [{
name: '数量',
name: SGGLI18n.t("T_数量"),
type: 'bar',
data: data
}],
@@ -466,7 +469,7 @@
optionPie = {
title: {
text: '质量问题',
text: SGGLI18n.t("T_质量问题"),
textStyle: {
// fontSize:14,
fontWeight: 'normal',
@@ -497,7 +500,7 @@
// left: "center",
// top: "center",
// style: {
// text: "进度80%",
// text: SGGLI18n.t("T_进度80"),
// textAlign: "center",
// fill: "#fff",
// fontSize: 18,
@@ -506,7 +509,7 @@
//},
series: [
{
name: '质量问题',
name: SGGLI18n.t("T_质量问题"),
label: {
show: false
},
@@ -534,12 +537,12 @@
//为echarts对象加载数据
myChartPie.setOption(optionPie);
}
var data = [{ value: 10, name: '分包一' },
{ value: 5, name: '分包二' },
{ value: 15, name: '分包三' },
{ value: 25, name: '分包四' },
{ value: 20, name: '分包五' },
{ value: 35, name: '分包六' }];
var data = [{ value: 10, name: SGGLI18n.t("T_分包一") },
{ value: 5, name: SGGLI18n.t("T_分包二") },
{ value: 15, name: SGGLI18n.t("T_分包三") },
{ value: 25, name: SGGLI18n.t("T_分包四") },
{ value: 20, name: SGGLI18n.t("T_分包五") },
{ value: 35, name: SGGLI18n.t("T_分包六") }];
pie('three', data)
</script>
<script>
@@ -559,13 +562,13 @@
var xArr = ["单位工程一", "单位工程二"]
var data = [
{
name: '质量一次性合格率',
name: SGGLI18n.t("T_质量一次性合格率"),
type: 'bar',
data: [0.9, 0.85],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
name: SGGLI18n.t("T_施工资料同步率"),
type: 'bar',
data: [0.75, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
@@ -575,29 +578,29 @@
xArr = ["分包一", "分包二"]
data = [
{
name: '质量一次性合格率',
name: SGGLI18n.t("T_质量一次性合格率"),
type: 'bar',
data: [0.85, 0.82],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
name: SGGLI18n.t("T_施工资料同步率"),
type: 'bar',
data: [0.69, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
} else if (index == 4) {
xArr = ["建筑", "安装"]
xArr = [SGGLI18n.t("T_建筑"), SGGLI18n.t("T_安装")]
data = [
{
name: '质量一次性合格率',
name: SGGLI18n.t("T_质量一次性合格率"),
type: 'bar',
data: [0.83, 0.78],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
name: SGGLI18n.t("T_施工资料同步率"),
type: 'bar',
data: [0.64, 0.61],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
@@ -610,26 +613,26 @@
var xArr = ["分包一", "分包二", "分包三"]
var data = [
{
name: '计划值',
name: SGGLI18n.t("T_计划值"),
type: 'bar',
data: [0.23, 0.35, 0.42],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
name: SGGLI18n.t("T_实际值"),
type: 'bar',
data: [0.2, 0.28, 0.35],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
name: SGGLI18n.t("T_累计计划值"),
type: 'line',
smooth: true,
data: [0.23, 0.58, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
name: SGGLI18n.t("T_累计实际值"),
type: 'line',
smooth: true,
data: [0.2, 0.48, 0.83],
@@ -640,26 +643,26 @@
xArr = ["单位工程一", "单位工程二", "单位工程三"]
data = [
{
name: '计划值',
name: SGGLI18n.t("T_计划值"),
type: 'bar',
data: [0.20, 0.33, 0.47],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
name: SGGLI18n.t("T_实际值"),
type: 'bar',
data: [0.15, 0.25, 0.33],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
name: SGGLI18n.t("T_累计计划值"),
type: 'line',
smooth: true,
data: [0.20, 0.53, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
name: SGGLI18n.t("T_累计实际值"),
type: 'line',
smooth: true,
data: [0.15, 0.4, 0.73],
@@ -668,29 +671,29 @@
]
}
else if (index == 4) {
xArr = ["建筑", "安装"]
xArr = [SGGLI18n.t("T_建筑"), SGGLI18n.t("T_安装")]
data = [
{
name: '计划值',
name: SGGLI18n.t("T_计划值"),
type: 'bar',
data: [0.45, 0.55],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
name: SGGLI18n.t("T_实际值"),
type: 'bar',
data: [0.36, 0.43],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
name: SGGLI18n.t("T_累计计划值"),
type: 'line',
smooth: true,
data: [0.45, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
name: SGGLI18n.t("T_累计实际值"),
type: 'line',
smooth: true,
data: [0.36, 0.79],
@@ -713,12 +716,12 @@
{ value: 30, name: '单位工程三' }];
}
else if (index == 4) {
data = [{ value: 45, name: '建筑' },
{ value: 55, name: '安装' }];
data = [{ value: 45, name: SGGLI18n.t("T_建筑") },
{ value: 55, name: SGGLI18n.t("T_安装") }];
}
else if (index == 6) {
data = [{ value: 35, name: '质量不合格' },
{ value: 65, name: '质量缺陷' }];
data = [{ value: 35, name: SGGLI18n.t("T_质量不合格") },
{ value: 65, name: SGGLI18n.t("T_质量缺陷") }];
}
pie('three', data)
}
@@ -726,7 +729,7 @@
var xArr = ["主项一", "主项二", "主项三", "主项四", "主项五"]
var data = [12, 5, 28, 43, 22]
if (index == 2) {
xArr = ["建筑", "安装"]
xArr = [SGGLI18n.t("T_建筑"), SGGLI18n.t("T_安装")]
data = [45, 65]
}
category('four', xArr, data)