Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize missed strings #1993

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions settings/DevHome.Settings/Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,18 @@
<value>https://go.microsoft.com/fwlink/?linkid=2236981</value>
<comment>This is the microsoft code of conduct link.</comment>
</data>
<data name="Settings_Feedback_PhysicalMemory" xml:space="preserve">
<value>Physical Memory</value>
<comment>Label for displaying device's memory</comment>
</data>
<data name="Settings_Feedback_ProcessorArchitecture" xml:space="preserve">
<value>Processor Architecture</value>
<comment>Label for displaying device's processor architecture</comment>
</data>
<data name="Settings_Feedback_Extensions" xml:space="preserve">
<value>Extensions</value>
<comment>Label for displaying device's installed extensions</comment>
</data>
<data name="Settings_Accounts_NoProvidersContentDialog_SecondaryButtonText" xml:space="preserve">
<value>Cancel</value>
</data>
Expand Down
9 changes: 6 additions & 3 deletions settings/DevHome.Settings/Views/FeedbackPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,16 @@ private string GetPhysicalMemory()
var availMemKbToGb = Math.Round(memStatus.ullAvailPhys / ByteSizeGB, 2);
var totalMemKbToGb = Math.Round(memStatus.ullTotalPhys / ByteSizeGB, 2);

return "Physical Memory: " + totalMemKbToGb.ToString(cultures) + "GB (" + availMemKbToGb.ToString(cultures) + "GB free)";
var stringResource = new StringResource("DevHome.Settings/Resources");
return stringResource.GetLocalized("Settings_Feedback_PhysicalMemory") + ": " + totalMemKbToGb.ToString(cultures) + "GB (" + availMemKbToGb.ToString(cultures) + "GB free)";
}

private string GetProcessorArchitecture()
{
SYSTEM_INFO sysInfo;
PInvoke.GetSystemInfo(out sysInfo);
return "Processor Architecture: " + DetermineArchitecture((int)sysInfo.Anonymous.Anonymous.wProcessorArchitecture);
var stringResource = new StringResource("DevHome.Settings/Resources");
return stringResource.GetLocalized("Settings_Feedback_ProcessorArchitecture") + ": " + DetermineArchitecture((int)sysInfo.Anonymous.Anonymous.wProcessorArchitecture);
}

private string DetermineArchitecture(int value)
Expand Down Expand Up @@ -316,7 +318,8 @@ private string GetExtensions()
{
var extensionService = Application.Current.GetService<IExtensionService>();
var extensions = extensionService.GetInstalledExtensionsAsync(true).Result;
var extensionsStr = "Extensions: \n";
var stringResource = new StringResource("DevHome.Settings/Resources");
var extensionsStr = stringResource.GetLocalized("Settings_Feedback_Extensions") + ": \n";
foreach (var extension in extensions)
{
extensionsStr += extension.PackageFullName + "\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
</data>
<data name="AppListBackupBanner.Description" xml:space="preserve">
<value>Use Dev Home to quickly transfer your development machine settings from another PC to get back to coding.</value>
<comment>{Locked="Dev Home"}Description text of an instruction banner section for transferring settings from a developer machine</comment>
<comment>Description text of an instruction banner section for transferring settings from a developer machine</comment>
</data>
<data name="AppListBackupBanner.ButtonText" xml:space="preserve">
<value>Get started</value>
Expand Down Expand Up @@ -259,7 +259,7 @@
</data>
<data name="DefaultBanner.Description" xml:space="preserve">
<value>Find out how you can use Dev Home to quickly set up your development machine.</value>
<comment>{Locked="Dev Home"}Description text of an instruction banner section for setting up a development machine</comment>
<comment>Description text of an instruction banner section for setting up a development machine</comment>
</data>
<data name="DefaultBanner.ButtonText" xml:space="preserve">
<value>Learn more</value>
Expand Down Expand Up @@ -1247,4 +1247,8 @@
<value>Size Unit</value>
<comment>Name for the combo box</comment>
</data>
<data name="Next" xml:space="preserve">
<value>Next</value>
<comment>Button to go to next screen</comment>
</data>
</root>
Loading