Skip to content

Add localisation support to remaining notifications#36994

Open
diquoks wants to merge 7 commits intoppy:masterfrom
diquoks:localisation/notifications
Open

Add localisation support to remaining notifications#36994
diquoks wants to merge 7 commits intoppy:masterfrom
diquoks:localisation/notifications

Conversation

@diquoks
Copy link
Contributor

@diquoks diquoks commented Mar 16, 2026

changes can be reviewed commit by commit

the final push

@diquoks diquoks marked this pull request as ready for review March 16, 2026 13:14
Copy link
Contributor Author

@diquoks diquoks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some side notes

Comment on lines +233 to +246

protected virtual LocalisableString DeleteModelsAbortedText => $"No {HumanisedModelName}s found to delete!";

protected virtual LocalisableString DeleteModelsStartingText => $"Preparing to delete all {HumanisedModelName}s...";

protected virtual LocalisableString DeleteModelsRunningText(int processedCount, int totalCount) => $"Deleting {HumanisedModelName}s ({processedCount} of {totalCount})";

protected virtual LocalisableString DeleteModelsCompletedText => $"Deleted all {HumanisedModelName}s!";

protected virtual LocalisableString RestoreModelsAbortedText => $"No {HumanisedModelName}s found to restore!";

protected virtual LocalisableString RestoreModelsRunningText(int processedCount, int totalCount) => $"Restoring deleted {HumanisedModelName}s ({processedCount} of {totalCount})";

protected virtual LocalisableString RestoreModelsCompletedText => $"Restored all deleted {HumanisedModelName}s!";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is the cleanest way to do it, but i'm not aware of any others

Comment on lines +665 to +680

protected virtual LocalisableString ImportAbortedText => $"No {HumanisedModelName}s were found to import!";

protected virtual LocalisableString ImportStartingText => $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is initialising...";

protected virtual LocalisableString ImportRunningText(int processedCount, int totalCount) => $"Importing {HumanisedModelName}s ({processedCount} of {totalCount})";

protected virtual LocalisableString ImportCompletedText(int totalCount) => $"Imported {totalCount} {HumanisedModelName}s!";

protected virtual LocalisableString ImportIncompletedText(int processedCount, int totalCount) => $"Imported {processedCount} of {totalCount} {HumanisedModelName}s!";

protected virtual LocalisableString ImportFailedText => $"{HumanisedModelName.Humanize(LetterCasing.Title)} import failed! Check logs for more information.";

protected virtual LocalisableString ImportPausedText => $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is paused due to gameplay...";

protected virtual LocalisableString ImportResumingText => $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is resuming...";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is the cleanest way to do it, but i'm not aware of any others

same here

Comment on lines +390 to +393
/// <summary>
/// "({0} of {1})"
/// </summary>
public static LocalisableString BackgroundDataStoreProcessorItemsStatus(int processedItems, int totalItems) => new TranslatableString(getKey(@"data_store_processor_items_status"), @"({0} of {1})", processedItems, totalItems);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided to take out this string so as not to duplicate the same thing twice

it might be worth editing strings above to something like

"Preparing to do X..." or "X is initialising..."
"Doing X ({0} of {1})"

similar to how it's done in ModelManager & RealmArchiveModelImporter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant