Skip to content

Commit

Permalink
rename server resx
Browse files Browse the repository at this point in the history
  • Loading branch information
AigioL committed May 29, 2022
1 parent 1f97f1c commit f11d651
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 55 deletions.
67 changes: 37 additions & 30 deletions src/Common.ServerLib/Application/ProgramHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,48 +275,55 @@ static LoggingConfiguration InitNLogConfig()

static readonly Lazy<string> mCentralProcessorName = new(() =>
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
try
{
RegistryKey? registryKey = null;
try
{
registryKey = Registry.LocalMachine.OpenSubKey(@"HARDWARE\DESCRIPTION\System\CentralProcessor\0\");
return registryKey?.GetValue("ProcessorNameString")?.ToString()?.Trim() ?? string.Empty;
}
catch
{
}
finally
if (OperatingSystem.IsWindows())
{
registryKey?.Dispose();
RegistryKey? registryKey = null;
try
{
registryKey = Registry.LocalMachine.OpenSubKey(@"HARDWARE\DESCRIPTION\System\CentralProcessor\0\");
return registryKey?.GetValue("ProcessorNameString")?.ToString()?.Trim() ?? string.Empty;
}
catch
{
}
finally
{
registryKey?.Dispose();
}
}
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
var filePath = string.Format("{0}proc{0}cpuinfo", Path.DirectorySeparatorChar);
if (File.Exists(filePath))
else if (OperatingSystem.IsLinux())
{
using var fs = File.OpenRead(filePath);
using var sr = new StreamReader(fs);
while (sr.Peek() >= 0)
var filePath = string.Format("{0}proc{0}cpuinfo", Path.DirectorySeparatorChar);
if (File.Exists(filePath))
{
var line = sr.ReadLine();
if (line == null) break;
var array = line.Split(':', StringSplitOptions.RemoveEmptyEntries);
if (array.Length == 2)
using var fs = File.OpenRead(filePath);
using var sr = new StreamReader(fs);
while (sr.Peek() >= 0)
{
if (array[0].Trim() == "model name")
var line = sr.ReadLine();
if (line == null) break;
var array = line.Split(':', StringSplitOptions.RemoveEmptyEntries);
if (array.Length == 2)
{
return array[1].Trim();
if (array[0].Trim() == "model name")
{
return array[1].Trim();
}
}
}
}
}
//else if (OperatingSystem.IsMacOS())
//{
// sysctl -n machdep.cpu.brand_string
//}
}
catch
{

}
//else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
//{
// //sysctl -n machdep.cpu.brand_string
//}
return string.Empty;
});

Expand Down
4 changes: 2 additions & 2 deletions src/ST.Server.Resources/UI/Resx/AppResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/ST.Server.Resources/UI/Resx/AppResources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<comment>Comment=;Author=沙中金</comment>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1} is complete, you can close this window and return to Steam++.</value>
<value>{0} {1} is complete, you can close this window and return to Watt Toolkit.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
Expand All @@ -178,8 +178,8 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="meta_description" xml:space="preserve">
<value>Steam++is a toolbox with a variety of Steam tool features.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
<value>"Watt Toolkit" is an open source cross-platform multi-functional Steam toolkit.</value>
<comment>Comment=;Author=deepl</comment>
</data>
<data name="noscript" xml:space="preserve">
<value>JavaScript needs to be turned on to browse this site.</value>
Expand Down
6 changes: 3 additions & 3 deletions src/ST.Server.Resources/UI/Resx/AppResources.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<comment>Comment=;Author=EspRoy</comment>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1} está completo, puedes cerrar esta ventana y volver a Steam++.</value>
<value>{0} {1} está completo, puedes cerrar esta ventana y volver a Watt Toolkit.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
Expand All @@ -178,8 +178,8 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="meta_description" xml:space="preserve">
<value>Steam ++ es una caja de herramientas con una variedad de características de la herramienta Steam.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
<value>"Watt Toolkit" es un kit de herramientas de Steam de código abierto, multiplataforma y multifuncional.</value>
<comment>Comment=;Author=deepl</comment>
</data>
<data name="noscript" xml:space="preserve">
<value>JavaScript debe estar activado para navegar por este sitio.</value>
Expand Down
6 changes: 3 additions & 3 deletions src/ST.Server.Resources/UI/Resx/AppResources.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<comment>Comment=;Author=Zhengye</comment>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1} è completo, puoi chiudere questa finestra e tornare a Steam++.</value>
<value>{0} {1} è completo, puoi chiudere questa finestra e tornare a Watt Toolkit.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
Expand All @@ -178,8 +178,8 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="meta_description" xml:space="preserve">
<value>Steam++ è una cassetta degli attrezzi con una varietà di funzioni dello strumento Steam.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
<value>"Watt Toolkit è un toolkit open source, multipiattaforma e multifunzionale per Steam.</value>
<comment>Comment=;Author=deepl</comment>
</data>
<data name="noscript" xml:space="preserve">
<value>JavaScript deve essere attivato per navigare in questo sito.</value>
Expand Down
6 changes: 3 additions & 3 deletions src/ST.Server.Resources/UI/Resx/AppResources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1}完了したら、このウィンドウを閉じて Steam++ に戻ることができます。</value>
<value>{0} {1}完了したら、このウィンドウを閉じて Watt Toolkit に戻ることができます。</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
Expand All @@ -178,8 +178,8 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="meta_description" xml:space="preserve">
<value>「Steam++」は、複数のSteamツール機能を含むツールボックスです。</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
<value>"Watt Toolkit "は、オープンソース、クロスプラットフォーム、多機能なSteamツールキットです。</value>
<comment>Comment=;Author=deepl</comment>
</data>
<data name="noscript" xml:space="preserve">
<value>このサイトを閲覧するには、JavaScript を有効にする必要があります。</value>
Expand Down
6 changes: 3 additions & 3 deletions src/ST.Server.Resources/UI/Resx/AppResources.ko.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1} 완료되면 이 창을 닫고 Steam++로 돌아갈 수 있습니다.</value>
<value>{0} {1} 완료되면 이 창을 닫고 Watt Toolkit로 돌아갈 수 있습니다.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
Expand All @@ -178,8 +178,8 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="meta_description" xml:space="preserve">
<value>Steam++은 다양한 스팀 도구 기능을 갖춘 도구 상자입니다.</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
<value>"Watt Toolkit"은 다양한 플랫폼의 소스를 제공하는 다기능 Steam 도구 상자입니다.</value>
<comment>Comment=;Author=baidu</comment>
</data>
<data name="noscript" xml:space="preserve">
<value>이 사이트를 탐색하려면 JavaScript를 켜야 합니다.</value>
Expand Down
4 changes: 2 additions & 2 deletions src/ST.Server.Resources/UI/Resx/AppResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<value>登录 / 注册</value>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1}已完成,您可以关闭此窗口并返回至 Steam++。</value>
<value>{0} {1}已完成,您可以关闭此窗口并返回至 Watt Toolkit。</value>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
<value>此浏览器窗口/标签页将会在 10 秒内尝试自动关闭,您也可以手动关闭。</value>
Expand All @@ -178,7 +178,7 @@
<value>连接程序出错,请手动复制以下内容到程序点击手动登录。</value>
</data>
<data name="meta_description" xml:space="preserve">
<value>「Steam++」是一个包含多种Steam工具功能的工具箱。</value>
<value>「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。</value>
</data>
<data name="NewUserNickName_" xml:space="preserve">
<value>新用户{0}</value>
Expand Down
6 changes: 3 additions & 3 deletions src/ST.Server.Resources/UI/Resx/AppResources.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<comment>Comment=;Author=vanja-san</comment>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1} завершено, вы можете закрыть это окно и вернуться в Steam++.</value>
<value>{0} {1} завершено, вы можете закрыть это окно и вернуться в Watt Toolkit.</value>
<comment>Comment=;Author=vanja-san</comment>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
Expand All @@ -178,8 +178,8 @@
<comment>Comment=;Author=vanja-san</comment>
</data>
<data name="meta_description" xml:space="preserve">
<value>«Steam++» - это набор инструментов, содержащий широкий спектр инструментов Steam.</value>
<comment>Comment=;Author=vanja-san</comment>
<value>"Watt Toolkit" - это кроссплатформенный, многофункциональный набор инструментов Steam с открытым исходным кодом.</value>
<comment>Comment=;Author=deepl</comment>
</data>
<data name="noscript" xml:space="preserve">
<value>Для просмотра этого сайта, должен быть включён JavaScript.</value>
Expand Down
6 changes: 3 additions & 3 deletions src/ST.Server.Resources/UI/Resx/AppResources.zh-Hant.resx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip1" xml:space="preserve">
<value>{0} {1}已完成,您可以關閉此視窗並返回至 Steam++。</value>
<value>{0} {1}已完成,您可以關閉此視窗並返回至 Watt Toolkit。</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="LoginSuccessTip2" xml:space="preserve">
Expand All @@ -178,8 +178,8 @@
<comment>Comment=;Author=MicrosoftTranslator</comment>
</data>
<data name="meta_description" xml:space="preserve">
<value>「Steam++」是一個包含多種Steam工具功能的工具箱。</value>
<comment>Comment=;Author=MicrosoftTranslator</comment>
<value>「Watt Toolkit」是一個開源跨平臺的多功能 Steam 工具箱。</value>
<comment>Comment=;Author=baidu</comment>
</data>
<data name="noscript" xml:space="preserve">
<value>需要開啟 JavaScript 才能瀏覽本網站。</value>
Expand Down

0 comments on commit f11d651

Please sign in to comment.