diff options
author | Luke Bennett <lbennett@gitlab.com> | 2019-01-28 03:53:53 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2019-01-28 04:58:48 +0000 |
commit | e3daac3be565e9f95632e5824f547a5cd3fcd898 (patch) | |
tree | ba76c230111c76bbb2cdffdd4e5bab89a24cf023 | |
parent | c243b154abf5c29ba35fd2fab2ca3bc010fdc324 (diff) | |
download | gitlab-ce-applications-ext.tar.gz |
Externalize system OAuth apps stringsapplications-ext
-rw-r--r-- | app/views/admin/applications/_delete_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/applications/_form.html.haml | 12 | ||||
-rw-r--r-- | app/views/admin/applications/edit.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/applications/index.html.haml | 20 | ||||
-rw-r--r-- | app/views/admin/applications/new.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/applications/show.html.haml | 10 | ||||
-rw-r--r-- | app/views/shared/tokens/_scopes_list.html.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/applications-ext.yml | 5 | ||||
-rw-r--r-- | locale/gitlab.pot | 33 |
9 files changed, 66 insertions, 30 deletions
diff --git a/app/views/admin/applications/_delete_form.html.haml b/app/views/admin/applications/_delete_form.html.haml index 82781f6716d..a73640788f5 100644 --- a/app/views/admin/applications/_delete_form.html.haml +++ b/app/views/admin/applications/_delete_form.html.haml @@ -1,4 +1,4 @@ - submit_btn_css ||= 'btn btn-link btn-remove btn-sm' = form_tag admin_application_path(application) do %input{ :name => "_method", :type => "hidden", :value => "delete" }/ - = submit_tag 'Destroy', onclick: "return confirm('Are you sure?')", class: submit_btn_css + = submit_tag _('Destroy'), onclick: "return confirm('#{_('Are you sure?')}')", class: submit_btn_css diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml index 12690343f6e..5155883fd73 100644 --- a/app/views/admin/applications/_form.html.haml +++ b/app/views/admin/applications/_form.html.haml @@ -13,19 +13,17 @@ = f.text_area :redirect_uri, class: 'form-control' = doorkeeper_errors_for application, :redirect_uri %span.form-text.text-muted - Use one line per URI + = _('Use one line per URI') - if Doorkeeper.configuration.native_redirect_uri %span.form-text.text-muted - Use - %code= Doorkeeper.configuration.native_redirect_uri - for local tests + = _('Use <code>%{doorkeeper_uri}</code> for local tests').html_safe % { doorkeeper_uri: Doorkeeper.configuration.native_redirect_uri } = content_tag :div, class: 'form-group row' do = f.label :trusted, class: 'col-sm-2 col-form-label pt-0' .col-sm-10 = f.check_box :trusted %span.form-text.text-muted - Trusted applications are automatically authorized on GitLab OAuth flow. + = _('Trusted applications are automatically authorized on GitLab OAuth flow.') .form-group.row = f.label :scopes, class: 'col-sm-2 col-form-label pt-0' @@ -33,5 +31,5 @@ = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes .form-actions - = f.submit 'Submit', class: "btn btn-success wide" - = link_to "Cancel", admin_applications_path, class: "btn btn-cancel" + = f.submit _('Submit'), class: "btn btn-success wide" + = link_to _('Cancel'), admin_applications_path, class: "btn btn-cancel" diff --git a/app/views/admin/applications/edit.html.haml b/app/views/admin/applications/edit.html.haml index 13c408914bb..facbec31f30 100644 --- a/app/views/admin/applications/edit.html.haml +++ b/app/views/admin/applications/edit.html.haml @@ -1,7 +1,7 @@ -- add_to_breadcrumbs "Applications", admin_applications_path +- add_to_breadcrumbs _('Applications'), admin_applications_path - breadcrumb_title @application.name -- page_title "Edit", @application.name, "Applications" +- page_title _('Edit'), @application.name, _('Applications') -%h3.page-title Edit application +%h3.page-title= _('Edit application') - @url = admin_application_path(@application) = render 'form', application: @application diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml index 2cdf98075d1..56aa06009f4 100644 --- a/app/views/admin/applications/index.html.haml +++ b/app/views/admin/applications/index.html.haml @@ -1,17 +1,17 @@ -- page_title "Applications" +- page_title _('Applications') %h3.page-title - System OAuth applications + = _('System OAuth applications') %p.light - System OAuth applications don't belong to any user and can only be managed by admins + = _("System OAuth applications don't belong to any user and can only be managed by admins") %hr -%p= link_to 'New application', new_admin_application_path, class: 'btn btn-success' +%p= link_to _('New application'), new_admin_application_path, class: 'btn btn-success' %table.table %thead %tr - %th Name - %th Callback URL - %th Clients - %th Trusted + %th= _('Name') + %th= _('Callback URL') + %th= _('Clients') + %th= _('Trusted') %th %th %tbody.oauth-applications @@ -20,6 +20,6 @@ %td= link_to application.name, admin_application_path(application) %td= application.redirect_uri %td= application.access_tokens.map(&:resource_owner_id).uniq.count - %td= application.trusted? ? 'Y': 'N' - %td= link_to 'Edit', edit_admin_application_path(application), class: 'btn btn-link' + %td= application.trusted? ? s_('Confirmation|Y') : s_('Confirmation|N') + %td= link_to _('Edit'), edit_admin_application_path(application), class: 'btn btn-link' %td= render 'delete_form', application: application diff --git a/app/views/admin/applications/new.html.haml b/app/views/admin/applications/new.html.haml index 346c58877d9..cd947b7fe81 100644 --- a/app/views/admin/applications/new.html.haml +++ b/app/views/admin/applications/new.html.haml @@ -1,6 +1,6 @@ -- breadcrumb_title "Applications" -- page_title "New Application" +- breadcrumb_title _('Applications') +- page_title _('New Application') -%h3.page-title New application +%h3.page-title= _('New application') - @url = admin_applications_path = render 'form', application: @application diff --git a/app/views/admin/applications/show.html.haml b/app/views/admin/applications/show.html.haml index df3eeba907c..c2f78c99faf 100644 --- a/app/views/admin/applications/show.html.haml +++ b/app/views/admin/applications/show.html.haml @@ -1,7 +1,7 @@ -- page_title @application.name, "Applications" +- page_title @application.name, _('Applications') %h3.page-title - Application: #{@application.name} + = _('Application: %{application_name}') % { application_name: @application.name } .table-holder.oauth-application-show %table.table @@ -32,12 +32,12 @@ %span.monospace= uri %tr %td - Trusted + = _('Trusted') %td - = @application.trusted? ? 'Y' : 'N' + = @application.trusted? ? s_('Confirmation|Y') : s_('Confirmation|N') = render "shared/tokens/scopes_list", token: @application .form-actions - = link_to 'Edit', edit_admin_application_path(@application), class: 'btn btn-primary wide float-left' + = link_to _('Edit'), edit_admin_application_path(@application), class: 'btn btn-primary wide float-left' = render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger prepend-left-10' diff --git a/app/views/shared/tokens/_scopes_list.html.haml b/app/views/shared/tokens/_scopes_list.html.haml index f99e905e95c..428861485b4 100644 --- a/app/views/shared/tokens/_scopes_list.html.haml +++ b/app/views/shared/tokens/_scopes_list.html.haml @@ -4,7 +4,7 @@ %tr %td - Scopes + = _('Scopes') %td %ul.scopes-list.append-bottom-0 - token.scopes.each do |scope| diff --git a/changelogs/unreleased/applications-ext.yml b/changelogs/unreleased/applications-ext.yml new file mode 100644 index 00000000000..51c08069b04 --- /dev/null +++ b/changelogs/unreleased/applications-ext.yml @@ -0,0 +1,5 @@ +--- +title: Externalize system OAuth strings +merge_request: +author: +type: other diff --git a/locale/gitlab.pot b/locale/gitlab.pot index a72e921dcce..420f877d193 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -681,6 +681,9 @@ msgstr "" msgid "Application ID" msgstr "" +msgid "Application: %{application_name}" +msgstr "" + msgid "Application: %{name}" msgstr "" @@ -2063,6 +2066,12 @@ msgstr "" msgid "Configure the way a user creates a new account." msgstr "" +msgid "Confirmation|N" +msgstr "" + +msgid "Confirmation|Y" +msgstr "" + msgid "Connect" msgstr "" @@ -4524,6 +4533,9 @@ msgstr "" msgid "New Snippets" msgstr "" +msgid "New application" +msgstr "" + msgid "New branch" msgstr "" @@ -6057,6 +6069,9 @@ msgstr "" msgid "Scope" msgstr "" +msgid "Scopes" +msgstr "" + msgid "Scroll down to <strong>Google Code Project Hosting</strong> and enable the switch on the right." msgstr "" @@ -6686,6 +6701,9 @@ msgstr "" msgid "Subgroups and projects" msgstr "" +msgid "Submit" +msgstr "" + msgid "Submit as spam" msgstr "" @@ -6725,6 +6743,12 @@ msgstr "" msgid "System Info" msgstr "" +msgid "System OAuth applications" +msgstr "" + +msgid "System OAuth applications don't belong to any user and can only be managed by admins" +msgstr "" + msgid "System metrics (Custom)" msgstr "" @@ -7491,6 +7515,12 @@ msgstr "" msgid "Triggers can force a specific branch or tag to get rebuilt with an API call. These tokens will impersonate their associated user including their access to projects and their project permissions." msgstr "" +msgid "Trusted" +msgstr "" + +msgid "Trusted applications are automatically authorized on GitLab OAuth flow." +msgstr "" + msgid "Try again" msgstr "" @@ -7611,6 +7641,9 @@ msgstr "" msgid "Usage statistics" msgstr "" +msgid "Use <code>%{doorkeeper_uri}</code> for local tests" +msgstr "" + msgid "Use <code>%{native_redirect_uri}</code> for local tests" msgstr "" |