mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[OOBE] Properly localize View on GitHub and release date in What's new (#45847)
## Summary of the Pull Request * Move hardcoded string *View on GitHub* to `Resources.resw` * Respect `DateTimeFormat.MonthDayPattern` in release date * Dots in the date are escaped so that they don't accidentally trigger a markdown list ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [x] **Dev docs:** No need - [x] **New binaries:** None - [x] **Documentation updated:** No need ## Detailed Description of the Pull Request / Additional comments Nothing changes in the English version, only difference is in languages that don't use `MMMM d`. ## Validation Steps Performed Manually tested with Slovak, Czech, German, English.
This commit is contained in:
@@ -86,7 +86,8 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
||||
|
||||
var releaseUrl = string.Format(CultureInfo.InvariantCulture, GitHubReleaseLinkTemplate, release.TagName);
|
||||
releaseNotesHtmlBuilder.AppendLine(CultureInfo.InvariantCulture, $"# {release.Name}");
|
||||
releaseNotesHtmlBuilder.AppendLine(CultureInfo.InvariantCulture, $"{release.PublishedDate.ToString("MMMM d, yyyy", CultureInfo.CurrentCulture)} • [View on GitHub]({releaseUrl})");
|
||||
string formattedDate = release.PublishedDate.ToString($"{CultureInfo.CurrentCulture.DateTimeFormat.MonthDayPattern}, yyyy", CultureInfo.CurrentCulture);
|
||||
releaseNotesHtmlBuilder.AppendLine(CultureInfo.InvariantCulture, $"{formattedDate.Replace(".", "\\.")} • [{ResourceLoaderInstance.ResourceLoader.GetString("ScoobeReleaseNotes_ViewOnGitHub")}]({releaseUrl})");
|
||||
releaseNotesHtmlBuilder.AppendLine();
|
||||
releaseNotesHtmlBuilder.AppendLine(" ");
|
||||
releaseNotesHtmlBuilder.AppendLine();
|
||||
|
||||
@@ -2195,6 +2195,9 @@ From there, simply click on one of the supported files in the File Explorer and
|
||||
<data name="ScoobeWindow_TitleTxt.Title" xml:space="preserve">
|
||||
<value>What's new in PowerToys</value>
|
||||
</data>
|
||||
<data name="ScoobeReleaseNotes_ViewOnGitHub" xml:space="preserve">
|
||||
<value>View on GitHub</value>
|
||||
</data>
|
||||
<data name="SettingsWindow_Title" xml:space="preserve">
|
||||
<value>PowerToys Settings</value>
|
||||
<comment>Title of the settings window when running as user</comment>
|
||||
|
||||
Reference in New Issue
Block a user