Add localisation support to LatencyCertifierScreen#37240
Add localisation support to LatencyCertifierScreen#37240diquoks wants to merge 2 commits intoppy:masterfrom
LatencyCertifierScreen#37240Conversation
|
|
diquoks
left a comment
There was a problem hiding this comment.
some side notes
also tidied up the style a bit: changed letter case and placed the missing punctuation marks at the ends of sentences
| /// <summary> | ||
| /// "Polling: {0} Hz | Monitor: {1:N0} Hz | Exclusive: {2}" | ||
| /// </summary> | ||
| public static LocalisableString StatusTextMonitor(int pollingRate, float refreshRate, LocalisableString exclusiveStatus) => new TranslatableString(getKey(@"status_text_monitor"), @"Polling: {0} Hz | Monitor: {1:N0} Hz | Exclusive: {2}", pollingRate, refreshRate, exclusiveStatus); | ||
|
|
||
| /// <summary> | ||
| /// "Input: {0} Hz | Update: {1} Hz | Draw: {2} Hz" | ||
| /// </summary> | ||
| public static LocalisableString StatusTextRendering(double inputRate, double updateRate, double drawRate) => new TranslatableString(getKey(@"status_text_rendering"), @"Input: {0} Hz | Update: {1} Hz | Draw: {2} Hz", inputRate, updateRate, drawRate); |
There was a problem hiding this comment.
added separators (" | ") for more readability
| /// <summary> | ||
| /// "To complete certification, the difficulty level will now decrease until you can get {0} rounds correct in a row!" | ||
| /// </summary> | ||
| public static LocalisableString StatusTextCertification(int roundsCount) => new TranslatableString(getKey(@"status_text_certification"), @"To complete certification, the difficulty level will now decrease until you can get {0} rounds correct in a row!", roundsCount); |
There was a problem hiding this comment.
now this line string also using a constant by analogy with ButtonCertifyTooltipConfirm
| /// <summary> | ||
| /// "Use the arrow keys or Z/X/F/J to control the display." | ||
| /// </summary> | ||
| public static LocalisableString ExplanatoryTextControlDisplay => new TranslatableString(getKey(@"explanatory_text_control_display"), @"Use the arrow keys or Z/X/F/J to control the display."); | ||
|
|
||
| /// <summary> | ||
| /// "Tab key to change focus. Space to change display mode." | ||
| /// </summary> | ||
| public static LocalisableString ExplanatoryTextDisplayMode => new TranslatableString(getKey(@"explanatory_text_display_mode"), @"Tab key to change focus. Space to change display mode."); |
There was a problem hiding this comment.
i think these strings should be reworked, since, for example, you can press absolutely any keys to initiate a hit
i also don't like how "Tab key" & "Space" are used here, but i can't suggest anything better
idk
| /// <summary> | ||
| /// "Approach Rate" | ||
| /// </summary> | ||
| public static LocalisableString ApproachRate => new TranslatableString(getKey(@"approach_rate"), @"Approach Rate"); |
There was a problem hiding this comment.
SongSelectStrings.ApproachRate can be used instead, not sure
| /// <summary> | ||
| /// "Retry" | ||
| /// </summary> | ||
| public static LocalisableString ButtonRetryText => new TranslatableString(getKey(@"button_retry_text"), @"Retry"); |
There was a problem hiding this comment.
GameplayMenuOverlayStrings.Retry can be used instead, not sure
| currentLanguage.BindValueChanged(_ => | ||
| // schedule required because `LocalisationManager` won't have new language set correctly yet. | ||
| Schedule(() => | ||
| { | ||
| explanatoryText.Clear(); | ||
|
|
||
| explanatoryText.AddParagraph(LatencyCertifierStrings.ExplanatoryTextWelcome); | ||
| explanatoryText.NewParagraph(); | ||
|
|
||
| const string url = @"https://github.com/ppy/osu/wiki/Latency-and-unlimited-frame-rates#methodology"; | ||
| var formattedSource = MessageFormatter.FormatText(localisation.GetLocalisedString(LatencyCertifierStrings.ExplanatoryTextMethodology(url))); | ||
|
|
||
| explanatoryText.AddLinks(formattedSource.Text, formattedSource.Links); | ||
| explanatoryText.AddParagraph(LatencyCertifierStrings.ExplanatoryTextControlDisplay); | ||
| explanatoryText.AddParagraph(LatencyCertifierStrings.ExplanatoryTextDisplayMode); | ||
| }), true); |
There was a problem hiding this comment.
localised by the analogy with
osu/osu.Game/Overlays/Settings/Sections/Input/TabletSettings.cs
Lines 417 to 428 in 8c6818e
No description provided.