Language file updates

Changed alert test message to support globalization
This commit is contained in:
Brett Hewitson 2021-12-09 14:58:29 +10:00
parent 6423dfc293
commit 717ad0a697
6 changed files with 52 additions and 21 deletions

View file

@ -5,14 +5,14 @@
>
<!--#region Alert Types -->
<sys:String x:Key="AlertType_Backup">Backup</sys:String>
<sys:String x:Key="AlertType_Error">Error</sys:String>
<sys:String x:Key="AlertType_Backup">Sicherung</sys:String>
<sys:String x:Key="AlertType_Error">Fehler</sys:String>
<sys:String x:Key="AlertType_ModUpdateDetected">Mod Update Entdeckt</sys:String>
<sys:String x:Key="AlertType_Shutdown">Herunterfahren</sys:String>
<sys:String x:Key="AlertType_ShutdownMessage">Herunterfahren Nachricht</sys:String>
<sys:String x:Key="AlertType_ShutdownReason">Herunterfahren Grund</sys:String>
<sys:String x:Key="AlertType_ServerStatusChange">Server Status Änderung</sys:String>
<sys:String x:Key="AlertType_Startup">Starten</sys:String>
<sys:String x:Key="AlertType_Startup">Gestartet</sys:String>
<sys:String x:Key="AlertType_UpdateResults">Update Ergebnisse</sys:String>
<!--#endregion-->
@ -66,7 +66,7 @@
<sys:String x:Key="ConfigProfileWindow_NameLabel">Name:</sys:String>
<sys:String x:Key="ConfigProfileWindow_NameTooltip">Der Name Ihres Konfigurationsprofils.</sys:String>
<sys:String x:Key="ConfigProfileWindow_IsEnabledLabel">Aktiviert</sys:String>
<sys:String x:Key="ConfigProfileWindow_IsEnabledTooltip">Ist das Konfigurationsprofil aktiviert.</sys:String>
<sys:String x:Key="ConfigProfileWindow_IsEnabledTooltip">Konfigurationsprofil aktiviern.</sys:String>
<sys:String x:Key="ConfigProfileWindow_WebhookLabel">Webhook Url:</sys:String>
<sys:String x:Key="ConfigProfileWindow_WebhookTooltip">Dies ist Ihre Webhook Url, die von discord bereitgestellt wird.</sys:String>
<sys:String x:Key="ConfigProfileWindow_BotNameLabel">Bot Name:</sys:String>

View file

@ -118,6 +118,8 @@
<sys:String x:Key="ConfigProfileWindow_TestErrorTitle">Test Action Error</sys:String>
<sys:String x:Key="ConfigProfileWindow_TestErrorLabel">An error occurred while trying to test the config profile.</sys:String>
<sys:String x:Key="ConfigProfileWindow_TestEnabledErrorLabel">The profile is not enabled and cannot be tested.</sys:String>
<sys:String x:Key="ConfigProfileWindow_TestAlertMessage">Test '{0}' alert type message for profile name '{1}'</sys:String>
<!--#endregion-->
<!--#region Version Feed Window -->

View file

@ -7,17 +7,17 @@
<!--#region Alert Types -->
<sys:String x:Key="AlertType_Backup">Backup</sys:String>
<sys:String x:Key="AlertType_Error">Erro</sys:String>
<sys:String x:Key="AlertType_ModUpdateDetected">Mod Update Detected</sys:String>
<sys:String x:Key="AlertType_ModUpdateDetected">Mod Update Detectado</sys:String>
<sys:String x:Key="AlertType_Shutdown">Desligar</sys:String>
<sys:String x:Key="AlertType_ShutdownMessage">Mensagem de desligamento</sys:String>
<sys:String x:Key="AlertType_ShutdownReason">Motivo de desligamento</sys:String>
<sys:String x:Key="AlertType_ServerStatusChange">Mudança de status do servidor</sys:String>
<sys:String x:Key="AlertType_Startup">Começar</sys:String>
<sys:String x:Key="AlertType_Startup">Ligar</sys:String>
<sys:String x:Key="AlertType_UpdateResults">Resultados da atualização</sys:String>
<!--#endregion-->
<!--#region Global -->
<sys:String x:Key="Global_CancelButtonLabel">Cancela</sys:String>
<sys:String x:Key="Global_CancelButtonLabel">Cancelar</sys:String>
<sys:String x:Key="Global_CloseButtonLabel">Fechar</sys:String>
<sys:String x:Key="Global_OkButtonLabel">OK</sys:String>
<sys:String x:Key="Global_SaveButtonLabel">Salva</sys:String>
@ -73,7 +73,7 @@
<sys:String x:Key="ConfigProfileWindow_BotNameTooltip">Isso substituirá o nome que você configurou no seu webhook. Deixe em branco para usar o padrão.</sys:String>
<sys:String x:Key="ConfigProfileWindow_UseTTSLabel">Usar texto para fala (TTS)</sys:String>
<sys:String x:Key="ConfigProfileWindow_UseTTSTooltip">Se ativado, fará o bot anunciar com Texto e Voz, caso contrário, desativará Texto e Voz.</sys:String>
<sys:String x:Key="ConfigProfileWindow_PrefixMessageWithProfileNameLabel">Mensagem de prefixo com nome do perfil do Serve Manager</sys:String>
<sys:String x:Key="ConfigProfileWindow_PrefixMessageWithProfileNameLabel">Mensagem em prefixo do perfil</sys:String>
<sys:String x:Key="ConfigProfileWindow_PrefixMessageWithProfileNameTooltip">Se ativada, a mensagem de alerta será enviada com o prefixo do nome do perfil do Serve Manager.</sys:String>
<sys:String x:Key="ConfigProfileWindow_MessageOptionsLabel">Opções de mensagem</sys:String>
<sys:String x:Key="ConfigProfileWindow_MessageOptionsBoldLabel">Negrito</sys:String>
@ -98,7 +98,7 @@
<sys:String x:Key="ConfigProfileWindow_ProfileNameColumnLabel">Nome do perfil do Serve Manager</sys:String>
<sys:String x:Key="ConfigProfileWindow_AlertTypeColumnLabel">Tipo de alerta</sys:String>
<sys:String x:Key="ConfigProfileWindow_TestButtonLabel">Teste</sys:String>
<sys:String x:Key="ConfigProfileWindow_TestButtonLabel">Testar</sys:String>
<sys:String x:Key="ConfigProfileWindow_AddErrorTitle">Erro ao adicionar</sys:String>
<sys:String x:Key="ConfigProfileWindow_AddAlertTypeErrorLabel">Ocorreu um erro ao tentar adicionar um tipo de alerta.</sys:String>

View file

@ -7,6 +7,35 @@
<link href="" />
<updated>2021-12-03T00:00:00Z</updated>
<entry>
<id>urn:uuid:A9EC2F32-E026-485F-BD7B-C657DBA95B54</id>
<title>1.0.19 (1.0.19.1)</title>
<summary>1.0.19.1</summary>
<link href="" />
<updated>2021-12-09T00: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;">BUGFIX</u>
<br/>
<ul>
<li>Fixed alert test message to support globalization.</li>
</ul>
<u style="font-size: .9em;">NEW</u>
<br/>
<ul>
<li>de-DE Translation file added.</li>
<li>pt-BR Translation file added.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:C01A4AA0-D839-4732-9814-301DAC6EB094</id>
<title>1.0.18 (1.0.18.1)</title>

View file

@ -5,28 +5,27 @@
<title>Discord Plugin Version Feed</title>
<subtitle>This is the Discord Plugin beta version feed.</subtitle>
<link href="" />
<updated>2021-12-03T00:00:00Z</updated>
<updated>2021-12-09T00:00:00Z</updated>
<entry>
<id>urn:uuid:C01A4AA0-D839-4732-9814-301DAC6EB094</id>
<title>1.0.18 (1.0.18.1)</title>
<summary>1.0.18.1</summary>
<id>urn:uuid:A9EC2F32-E026-485F-BD7B-C657DBA95B54</id>
<title>1.0.19 (1.0.19.1)</title>
<summary>1.0.19.1</summary>
<link href="" />
<updated>2021-12-03T00:00:00Z</updated>
<updated>2021-12-09T00: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;">BUGFIX</u>
<br/>
<ul>
<li>Fixed alert test message to support globalization.</li>
</ul>
<u style="font-size: .9em;">NEW</u>
<br/>
<ul>
<li>de-DE Translation file added.</li>
<li>pt-BR Translation file added.</li>
<li>zh-CN Translation file added.</li>
</ul>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>Have enabled globalization support for the plugin.</li>
</ul>
</p>
</div>

View file

@ -118,7 +118,8 @@ namespace ServerManagerTool.Plugin.Discord.Windows
{
foreach (var alertType in Profile.AlertTypes)
{
Plugin.HandleAlert(Profile, alertType.Value, profileName.Value, $"Test '{alertType.Value}' message for profile name '{profileName.Value}'.");
var testMessage = string.Format(ResourceUtils.GetResourceString(this.Resources, "ConfigProfileWindow_TestAlertMessage"), alertType.Value, profileName.Value);
Plugin.HandleAlert(Profile, alertType.Value, profileName.Value, testMessage);
Task.Delay(1000).Wait();
}
}