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

feat: localized no-notifications message #15002

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
3 changes: 3 additions & 0 deletions src/Notifications/NotificationCenterController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ private void WebView_NavigationCompleted(object sender, Microsoft.Web.WebView2.C

string setBottomButtonText = String.Format("window.setBottomButtonText('{0}');", Properties.Resources.NotificationsCenterBottomButtonText);
InvokeJS(setBottomButtonText);

string setNoNotificationsTexts = String.Format("window.setNoNotificationsTexts('{{\"title\":\"{0}\", \"msg\":\"{1}\"}}');", Properties.Resources.NoNotificationsTitle, Properties.Resources.NoNotificationsMsg);
InvokeJS(setNoNotificationsTexts);
}

private void AddNotifications(List<NotificationItemModel> notifications)
Expand Down
20 changes: 19 additions & 1 deletion src/Notifications/Properties/Resources.Designer.cs

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

6 changes: 6 additions & 0 deletions src/Notifications/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
<data name="ExtensionName" xml:space="preserve">
<value>Notifications</value>
</data>
<data name="NoNotificationsMsg" xml:space="preserve">
<value>You currently have no notifications. New notifications will appear above</value>
</data>
<data name="NoNotificationsTitle" xml:space="preserve">
<value>No notifications</value>
</data>
<data name="NotificationCenterDisabledMsg" xml:space="preserve">
<value>Notification Center feature is disabled. Enable it in preference panel to see latest news.</value>
</data>
Expand Down
Loading