Skip to content

Commit

Permalink
Localization pass for new strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mgamerz committed Jul 6, 2023
1 parent 1e54072 commit c800f98
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 11 deletions.
2 changes: 1 addition & 1 deletion MassEffectModManagerCore/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4287,7 +4287,7 @@ private void openModImportUI(string archiveFile, Stream archiveStream = null, bo
if (modInspector.ImportedBatchQueue)
{
M3L.ShowDialog(this, "Install groups can be found in Batch Installer, located in the Mod Management menu.", "Install group imported", MessageBoxButton.OK, MessageBoxImage.Information);
M3L.ShowDialog(this, M3L.GetString(M3L.string_dialog_importedBatchInstallGroup), M3L.GetString(M3L.string_installGroupImported), MessageBoxButton.OK, MessageBoxImage.Information);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static string FindModsInArchive(string filepath,
M3Log.Error(@"Batch queues cannot be imported if they are not deployed by mod manager!");
Mod failed = new Mod(false);
failed.ModName = M3L.GetString(M3L.string_archiveError);
failed.LoadFailedReason = "Batch install groups must be deployed via ME3Tweaks Mod Manager in order to be imported. Contact the developer of this file.";
failed.LoadFailedReason = M3L.GetString(M3L.string_description_invalidBatchQueueArchive);
failedToLoadModCallback?.Invoke(failed);
addCompressedModCallback?.Invoke(failed);
if (closeStreamOnComplete)
Expand Down
12 changes: 12 additions & 0 deletions MassEffectModManagerCore/modmanager/localizations/M3L.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ internal static string GetString(string resourceKey, params object[] interpolati
public const string string_dialog_errorGeneratingMergeDLC = "string_dialog_errorGeneratingMergeDLC";
public const string string_errorGeneratingMergeDLC = "string_errorGeneratingMergeDLC";
public const string string_someASIModsWereNotInstalled = "string_someASIModsWereNotInstalled";
public const string string_dialog_importedBatchInstallGroup = "string_dialog_importedBatchInstallGroup";
public const string string_installGroupImported = "string_installGroupImported";
public const string string_interp_lexNightlyFailedToDownload = "string_interp_lexNightlyFailedToDownload";
public const string string_loadingME3TweaksServices = "string_loadingME3TweaksServices";
public const string string_refreshingME3TweaksServices = "string_refreshingME3TweaksServices";
Expand Down Expand Up @@ -1045,6 +1047,9 @@ internal static string GetString(string resourceKey, params object[] interpolati
public const string string_description_blacklistedMod = "string_description_blacklistedMod";
public const string string_interp_errorCreatingModFolderX = "string_interp_errorCreatingModFolderX";
public const string string_invalidServerModdesc = "string_invalidServerModdesc";
public const string string_description_invalidBatchQueueArchive = "string_description_invalidBatchQueueArchive";
public const string string_dialog_biqAlreadyExists = "string_dialog_biqAlreadyExists";
public const string string_installGroupAlreadyExists = "string_installGroupAlreadyExists";
public const string string_modupdatesavailable = "string_modupdatesavailable";
public const string string_downloadUpdate = "string_downloadUpdate";
public const string string_downloadUpdateFromNexusMods = "string_downloadUpdateFromNexusMods";
Expand Down Expand Up @@ -1734,6 +1739,11 @@ internal static string GetString(string resourceKey, params object[] interpolati
public const string string_notConfigured = "string_notConfigured";
public const string string_reconfigurationRequired = "string_reconfigurationRequired";
public const string string_interp_configuredTimestamp = "string_interp_configuredTimestamp";
public const string string_uiImportInstallGroupPrefix = "string_uiImportInstallGroupPrefix";
public const string string_interp_xContentMod = "string_interp_xContentMod";
public const string string_interp_xTextureMod = "string_interp_xTextureMod";
public const string string_interp_xASIMod = "string_interp_xASIMod";
public const string string_uiImportInstallGroupSuffix = "string_uiImportInstallGroupSuffix";
public const string string_importAnInstalledDLCMod = "string_importAnInstalledDLCMod";
public const string string_description_importFromGameToModManager = "string_description_importFromGameToModManager";
public const string string_modsInstalledByManagedSolutionCannotBeImported = "string_modsInstalledByManagedSolutionCannotBeImported";
Expand Down Expand Up @@ -2156,5 +2166,7 @@ internal static string GetString(string resourceKey, params object[] interpolati
public const string string_importingSaveFileFromME3Tweaks = "string_importingSaveFileFromME3Tweaks";
public const string string_importedSaveFileFromME3Tweaks = "string_importedSaveFileFromME3Tweaks";
public const string string_interp_errorImportingSaveFileX = "string_interp_errorImportingSaveFileX";
public const string string_emailsNotMergedMessagesFileNotFound = "string_emailsNotMergedMessagesFileNotFound";
public const string string_game2EmailMergeWrongGame = "string_game2EmailMergeWrongGame";
}
}
18 changes: 18 additions & 0 deletions MassEffectModManagerCore/modmanager/localizations/int.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@
<!-- 0={Error message} -->
<system:String x:Key="string_errorGeneratingMergeDLC">Error generating Merge DLC</system:String>
<system:String x:Key="string_someASIModsWereNotInstalled">Some ASI mods were not installed; see logs</system:String>
<system:String x:Key="string_dialog_importedBatchInstallGroup">Install groups can be found in Batch Installer, located in the Mod Management menu.</system:String>
<system:String x:Key="string_installGroupImported">Install group imported</system:String>

<!-- LEX Launcher -->
<system:String x:Key="string_interp_lexNightlyFailedToDownload">Legendary Explorer Nightly failed to download: {0}</system:String>
Expand Down Expand Up @@ -1205,6 +1207,10 @@
<system:String x:Key="string_interp_errorCreatingModFolderX">There was an error creating the folder for this mod: {0}</system:String>
<!-- 0={Error message} -->
<system:String x:Key="string_invalidServerModdesc">An invalid server moddesc was provided for this archive file, please contact Mgamerz with the link to this file and this error message.</system:String>
<system:String x:Key="string_description_invalidBatchQueueArchive">Batch install groups must be deployed via ME3Tweaks Mod Manager in order to be imported. Contact the developer of this file.</system:String>
<system:String x:Key="string_dialog_biqAlreadyExists">An install group with the name {0} already exists. Importing this group will overwrite the existing group.</system:String>
<!-- 0={Install group name} -->
<system:String x:Key="string_installGroupAlreadyExists">Install group already exists</system:String>

<!-- Mod updater -->
<system:String x:Key="string_modupdatesavailable">Mod updates available</system:String>
Expand Down Expand Up @@ -2215,6 +2221,14 @@
<system:String x:Key="string_reconfigurationRequired">Reconfiguration required</system:String>
<system:String x:Key="string_interp_configuredTimestamp">Configured {0}</system:String>
<!-- 0={time, e.g. 12-01-2022} -->
<system:String xml:space="preserve" x:Key="string_uiImportInstallGroupPrefix">Mods that will be installed by install group:\n</system:String>
<system:String xml:space="preserve" x:Key="string_interp_xContentMod"> - {0} {1} (Content mod)\n</system:String>
<!-- 0={m.ModName} 1={m.ModVersionString} -->
<system:String xml:space="preserve" x:Key="string_interp_xTextureMod"> - {0} (Texture mod)\n</system:String>
<!-- 0={t.ModName} -->
<system:String xml:space="preserve" x:Key="string_interp_xASIMod"> - {0} (ASI mod)\n</system:String>
<!-- 0={a.AssociatedMod.Name} -->
<system:String xml:space="preserve" x:Key="string_uiImportInstallGroupSuffix">\nImporting will add this install group to Batch Installer.</system:String>

<!-- Import Installed DLC Mod Panel -->
<system:String x:Key="string_importAnInstalledDLCMod">Import an installed DLC mod</system:String>
Expand Down Expand Up @@ -2850,4 +2864,8 @@
<system:String x:Key="string_interp_errorImportingSaveFileX">Error importing save file: {0}</system:String>
<!-- 0={Error message} -->

<!-- Game 2 Email Merge -->
<system:String x:Key="string_emailsNotMergedMessagesFileNotFound">Emails not merged: Messages file not found</system:String>
<system:String x:Key="string_game2EmailMergeWrongGame">Game 2 email merge manifest targets incorrect game</system:String>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public static string RunGame2EmailMerge(M3MergeDLC mergeDLC, Action<string> prog

// File to base modifications on
loadedFiles.TryGetValue(@"BioD_Nor_103Messages.pcc", out var pccFile);
if (pccFile is null) return "Emails not merged: Messages file not found";
if (pccFile is null) return M3L.GetString(M3L.string_emailsNotMergedMessagesFileNotFound);
using IMEPackage pcc = MEPackageHandler.OpenMEPackage(pccFile);

// Path to Message templates file - different files for ME2/LE2
Expand Down Expand Up @@ -173,7 +173,7 @@ public static string RunGame2EmailMerge(M3MergeDLC mergeDLC, Action<string> prog

if (emailInfos.Any(e => e.Game != mergeDLC.Target.Game))
{
throw new Exception(@"Game 2 email merge manifest targets incorrect game");
throw new Exception(M3L.GetString(M3L.string_game2EmailMergeWrongGame));
}

// Startup File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Microsoft.AppCenter.Crashes;
using SevenZip.EventArguments;
using WinCopies.Util;
using ME3TweaksModManager.modmanager.localizations;

namespace ME3TweaksModManager.modmanager.objects.batch
{
Expand Down Expand Up @@ -462,27 +463,27 @@ public string ImporterDescription
{
get
{
var str = "Mods that will be installed by install group:\n";
var str = M3L.GetString(M3L.string_uiImportInstallGroupPrefix);

foreach (var v in AllModsToInstall)
{
if (v is Mod m)
{
str += $" - {m.ModName} {m.ModVersionString} (Content mod)\n";
str += M3L.GetString(M3L.string_interp_xContentMod, m.ModName, m.ModVersionString);
}
else if (v is M3MEMMod t)
{
str += $" - {t.ModName} (Texture mod)\n";
str += M3L.GetString(M3L.string_interp_xTextureMod, t.ModName);

}
else if (v is BatchASIMod a)
{
str += $" - {a.AssociatedMod.Name} (ASI mod)\n";
str += M3L.GetString(M3L.string_interp_xASIMod, a.AssociatedMod.Name);

}
}

str += "\nImporting will add this install group to Batch Installer.";
str += M3L.GetString(M3L.string_uiImportInstallGroupSuffix);

return str;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ private ModImportResult ExtractBiq(BatchLibraryInstallQueue biq)
Application.Current.Dispatcher.Invoke(() =>
{
var result = M3L.ShowDialog(Window.GetWindow(this),
$"An install group with the name {biq.ModName} already exists. Importing this group will overwrite the existing group.",
"Install group already exists", MessageBoxButton.OKCancel, MessageBoxImage.Warning,
M3L.GetString(M3L.string_dialog_biqAlreadyExists, biq.ModName),
M3L.GetString(M3L.string_installGroupAlreadyExists), MessageBoxButton.OKCancel, MessageBoxImage.Warning,
MessageBoxResult.Cancel);
if (result == MessageBoxResult.Cancel)
{
Expand Down

0 comments on commit c800f98

Please sign in to comment.