Refactor translation files
- Add prefixes to all message keys to provide context - Use messages with attributes for some UI elements (dropdowns, dialogs, checkboxes, menus) - Rename some class fields for consistency with translation keys
This commit is contained in:
committed by
Paul Chote
parent
46caa2d889
commit
a0f17b15ec
@@ -24,37 +24,37 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public class DownloadPackageLogic : ChromeLogic
|
||||
{
|
||||
[TranslationReference("title")]
|
||||
const string Downloading = "downloading";
|
||||
const string Downloading = "label-downloading";
|
||||
|
||||
[TranslationReference]
|
||||
const string FetchingMirrorList = "fetching-mirror-list";
|
||||
const string FetchingMirrorList = "label-fetching-mirror-list";
|
||||
|
||||
[TranslationReference]
|
||||
const string UnknownHost = "unknown-host";
|
||||
const string UnknownHost = "label-unknown-host";
|
||||
|
||||
[TranslationReference("host", "received", "suffix")]
|
||||
const string DownloadingFrom = "downloading-from";
|
||||
const string DownloadingFrom = "label-downloading-from";
|
||||
|
||||
[TranslationReference("host", "received", "total", "suffix", "progress")]
|
||||
const string DownloadingFromProgress = "downloading-from-progress";
|
||||
const string DownloadingFromProgress = "label-downloading-from-progress";
|
||||
|
||||
[TranslationReference]
|
||||
const string VerifyingArchive = "verifying-archive";
|
||||
const string VerifyingArchive = "label-verifying-archive";
|
||||
|
||||
[TranslationReference]
|
||||
const string ArchiveValidationFailed = "archive-validation-failed";
|
||||
const string ArchiveValidationFailed = "label-archive-validation-failed";
|
||||
|
||||
[TranslationReference]
|
||||
const string Extracting = "extracting";
|
||||
const string Extracting = "label-extracting-archive";
|
||||
|
||||
[TranslationReference("entry")]
|
||||
const string ExtractingEntry = "extracting-entry";
|
||||
const string ExtractingEntry = "label-extracting-archive-entry";
|
||||
|
||||
[TranslationReference]
|
||||
const string ArchiveExtractionFailed = "archive-extraction-failed";
|
||||
const string ArchiveExtractionFailed = "label-archive-extraction-failed";
|
||||
|
||||
[TranslationReference]
|
||||
const string MirrorSelectionFailed = "mirror-selection-failed";
|
||||
const string MirrorSelectionFailed = "label-mirror-selection-failed";
|
||||
|
||||
static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
|
||||
|
||||
|
||||
@@ -22,61 +22,61 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public class InstallFromSourceLogic : ChromeLogic
|
||||
{
|
||||
[TranslationReference]
|
||||
const string DetectingSources = "detecting-sources";
|
||||
const string DetectingSources = "label-detecting-sources";
|
||||
|
||||
[TranslationReference]
|
||||
const string CheckingSources = "checking-sources";
|
||||
const string CheckingSources = "label-checking-sources";
|
||||
|
||||
[TranslationReference("title")]
|
||||
const string SearchingSourceFor = "searching-source-for";
|
||||
const string SearchingSourceFor = "label-searching-source-for";
|
||||
|
||||
[TranslationReference]
|
||||
const string ContentPackageInstallation = "content-package-installation";
|
||||
const string ContentPackageInstallation = "label-content-package-installation";
|
||||
|
||||
[TranslationReference]
|
||||
const string GameSources = "game-sources";
|
||||
const string GameSources = "label-game-sources";
|
||||
|
||||
[TranslationReference]
|
||||
const string DigitalInstalls = "digital-installs";
|
||||
const string DigitalInstalls = "label-digital-installs";
|
||||
|
||||
[TranslationReference]
|
||||
const string GameContentNotFound = "game-content-not-found";
|
||||
const string GameContentNotFound = "label-game-content-not-found";
|
||||
|
||||
[TranslationReference]
|
||||
const string AlternativeContentSources = "alternative-content-sources";
|
||||
const string AlternativeContentSources = "label-alternative-content-sources";
|
||||
|
||||
[TranslationReference]
|
||||
const string InstallingContent = "installing-content";
|
||||
const string InstallingContent = "label-installing-content";
|
||||
|
||||
[TranslationReference("filename")]
|
||||
public const string CopyingFilename = "copying-filename";
|
||||
public const string CopyingFilename = "label-copying-filename";
|
||||
|
||||
[TranslationReference("filename", "progress")]
|
||||
public const string CopyingFilenameProgress = "copying-filename-progress";
|
||||
public const string CopyingFilenameProgress = "label-copying-filename-progress";
|
||||
|
||||
[TranslationReference]
|
||||
const string InstallationFailed = "installation-failed";
|
||||
const string InstallationFailed = "label-installation-failed";
|
||||
|
||||
[TranslationReference]
|
||||
const string CheckInstallLog = "check-install-log";
|
||||
const string CheckInstallLog = "label-check-install-log";
|
||||
|
||||
[TranslationReference("filename")]
|
||||
public const string Extracing = "extracting-filename";
|
||||
public const string Extracing = "label-extracting-filename";
|
||||
|
||||
[TranslationReference("filename", "progress")]
|
||||
public const string ExtracingProgress = "extracting-filename-progress";
|
||||
public const string ExtracingProgress = "label-extracting-filename-progress";
|
||||
|
||||
[TranslationReference]
|
||||
public const string Continue = "continue";
|
||||
public const string Continue = "button-continue";
|
||||
|
||||
[TranslationReference]
|
||||
const string Cancel = "cancel";
|
||||
const string Cancel = "button-cancel";
|
||||
|
||||
[TranslationReference]
|
||||
const string Retry = "retry";
|
||||
const string Retry = "button-retry";
|
||||
|
||||
[TranslationReference]
|
||||
const string Back = "back";
|
||||
const string Back = "button-back";
|
||||
|
||||
// Hide percentage indicators for files smaller than 25 MB
|
||||
public const int ShowPercentageThreshold = 26214400;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public class ModContentLogic : ChromeLogic
|
||||
{
|
||||
[TranslationReference]
|
||||
const string ManualInstall = "manual-install";
|
||||
const string ManualInstall = "button-manual-install";
|
||||
|
||||
readonly ModData modData;
|
||||
readonly ModContent content;
|
||||
|
||||
@@ -21,10 +21,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public class ModContentPromptLogic : ChromeLogic
|
||||
{
|
||||
[TranslationReference]
|
||||
const string Continue = "continue";
|
||||
const string Continue = "button-continue";
|
||||
|
||||
[TranslationReference]
|
||||
const string Quit = "quit";
|
||||
const string Quit = "button-quit";
|
||||
|
||||
readonly ModContent content;
|
||||
bool requiredContentInstalled;
|
||||
|
||||
Reference in New Issue
Block a user