summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2019-01-28 04:15:03 +0000
committerLuke Bennett <lbennett@gitlab.com>2019-01-28 05:01:23 +0000
commite3183606311f16bc2897c9305d925841c5af879c (patch)
tree7157158243107e214baca3a0aa5bc637488a16ac
parentc243b154abf5c29ba35fd2fab2ca3bc010fdc324 (diff)
downloadgitlab-ce-broadcast-ext.tar.gz
Externalize admin broadcast settings stringsbroadcast-ext
-rw-r--r--app/views/admin/broadcast_messages/_form.html.haml12
-rw-r--r--app/views/admin/broadcast_messages/edit.html.haml4
-rw-r--r--app/views/admin/broadcast_messages/index.html.haml21
-rw-r--r--changelogs/unreleased/broadcast-ext.yml5
-rw-r--r--locale/gitlab.pot30
5 files changed, 53 insertions, 19 deletions
diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml
index c465d9f51d6..d48301fad13 100644
--- a/app/views/admin/broadcast_messages/_form.html.haml
+++ b/app/views/admin/broadcast_messages/_form.html.haml
@@ -4,7 +4,7 @@
- if @broadcast_message.message.present?
= render_broadcast_message(@broadcast_message)
- else
- Your message here
+ = _('Your message here')
= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form js-quick-submit js-requires-input'} do |f|
= form_errors(@broadcast_message)
@@ -17,13 +17,13 @@
data: { preview_path: preview_admin_broadcast_messages_path }
.form-group.row.js-toggle-colors-container
.col-sm-10.offset-sm-2
- = link_to 'Customize colors', '#', class: 'js-toggle-colors-link'
+ = link_to _('Customize colors'), '#', class: 'js-toggle-colors-link'
.form-group.row.js-toggle-colors-container.toggle-colors.hide
- = f.label :color, "Background Color", class: 'col-form-label col-sm-2'
+ = f.label :color, _('Background Color'), class: 'col-form-label col-sm-2'
.col-sm-10
= f.color_field :color, class: "form-control"
.form-group.row.js-toggle-colors-container.toggle-colors.hide
- = f.label :font, "Font Color", class: 'col-form-label col-sm-2'
+ = f.label :font, _('Font Color'), class: 'col-form-label col-sm-2'
.col-sm-10
= f.color_field :font, class: "form-control"
.form-group.row
@@ -36,6 +36,6 @@
= f.datetime_select :ends_at, {}, class: 'form-control form-control-inline'
.form-actions
- if @broadcast_message.persisted?
- = f.submit "Update broadcast message", class: "btn btn-success"
+ = f.submit _('Update broadcast message'), class: "btn btn-success"
- else
- = f.submit "Add broadcast message", class: "btn btn-success"
+ = f.submit _('Add broadcast message'), class: "btn btn-success"
diff --git a/app/views/admin/broadcast_messages/edit.html.haml b/app/views/admin/broadcast_messages/edit.html.haml
index 8cbc4597e32..156f13ad52f 100644
--- a/app/views/admin/broadcast_messages/edit.html.haml
+++ b/app/views/admin/broadcast_messages/edit.html.haml
@@ -1,4 +1,4 @@
-- breadcrumb_title "Messages"
-- page_title "Broadcast Messages"
+- breadcrumb_title _('Messages')
+- page_title _('Broadcast Messages')
= render 'form'
diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml
index 9ef58faf8cc..82ba8106512 100644
--- a/app/views/admin/broadcast_messages/index.html.haml
+++ b/app/views/admin/broadcast_messages/index.html.haml
@@ -1,11 +1,10 @@
-- breadcrumb_title "Messages"
-- page_title "Broadcast Messages"
+- breadcrumb_title _('Messages')
+- page_title _('Broadcast Messages')
%h3.page-title
- Broadcast Messages
+ = _('Broadcast Messages')
%p.light
- Broadcast messages are displayed for every user and can be used to notify
- users about scheduled maintenance, recent upgrades and more.
+ = _('Broadcast messages are displayed for every user and can be used to notify users about scheduled maintenance, recent upgrades and more.')
= render 'form'
@@ -15,10 +14,10 @@
%table.table
%thead
%tr
- %th Status
- %th Preview
- %th Starts
- %th Ends
+ %th= _('Status')
+ %th= _('Preview')
+ %th= _('Starts')
+ %th= _('Ends')
%th &nbsp;
%tbody
- @broadcast_messages.each do |message|
@@ -32,7 +31,7 @@
%td
= message.ends_at
%td
- = link_to icon('pencil-square-o'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn btn-sm'
- = link_to icon('times'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-sm btn-danger'
+ = link_to icon('pencil-square-o'), edit_admin_broadcast_message_path(message), title: _('Edit'), class: 'btn btn-sm'
+ = link_to icon('times'), admin_broadcast_message_path(message), method: :delete, remote: true, title: _('Remove'), class: 'js-remove-tr btn btn-sm btn-danger'
= paginate @broadcast_messages, theme: 'gitlab'
diff --git a/changelogs/unreleased/broadcast-ext.yml b/changelogs/unreleased/broadcast-ext.yml
new file mode 100644
index 00000000000..911da8b133f
--- /dev/null
+++ b/changelogs/unreleased/broadcast-ext.yml
@@ -0,0 +1,5 @@
+---
+title: Externalize admin broadcast settings strings
+merge_request:
+author:
+type: other
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index a72e921dcce..25153f55773 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -387,6 +387,9 @@ msgstr ""
msgid "Add a table"
msgstr ""
+msgid "Add broadcast message"
+msgstr ""
+
msgid "Add image comment"
msgstr ""
@@ -903,6 +906,9 @@ msgstr ""
msgid "Average per day: %{average}"
msgstr ""
+msgid "Background Color"
+msgstr ""
+
msgid "Background Jobs"
msgstr ""
@@ -1146,6 +1152,12 @@ msgstr ""
msgid "Branches|protected"
msgstr ""
+msgid "Broadcast Messages"
+msgstr ""
+
+msgid "Broadcast messages are displayed for every user and can be used to notify users about scheduled maintenance, recent upgrades and more."
+msgstr ""
+
msgid "Browse Directory"
msgstr ""
@@ -2330,6 +2342,9 @@ msgstr ""
msgid "Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notification_link}."
msgstr ""
+msgid "Customize colors"
+msgstr ""
+
msgid "Customize how FogBugz email addresses and usernames are imported into GitLab. In the next step, you'll be able to select the projects you want to import."
msgstr ""
@@ -2806,6 +2821,9 @@ msgstr ""
msgid "Enabled"
msgstr ""
+msgid "Ends"
+msgstr ""
+
msgid "Ends at (UTC)"
msgstr ""
@@ -3229,6 +3247,9 @@ msgstr ""
msgid "Follow the steps below to export your Google Code project data."
msgstr ""
+msgid "Font Color"
+msgstr ""
+
msgid "For internal projects, any logged in user can view pipelines and access job details (output logs and artifacts)"
msgstr ""
@@ -6650,6 +6671,9 @@ msgstr ""
msgid "Started %{startsIn}"
msgstr ""
+msgid "Starts"
+msgstr ""
+
msgid "Starts %{startsIn}"
msgstr ""
@@ -7575,6 +7599,9 @@ msgstr ""
msgid "Update"
msgstr ""
+msgid "Update broadcast message"
+msgstr ""
+
msgid "Update now"
msgstr ""
@@ -8157,6 +8184,9 @@ msgstr ""
msgid "Your issues will be imported in the background. Once finished, you'll get a confirmation email."
msgstr ""
+msgid "Your message here"
+msgstr ""
+
msgid "Your name"
msgstr ""