Made some strings localisable and improved portuguese translations
MODIFY
HedgeModManager/Languages/en-AU.xaml
HedgeModManager/Languages/en-AU.xaml
<system:String x:Key="CommonUIOK" >OK</system:String>
<system:String x:Key="CommonUICancel" >Cancel</system:String>
<system:String x:Key="CommonUIYes" >Yes</system:String>
+ <system:String x:Key="CommonUIBlocked" >Blocked</system:String>
<system:String x:Key="CommonUINo" >No</system:String>
<system:String x:Key="CommonUIRetry" >Retry</system:String>
<system:String x:Key="CommonUIUpdate" >Update</system:String>
<system:String x:Key="StatusUINoCodeUpdatesFound" >No code updates found</system:String>
<!-- Dialog UI Strings -->
+ <system:String xml:space="preserve" x:Key="DialogUINoModsFolder">Hedge Mod Manager did not detect any mods folder.&#x0a;Would you like create a mods folder?</system:String>
<system:String xml:space="preserve" x:Key="DialogUIDeleteMod">Are you sure you want to delete "{0}"?&#x0a;This action cannot be undone!</system:String>
+ <system:String xml:space="preserve" x:Key="DialogUIModNewest">{0} is already up to date.</system:String>
+ <system:String xml:space="preserve" x:Key="DialogUIModUpdate">A newer version of {0} available! ({1})</system:String>
+ <system:String xml:space="preserve" x:Key="DialogUIModCancelUpdate">Are you sure you want to cancel updating?&#x0a;This may corrupt {0}</system:String>
<!-- Status UI Lang Stuff Strings -->
<system:String x:Key="StatusUIUpdateCompletedSingular" >completed</system:String>
<!-- Mod Config UI Strings -->
<system:String x:Key="ModConfigUITitle">Configure {0}</system:String>
+ <!-- Mod Description UI Strings -->
+ <system:String x:Key="ModDescriptionUIAbout">About {0}</system:String>
+ <system:String x:Key="ModDescriptionUIMadeBy">Made by</system:String>
+ <system:String x:Key="ModDescriptionUIDate">on</system:String>
+
<!-- Mod Downloader Strings -->
<system:String x:Key="ModDownloaderFailed">Failed to Download Mod</system:String>
<system:String xml:space="preserve" x:Key="ModDownloaderWebError">An error has occurred during the download. Servers might be down or overloaded. Please try again later. &#x0a;&#x0a;Details: {0}</system:String>

MODIFY
HedgeModManager/Properties/Resources.Designer.cs
HedgeModManager/Properties/Resources.Designer.cs
@@ -130,12 +130,7 @@ namespace HedgeModManager.Properties {
///}
///
///th, td {
- /// padding: 2px;
- ///}
- ///
- ///th {
- /// text-align: left;
- ///}.
+ /// padding: [rest of string was truncated]&quot;;.
/// </summary>
internal static string GBStyleSheet {
get {
@@ -217,25 +212,6 @@ namespace HedgeModManager.Properties {
}
}
- /// <summary>
- /// Looks up a localized string similar to Are you sure you want to cancel updating?
- ///This may corrupt {0}.
- /// </summary>
- internal static string STR_CANCEL_WARNING {
- get {
- return ResourceManager.GetString("STR_CANCEL_WARNING", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to {0} is already up to date..
- /// </summary>
- internal static string STR_MOD_NEWEST {
- get {
- return ResourceManager.GetString("STR_MOD_NEWEST", resourceCulture);
- }
- }
-
/// <summary>
/// Looks up a localized string similar to HedgeModManager could not detect any supported games
///in the current directory!
@@ -248,25 +224,6 @@ namespace HedgeModManager.Properties {
}
}
- /// <summary>
- /// Looks up a localized string similar to A newer version of {0} available! ({1}).
- /// </summary>
- internal static string STR_UI_MOD_UPDATE {
- get {
- return ResourceManager.GetString("STR_UI_MOD_UPDATE", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Hedge Mod Manager did not detect any mods folder.
- ///Would you like create a mods folder?.
- /// </summary>
- internal static string STR_UI_NO_MODS {
- get {
- return ResourceManager.GetString("STR_UI_NO_MODS", resourceCulture);
- }
- }
-
/// <summary>
/// Looks up a localized string similar to https://raw.githubusercontent.com/thesupersonic16/HedgeModManager/rewrite/HedgeModManager/Resources/Codesv2/SonicForces.hmm.
/// </summary>

MODIFY
HedgeModManager/Properties/Resources.resx
HedgeModManager/Properties/Resources.resx
<data name="MemoryService" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MemoryService.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
- <data name="STR_CANCEL_WARNING" xml:space="preserve">
- <value>Are you sure you want to cancel updating?
-This may corrupt {0}</value>
- </data>
- <data name="STR_MOD_NEWEST" xml:space="preserve">
- <value>{0} is already up to date.</value>
- </data>
<data name="STR_MSG_NOGAME" xml:space="preserve">
<value>HedgeModManager could not detect any supported games
in the current directory!
Do you want run the HMM Auto Installer?</value>
- </data>
- <data name="STR_UI_MOD_UPDATE" xml:space="preserve">
- <value>A newer version of {0} available! ({1})</value>
- </data>
- <data name="STR_UI_NO_MODS" xml:space="preserve">
- <value>Hedge Mod Manager did not detect any mods folder.
-Would you like create a mods folder?</value>
</data>
<data name="URL_FML_CODES" xml:space="preserve">
<value>https://raw.githubusercontent.com/thesupersonic16/HedgeModManager/rewrite/HedgeModManager/Resources/Codesv2/SonicForces.hmm</value>

MODIFY
HedgeModManager/UI/AboutModWindow.xaml
HedgeModManager/UI/AboutModWindow.xaml
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TextBlock x:Name="TitleLbl" Text="Title" FontSize="26" Width="Auto"/>
<TextBlock FontSize="14" Width="Auto" Visibility="{Binding AuthorURL, Converter={StaticResource EmptyStringToVisibilityConverter}}">
- <Run Text="Made by"/>
+ <Run Text="{StaticResource ModDescriptionUIMadeBy}"/>
<Hyperlink NavigateUri="{Binding AuthorURL}" Click="Hyperlink_OnClick">
<Run Text="{Binding Author}" Foreground="{DynamicResource HMM.Window.HeaderAccentBrush}"/>
</Hyperlink>
- <Run Text="on"/>
+ <Run Text="{StaticResource ModDescriptionUIDate}"/>
<Run Text="{Binding Date}"/>
</TextBlock>
<TextBlock FontSize="14" Width="Auto" Visibility="{Binding AuthorURL, Converter={StaticResource InverseEmptyStringToVisibilityConverter}}">
- <Run Text="Made by"/>
+ <Run Text="{StaticResource ModDescriptionUIMadeBy}"/>
<Run Text="{Binding Author}"/>
- <Run Text="on"/>
+ <Run Text="{StaticResource ModDescriptionUIDate}"/>
<Run Text="{Binding Date}"/>
</TextBlock>
</StackPanel>

MODIFY
HedgeModManager/UI/AboutModWindow.xaml.cs
HedgeModManager/UI/AboutModWindow.xaml.cs
@@ -25,7 +25,7 @@ namespace HedgeModManager
{
DataContext = mod;
InitializeComponent();
- Title = $"About {mod.Title}";
+ Title = string.Format(Lang.Localise("ModDescriptionUIAbout"), mod.Title);
TitleLbl.Text = $"{mod.Title}";
if (!string.IsNullOrEmpty(mod.Version))
{

MODIFY
HedgeModManager/UI/Converters.cs
HedgeModManager/UI/Converters.cs
@@ -16,9 +16,9 @@ namespace HedgeModManager
{
var server = (string)value;
if (string.IsNullOrEmpty(server))
- return "No";
+ return Lang.Localise("CommonUINo");
- return HedgeApp.NetworkConfiguration.IsServerBlocked(server) ? "Blocked" : "Yes";
+ return HedgeApp.NetworkConfiguration.IsServerBlocked(server) ? Lang.Localise("CommonUIBlocked") : Lang.Localise("CommonUIYes");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

MODIFY
HedgeModManager/UI/MainWindow.xaml.cs
HedgeModManager/UI/MainWindow.xaml.cs
@@ -104,7 +104,7 @@ namespace HedgeModManager
if (!Directory.Exists(HedgeApp.ModsDbPath))
{
Application.Current?.MainWindow?.Hide();
- var box = new HedgeMessageBox("No Mods Found", Properties.Resources.STR_UI_NO_MODS);
+ var box = new HedgeMessageBox("No Mods Found", Localise("DialogUINoModsFolder"));
box.AddButton("Yes", () =>
{
@@ -322,14 +322,14 @@ namespace HedgeModManager
{
if (showUpdatedDialog)
{
- var box = new HedgeMessageBox(string.Empty, string.Format(HMMResources.STR_MOD_NEWEST, mod.Title));
+ var box = new HedgeMessageBox(string.Empty, string.Format(Localise("DialogUIModNewest"), mod.Title));
box.AddButton(Localise("CommonUIOK"), () => box.Close());
box.ShowDialog();
}
return;
}
- var dialog = new HedgeMessageBox(string.Format(HMMResources.STR_UI_MOD_UPDATE, mod.Title, update.VersionString)
+ var dialog = new HedgeMessageBox(string.Format(Localise("DialogUIModUpdate"), mod.Title, update.VersionString)
, update.ChangeLog, type: InputType.MarkDown);
dialog.AddButton(Localise("CommonUIUpdate"), () =>

MODIFY
HedgeModManager/UI/ModUpdateWindow.xaml.cs
HedgeModManager/UI/ModUpdateWindow.xaml.cs
@@ -143,7 +143,7 @@ namespace HedgeModManager.UI
}
e.Cancel = true;
- WarningDialog = new HedgeMessageBox("Hedge Mod Manager", string.Format(HMMResources.STR_CANCEL_WARNING, UpdateInfo.Mod.Title));
+ WarningDialog = new HedgeMessageBox("Hedge Mod Manager", string.Format(Lang.Localise("DialogUIModCancelUpdate"), UpdateInfo.Mod.Title));
WarningDialog.AddButton("Yes", () =>
{

Made some strings localisable and improved portuguese translations