Skip to content

Commit

Permalink
Adding localization for the sign in button states (#13612)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeotero authored and QilongTang committed Dec 7, 2022
1 parent 0a632ac commit b73c21e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3479,4 +3479,7 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
<data name="PreferencesViewBetaTag" xml:space="preserve">
<value>Beta</value>
</data>
</root>
<data name="SplashScreenSigningIn" xml:space="preserve">
<value>Signing In</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3466,4 +3466,7 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
<data name="PreferencesViewBetaTag" xml:space="preserve">
<value>Beta</value>
</data>
<data name="SplashScreenSigningIn" xml:space="preserve">
<value>Signing In</value>
</data>
</root>
6 changes: 4 additions & 2 deletions src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ internal async void SetSignInStatus(bool status)
{
if (webView?.CoreWebView2 != null)
{
await webView.CoreWebView2.ExecuteScriptAsync("window.setSignInStatus({" +
$"signInTitle: \"" + (status ? Wpf.Properties.Resources.SplashScreenSignOut : Wpf.Properties.Resources.SplashScreenSignIn).ToString() + "\"," +
await webView.CoreWebView2.ExecuteScriptAsync("window.setSignInStatus({" +
$"signInStatus: \"" + status + "\"})");
}
}
Expand All @@ -365,6 +364,9 @@ await webView.CoreWebView2.ExecuteScriptAsync("window.setLabels({" +
$"launchTitle: \"{Wpf.Properties.Resources.SplashScreenLaunchTitle}\"," +
$"importSettingsTitle: \"{Wpf.Properties.Resources.ImportSettingsDialogTitle}\"," +
$"showScreenAgainLabel: \"{Wpf.Properties.Resources.SplashScreenShowScreenAgainLabel}\"," +
$"signInTitle: \"{Wpf.Properties.Resources.SplashScreenSignIn}\"," +
$"signOutTitle: \"{Wpf.Properties.Resources.SplashScreenSignOut}\"," +
$"signingInTitle: \"{Wpf.Properties.Resources.SplashScreenSigningIn}\"," +
$"importSettingsTooltipDescription: \"{Wpf.Properties.Resources.ImportPreferencesInfo}\"" + "})");
}
}
Expand Down

0 comments on commit b73c21e

Please sign in to comment.