Commit 015a89b0 几米阳光

中英文bug修改

1 个父辈 8474f71b
......@@ -448,7 +448,8 @@
<value>p-axis stanby P1:</value>
</data>
<data name="FrmStoreBox_btnInOutP2_Text" xml:space="preserve">
<value>In-out axis sucking disc providing P2:</value>
<value>In-out axis sucking disc P2:</value>
<comment>In-out axis sucking disc providing P2:</comment>
</data>
<data name="FrmStoreBox_btnInOutP1_Text" xml:space="preserve">
<value>In-out axis stanby P1:</value>
......
......@@ -17,7 +17,7 @@ namespace OnlineStore.AutoInOutStore
public static string China = "zh-CN";
public static string English = "en-US";
public static string German = "ge-DE";
private static ResourceManager rm = null;
public static string CurrLanguage = "zh-CN";
......@@ -49,20 +49,25 @@ namespace OnlineStore.AutoInOutStore
}
private static Assembly assembly = Assembly.GetExecutingAssembly();
public static string GetString(string id,string defaultStr)
public static string GetString(string id, string defaultStr)
{
string strCurLanguage = "";
try
{
ResourceManager rm = new ResourceManager("OnlineStore.AutoInOutStore.Properties.Resource", assembly);
CultureInfo ci = Thread.CurrentThread.CurrentCulture;
if (rm == null)
{
rm = new ResourceManager("OnlineStore.AutoInOutStore.Properties.Resource", assembly);
}
//CultureInfo ci = Thread.CurrentThread.CurrentCulture;
CultureInfo ci = new CultureInfo(CurrLanguage);
strCurLanguage = rm.GetString(id, ci).Trim();
if (strCurLanguage.Equals("") && (!defaultStr.Equals("")))
{
strCurLanguage = defaultStr;
NoIdLog(id, defaultStr);
}
}
catch (Exception ex)
{
......@@ -84,10 +89,15 @@ namespace OnlineStore.AutoInOutStore
try
{
ResourceManager rm = new ResourceManager("OnlineStore.AutoInOutStore.Properties.Resource", Assembly.GetExecutingAssembly());
CultureInfo ci = Thread.CurrentThread.CurrentCulture;
if (rm == null)
{
rm = new ResourceManager("OnlineStore.AutoInOutStore.Properties.Resource", assembly);
}
//CultureInfo ci = Thread.CurrentThread.CurrentCulture;
CultureInfo ci = new CultureInfo(CurrLanguage);
strCurLanguage = rm.GetString(id, ci).Trim();
if(strCurLanguage.Equals("")&&(!defaultStr.Equals(""))){
if (strCurLanguage.Equals("") && (!defaultStr.Equals("")))
{
strCurLanguage = defaultStr;
NoIdLog(id, defaultStr);
}
......@@ -104,7 +114,7 @@ namespace OnlineStore.AutoInOutStore
NoIdLog(id, defaultStr);
}
}
return String.Format(strCurLanguage,param);
return String.Format(strCurLanguage, param);
}
private static void NoIdLog(string id, string defaultStr)
......
......@@ -38,7 +38,7 @@ namespace OnlineStore.DeviceLibrary
private bool IsHasCompress_Axis = true;
public AC_SA_BoxBean(AUTO_SA_Config config)
{
StoreName = ("料仓BOX_" + config.Id + " ").ToUpper();
StoreName = ("AUTO_BOX_" + config.Id + " ").ToUpper();
this.StoreID = config.Id;
this.Config = config;
......@@ -116,7 +116,7 @@ namespace OnlineStore.DeviceLibrary
//{
isInSuddenDown = true;
LogUtil.error(LOGGER, StoreName + "收到急停信号,报警急停");
WarnMsg = StoreName + ResourceControl.GetString(ResourceControl.inSuddenStop, "收到急停信号,报警急停");
WarnMsg = StoreName + ResourceControl.GetString(ResourceControl.inSuddenStop, "Receive emergency stop signal, alarm to stop");
//报警时会关闭所有轴
Alarm(StoreAlarmType.SuddenStop, "1", WarnMsg, StoreMoveType.None);
......@@ -246,12 +246,12 @@ namespace OnlineStore.DeviceLibrary
{
if (suddenBtn.Equals(IO_VALUE.LOW))
{
WarnMsg = ResourceControl.GetString(ResourceControl.startFail, "启动失败:急停未开");
WarnMsg = ResourceControl.GetString(ResourceControl.startFail, "Startup failure: emergency stop not opened");
LogUtil.error(LOGGER, " (" + StoreName + ")启动出现错误:急停没开 !启动失败!");
}
else
{
WarnMsg = ResourceControl.GetString(ResourceControl.startFailAir, "启动失败:没有气压信号");
WarnMsg = ResourceControl.GetString(ResourceControl.startFailAir, "Startup failure: no air pressure signal");
LogUtil.error(LOGGER, " (" + StoreName + ")启动出现错误:没有气压信号 !启动失败!");
}
return false;
......
......@@ -476,11 +476,11 @@ namespace OnlineStore.DeviceLibrary
map.Add(ParamDefine.confirmReelOut, ParamDefine.disable);
if (AutomaticBaiting.DoorStatus.Equals(2))
{
map.Add(ParamDefine.doorStatus, ResourceControl.GetString(ResourceControl.doorClose,"门锁关闭"));
map.Add(ParamDefine.doorStatus, ResourceControl.GetString(ResourceControl.doorClose, "Door lock close"));
}
else
{
map.Add(ParamDefine.doorStatus, ResourceControl.GetString(ResourceControl.doorOpen,"门锁打开"));
map.Add(ParamDefine.doorStatus, ResourceControl.GetString(ResourceControl.doorOpen, "Doorlock open"));
}
......@@ -520,19 +520,19 @@ namespace OnlineStore.DeviceLibrary
}
else
{
return ResourceControl.GetString(ResourceControl.CnotOpen,"忙碌中,无法打开门锁");
return ResourceControl.GetString(ResourceControl.CnotOpen, "BUSY,open doorlock failure");
}
}
public static string doStartBatchIn()
{
if (!AutomaticBaiting.DoorIsClose())
{
return ResourceControl.GetString(ResourceControl.batchInError,"批量入库失败:请先关闭上料机构");
return ResourceControl.GetString(ResourceControl.batchInError, "Batch storing Error: Close feeding device");
}
if (KND.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
return ResourceControl.GetString(ResourceControl.batchInError2,"批量入库失败:叉子料盘检测有料,请检查后再入库");
return ResourceControl.GetString(ResourceControl.batchInError2, "Batch storing Error: gripper full, check before restoring");
}
AutomaticBaiting.BatchDoorClose(false);
......@@ -550,19 +550,19 @@ namespace OnlineStore.DeviceLibrary
}
else
{
return (ResourceControl.GetString(ResourceControl.GetError,"取出料盘失败:无料盘可取"));
return (ResourceControl.GetString(ResourceControl.GetError, "Providing Error: BUSY, open doorlock failure"));
}
}
else
{
return (ResourceControl.GetString(ResourceControl.GetError2,"取出料盘失败:忙碌中,无法打开门锁"));
return (ResourceControl.GetString(ResourceControl.GetError2, "Providing Error: BUSY, open doorlock failure"));
}
}
public static string doCloseDoor()
{
if (!AutomaticBaiting.DoorIsClose())
{
return (ResourceControl.GetString(ResourceControl.CloseError,"锁门失败:请先关闭上料机构"));
return (ResourceControl.GetString(ResourceControl.CloseError, "Door lock Error: Close feeding device"));
}
AutomaticBaiting.BatchDoorClose(false);
AutomaticBaiting.Reset(false);
......@@ -570,7 +570,7 @@ namespace OnlineStore.DeviceLibrary
}
public static bool doConfirmReelGo()
{
LogUtil.info(ResourceControl.GetString(ResourceControl.TakeTrayOut,"已确认料盘已手动拿出"));
LogUtil.info(ResourceControl.GetString(ResourceControl.TakeTrayOut, "Take out reel manually"));
AutomaticBaiting.IsWaitTragGo = false;
AutomaticBaiting.IsGetTrayGo = true;
return true;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!