Server manager language will default to the computers language setting on first start, if possible.

Translation file updated
This commit is contained in:
Brett Hewitson 2022-01-14 17:04:59 +10:00
parent eaefac83cc
commit d93cdaef0e
8 changed files with 111 additions and 48 deletions

View file

@ -1,3 +1,15 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using ArkData;
using NLog;
using NLog.Config;
@ -11,18 +23,6 @@ using ServerManagerTool.Lib;
using ServerManagerTool.Plugin.Common;
using ServerManagerTool.Utils;
using ServerManagerTool.Windows;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using WPFSharp.Globalizer;
namespace ServerManagerTool
@ -329,8 +329,14 @@ namespace ServerManagerTool
_globalizer = GlobalizedApplication.Instance;
try
{
if (!string.IsNullOrWhiteSpace(Config.Default.CultureName))
_globalizer.GlobalizationManager.SwitchLanguage(Config.Default.CultureName, true);
var langCode = GlobalizationManager.FallBackLanguage;
if (string.IsNullOrWhiteSpace(Config.Default.DataDir))
langCode = CultureInfo.CurrentCulture.Name;
else if (!string.IsNullOrWhiteSpace(Config.Default.CultureName))
langCode = Config.Default.CultureName;
_globalizer.GlobalizationManager.SwitchLanguage(langCode, true);
}
catch (Exception ex)
{

View file

@ -489,6 +489,7 @@
<sys:String x:Key="GlobalSettings_ResetButtonLabel">Redefinir</sys:String>
<sys:String x:Key="GlobalSettings_ResetButtonTooltip">Isso redefinirá TODAS as configurações globais do usuário para o gerenciador do servidor. O gerenciador do servidor será fechado se for bem-sucedido.</sys:String>
<sys:String x:Key="GlobalSettings_RunAsAdministratorLabel">Ativar e executar como Prompt de Administrador na Inicialização</sys:String>
<sys:String x:Key="GlobalSettings_CheckIfServerManagerRunningOnStartupLabel">Verificar se o Server Manager está em execução na inicialização</sys:String>
<sys:String x:Key="GlobalSettings_StartModeLabel">Modo de início da janela principal:</sys:String>
<sys:String x:Key="GlobalSettings_MinimizeToTrayLabel">Minimizar para a bandeja</sys:String>
<sys:String x:Key="GlobalSettings_ManageFirewallLabel">Gerenciar configurações de firewall automaticamente</sys:String>
@ -5536,14 +5537,14 @@
<sys:String x:Key="DinoDropInventoryComponent_Kaiju_Desert_C">Boss Inventory - Desert Titan</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_Kaiju_Forest_C">Boss Inventory - Forest Titan</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_Kaiju_Ice_C">Boss Inventory - Ice Titan</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_CIBoss_Easy_C">Boss Inventory - Crystal Wyvern Queen (Gamma)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_CIBoss_Medium_C">Boss Inventory - Crystal Wyvern Queen (Beta)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_CIBoss_Hard_C">Boss Inventory - Crystal Wyvern Queen (Alpha)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDinopith_Easy_C">Boss Inventory - Dinopithecus (Gamma)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDinopith_Medium_C">Boss Inventory - Dinopithecus (Beta)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDinopith_Hard_C">Boss Inventory - Dinopithecus (Alpha)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDinopith_Easy_C">Boss Inventory - Dinopithecus King (Gamma)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDinopith_Medium_C">Boss Inventory - Dinopithecus King (Beta)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDinopith_Hard_C">Boss Inventory - Dinopithecus King (Alpha)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDragon_Easy_Ragnarok_C">Boss Inventory - Dragon (Gamma)</sys:String>
<sys:String x:Key="DinoDropInventoryComponent_BossDragon_Medium_Ragnarok_C">Boss Inventory - Dragon (Beta)</sys:String>

View file

@ -5,14 +5,14 @@
<title>Ark Server Manager Version Feed</title>
<subtitle>This is the Ark Server Manager release version feed.</subtitle>
<link href="http://arkservermanager.freeforums.net/" />
<updated>2022-01-05T00:00:00Z</updated>
<updated>2022-01-14T00:00:00Z</updated>
<entry>
<id>urn:uuid:9B66118D-DDFE-4E72-9CB9-299642AD29FF</id>
<title>1.1.416 (1.1.416.1)</title>
<summary>1.1.416.1</summary>
<title>1.1.416 (1.1.416.2)</title>
<summary>1.1.416.2</summary>
<link href="" />
<updated>2022-01-05T00:00:00Z</updated>
<updated>2022-01-14T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
@ -20,6 +20,8 @@
<br/>
<ul>
<li>Minor tweaks to the Auto-Update process to prevent intermittent exceptions.</li>
<li>Server manager language will default to the computers language setting on first start, if possible.</li>
<li>pt-BR Translation file updated.</li>
<li>zh-CN Translation file updated.</li>
</ul>
</p>

View file

@ -5,7 +5,31 @@
<title>Ark Server Manager Version Feed</title>
<subtitle>This is the Ark Server Manager beta version feed.</subtitle>
<link href="http://arkservermanager.freeforums.net/" />
<updated>2022-01-05T00:00:00Z</updated>
<updated>2022-01-14T00:00:00Z</updated>
<entry>
<id>urn:uuid:0427B4A2-8C1A-426D-BCDB-ADBFF0A74825</id>
<title>1.1.416 (1.1.416.2)</title>
<summary>1.1.416.2</summary>
<link href="" />
<updated>2022-01-14T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>Server manager language will default to the computers language setting on first start, if possible.</li>
<li>pt-BR Translation file updated.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:9B66118D-DDFE-4E72-9CB9-299642AD29FF</id>