Commit 5f32de64 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'ee-i18n-notifications-of-user-profile' into 'master'

Externalize strings of notifications page in user profile

See merge request gitlab-org/gitlab-ee!13341
parents 6cfa538f c223c6f7
......@@ -14,9 +14,9 @@ class Profiles::NotificationsController < Profiles::ApplicationController
result = Users::UpdateService.new(current_user, user_params.merge(user: current_user)).execute
if result[:status] == :success
flash[:notice] = "Notification settings saved"
flash[:notice] = _("Notification settings saved")
else
flash[:alert] = "Failed to save new settings"
flash[:alert] = _("Failed to save new settings")
end
redirect_back_or_default(default: profile_notifications_path)
......
- page_title "Notifications"
- page_title _('Notifications')
- @content_class = "limit-container-width" unless fluid_layout
%div
......@@ -14,12 +14,12 @@
%h4.prepend-top-0
= page_title
%p
You can specify notification level per group or per project.
= _('You can specify notification level per group or per project.')
%p
By default, all projects and groups will use the global notifications setting.
= _('By default, all projects and groups will use the global notifications setting.')
.col-lg-8
%h5.prepend-top-0
Global notification settings
= _('Global notification settings')
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications prepend-top-default' } do |f|
= render_if_exists 'profiles/notifications/email_settings', form: f
......@@ -35,19 +35,19 @@
= form_for @user, url: profile_notifications_path, method: :put do |f|
%label{ for: 'user_notified_of_own_activity' }
= f.check_box :notified_of_own_activity
%span Receive notifications about your own activity
%span= _('Receive notifications about your own activity')
%hr
%h5
Groups (#{@group_notifications.count})
= _('Groups (%{count})') % { count: @group_notifications.count }
%div
%ul.bordered-list
- @group_notifications.each do |setting|
= render 'group_settings', setting: setting, group: setting.source
%h5
Projects (#{@project_notifications.count})
= _('Projects (%{count})') % { count: @project_notifications.count }
%p.account-well
To specify the notification level per project of a group you belong to, you need to visit project page and change notification level there.
= _('To specify the notification level per project of a group you belong to, you need to visit project page and change notification level there.')
.append-bottom-default
%ul.bordered-list
- @project_notifications.each do |setting|
......
......@@ -15,7 +15,7 @@
= icon('caret-down')
.sr-only Toggle dropdown
- else
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting", class: "#{btn_class}", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } }
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: _("Notification setting"), class: "#{btn_class}", "aria-label" => _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) }, data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } }
= icon("bell", class: "js-notification-loading")
= notification_title(notification_setting.level)
= icon("caret-down")
......
......@@ -16,7 +16,7 @@
= sprite_icon("arrow-down", css_class: "icon mr-0")
.sr-only Toggle dropdown
- else
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting - #{notification_title(notification_setting.level)}", class: "#{btn_class}", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", placement: 'top', toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } }
%button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) }, class: "#{btn_class}", "aria-label" => _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) }, data: { container: "body", placement: 'top', toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } }
= notification_setting_icon(notification_setting)
%span.js-notification-loading.fa.hidden
= sprite_icon("arrow-down", css_class: "icon")
......
......@@ -8,5 +8,5 @@
%li.divider
%li
%a.update-notification{ href: "#", role: "button", class: ("is-active" if notification_setting.custom?), data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), notification_level: "custom", notification_title: "Custom" } }
%strong.dropdown-menu-inner-title Custom
%strong.dropdown-menu-inner-title= s_('NotificationSetting|Custom')
%span.dropdown-menu-inner-content= notification_description("custom")
......@@ -2106,6 +2106,9 @@ msgstr ""
msgid "By default GitLab sends emails in HTML and plain text formats so mail clients can choose what format to use. Disable this option if you only want to send emails in plain text format."
msgstr ""
msgid "By default, all projects and groups will use the global notifications setting."
msgstr ""
msgid "ByAuthor|by"
msgstr ""
......@@ -6153,6 +6156,9 @@ msgstr ""
msgid "Given access %{time_ago}"
msgstr ""
msgid "Global notification settings"
msgstr ""
msgid "Go Back"
msgstr ""
......@@ -6423,6 +6429,9 @@ msgstr ""
msgid "Groups"
msgstr ""
msgid "Groups (%{count})"
msgstr ""
msgid "Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}."
msgstr ""
......@@ -8635,6 +8644,9 @@ msgstr ""
msgid "Notification setting - %{notification_title}"
msgstr ""
msgid "Notification settings saved"
msgstr ""
msgid "NotificationEvent|Close issue"
msgstr ""
......@@ -8689,6 +8701,9 @@ msgstr ""
msgid "NotificationLevel|Watch"
msgstr ""
msgid "NotificationSetting|Custom"
msgstr ""
msgid "Notifications"
msgstr ""
......@@ -10023,6 +10038,9 @@ msgstr ""
msgid "Projects"
msgstr ""
msgid "Projects (%{count})"
msgstr ""
msgid "Projects Successfully Retrieved"
msgstr ""
......@@ -10395,6 +10413,9 @@ msgstr ""
msgid "Receive alerts from manually configured Prometheus servers."
msgstr ""
msgid "Receive notifications about your own activity"
msgstr ""
msgid "Recent"
msgstr ""
......@@ -13345,6 +13366,9 @@ msgstr ""
msgid "To set up SAML authentication for your group through an identity provider like Azure, Okta, Onelogin, Ping Identity, or your custom SAML 2.0 provider:"
msgstr ""
msgid "To specify the notification level per project of a group you belong to, you need to visit project page and change notification level there."
msgstr ""
msgid "To start serving your jobs you can add Runners to your group"
msgstr ""
......@@ -14613,6 +14637,9 @@ msgstr ""
msgid "You can set up jobs to only use Runners with specific tags. Separate tags with commas."
msgstr ""
msgid "You can specify notification level per group or per project."
msgstr ""
msgid "You can test your .gitlab-ci.yml in %{linkStart}CI Lint%{linkEnd}."
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment