Commit 2c629b26 authored by Gabriel Mazetto's avatar Gabriel Mazetto

I18n using namespace 'Geo'

parent 727bf2b8
......@@ -24,26 +24,26 @@ class Admin::GeoProjectsController < Admin::ApplicationController
def recheck
@registry.flag_repository_for_recheck!
redirect_back_or_admin_geo_projects(notice: "#{@registry.project.full_name} is scheduled for recheck")
redirect_back_or_admin_geo_projects(notice: s_('Geo|%{name} is scheduled for re-check') % { name: @registry.project.full_name })
end
def resync
@registry.flag_repository_for_resync!
redirect_back_or_admin_geo_projects(notice: "#{@registry.project.full_name} is scheduled for resync")
redirect_back_or_admin_geo_projects(notice: s_('Geo|%{name} is scheduled for re-sync') % { name: @registry.project.full_name })
end
def force_redownload
@registry.flag_repository_for_redownload!
redirect_back_or_admin_geo_projects(notice: "#{@registry.project.full_name} is scheduled for forced re-download")
redirect_back_or_admin_geo_projects(notice: s_('Geo|%{name} is scheduled for forced re-download') % { name: @registry.project.full_name })
end
private
def check_license
unless Gitlab::Geo.license_allows?
redirect_to admin_license_path, alert: 'You need a different license to use Geo replication'
redirect_to admin_license_path, alert: s_('Geo|You need a different license to use Geo replication')
end
end
......
......@@ -7,24 +7,24 @@
= link_to(recheck_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline btn-sm mr-2') do
= s_('Geo|Recheck')
= link_to(resync_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline-primary btn-sm') do
Resync
= s_('Geo|Resync')
.card-body
.container
.row
.col-sm.project-status-container
.project-status-title.text-muted
Status
= s_('Geo|Status')
.project-status-content.status-type-failure
In sync
= s_('Geo|In sync')
.col-sm.project-status-container
.project-status-title.text-muted
Last successful sync
= s_('Geo|Last successful sync')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.last_repository_successful_sync_at) if project_registry.last_repository_successful_sync_at
.col-sm.project-status-container
.project-status-title.text-muted
Last time verified
= s_('Geo|Last time verified')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.last_repository_check_at) if project_registry.last_repository_check_at
......
......@@ -9,9 +9,9 @@
= project_registry.project.name
- if project_registry.candidate_for_redownload?
= link_to(force_redownload_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline btn-sm mr-2') do
Redownload
= s_('Geo|Redownload')
= link_to(resync_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline-primary btn-sm') do
Resync
= s_('Geo|Resync')
.collapse.show{ id: "project-#{project_registry.project.id}", 'aria-labelledby' => "project-#{project_registry.project.id}-header" }
.card-body
......@@ -19,22 +19,22 @@
.row
.col-sm.project-status-container
.project-status-title.text-muted
Status
= s_('Geo|Status')
.project-status-content.status-type-failure
Failed
= s_('Geo|Failed')
.col-sm.project-status-container
.project-status-title.text-muted
Next sync scheduled at
= s_('Geo|Next sync scheduled at')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at) if project_registry.repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
Last sync attempt
= s_('Geo|Last sync attempt')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.last_repository_synced_at) if project_registry.last_repository_synced_at
.col-sm.project-status-container
.project-status-title.text-muted
Retry counts
= s_('Geo|Retry counts')
.project-status-content
= project_registry.repository_retry_count
......@@ -57,13 +57,11 @@
%li.p-0.d-flex
= sprite_icon('warning', size: 18, css_class: 'error-icon')
%span.error-text.prepend-left-5
Synchronization failed -
= project_registry.last_repository_sync_failure
= s_('Geo|Synchronization failed - %{error}') % { error: project_registry.last_repository_sync_failure }
- if project_registry.last_repository_verification_failure
%li.p-0.d-flex
= sprite_icon('warning', size: 18, css_class: 'error-icon')
%span.error-text.prepend-left-5
Verification failed -
= project_registry.last_repository_verification_failure
= s_('Geo|Verification failed - %{error}') % { error: project_registry.last_repository_verification_failure }
= paginate @registries, theme: 'gitlab'
......@@ -14,22 +14,22 @@
.row
.col-sm.project-status-container
.project-status-title.text-muted
Next sync scheduled at
= s_('Geo|Next sync scheduled at')
.project-status-content
= distance_of_time_in_words(Time.now, project.project_registry.repository_retry_at) if project.project_registry&.repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
Last sync attempt
= s_('Geo|Last sync attempt')
.project-status-content
= distance_of_time_in_words(Time.now, project.project_registry.last_repository_synced_at) if project.project_registry&.last_repository_synced_at
.col-sm.project-status-container
.project-status-title.text-muted
Retry counts
= s_('Geo|Retry counts')
.project-status-content
= project.project_registry.repository_retry_count if project.project_registry
.col-sm.project-status-container
.project-status-title.text-muted
Error message
= s_('Geo|Error message')
.project-status-content.font-weight-bold
= project.project_registry.last_repository_sync_failure if project.project_registry
......
......@@ -10,7 +10,7 @@
= link_to(recheck_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline btn-sm mr-2') do
= s_('Geo|Recheck')
= link_to(resync_admin_geo_project_path(project_registry), method: :post, class: 'btn btn-outline-primary btn-sm') do
Resync
= s_('Geo|Resync')
.collapse.show{ id: "project-#{project_registry.project.id}", 'aria-labelledby' => "project-#{project_registry.project.id}-header" }
.card-body
......@@ -18,21 +18,21 @@
.row
.col-sm.project-status-container
.project-status-title.text-muted
Status
= s_('Geo|Status')
.project-status-content.status-type-failure
Pending
= s_('Geo|Pending')
.col-sm.project-status-container
.project-status-title.text-muted
Next sync scheduled at
= s_('Geo|Next sync scheduled at')
.project-status-content
= distance_of_time_in_words(Time.now, project_registry.repository_retry_at) if project_registry.repository_retry_at
.col-sm.project-status-container
.project-status-title.text-muted
Last sync attempt
= s_('Geo|Last sync attempt')
.project-status-content
- if project_registry.last_repository_synced_at
= distance_of_time_in_words(Time.now, project_registry.last_repository_synced_at)
- else
Never
= s_('Geo|Never')
= paginate @registries, theme: 'gitlab'
......@@ -9,16 +9,16 @@
- opts = params[:sync_status].present? ? {} : { page: admin_geo_projects_path }
= nav_link(opts) do
= link_to admin_geo_projects_path do
= _("Synced")
= s_('Geo|Synced')
= nav_link(html_options: { class: active_when(params[:sync_status] == 'pending') }) do
= link_to admin_geo_projects_path(sync_status: 'pending') do
= _("Pending")
= s_('Geo|Pending')
= nav_link(html_options: { class: active_when(params[:sync_status] == 'failed') }) do
= link_to admin_geo_projects_path(sync_status: 'failed') do
= _("Failed")
= s_('Geo|Failed')
= nav_link(html_options: { class: active_when(params[:sync_status] == 'never') }) do
= link_to admin_geo_projects_path(sync_status: 'never') do
= _("Never")
= s_('Geo|Never')
- case params[:sync_status]
- when 'never'
......
......@@ -3220,33 +3220,96 @@ msgstr ""
msgid "GeoNodes|You have configured Geo nodes using an insecure HTTP connection. We recommend the use of HTTPS."
msgstr ""
msgid "Geo|%{name} is scheduled for forced re-download"
msgstr ""
msgid "Geo|%{name} is scheduled for re-check"
msgstr ""
msgid "Geo|%{name} is scheduled for re-sync"
msgstr ""
msgid "Geo|All projects"
msgstr ""
msgid "Geo|Error message"
msgstr ""
msgid "Geo|Failed"
msgstr ""
msgid "Geo|File sync capacity"
msgstr ""
msgid "Geo|Groups to synchronize"
msgstr ""
msgid "Geo|In sync"
msgstr ""
msgid "Geo|Last successful sync"
msgstr ""
msgid "Geo|Last sync attempt"
msgstr ""
msgid "Geo|Last time verified"
msgstr ""
msgid "Geo|Never"
msgstr ""
msgid "Geo|Next sync scheduled at"
msgstr ""
msgid "Geo|Pending"
msgstr ""
msgid "Geo|Projects in certain groups"
msgstr ""
msgid "Geo|Projects in certain storage shards"
msgstr ""
msgid "Geo|Recheck"
msgstr ""
msgid "Geo|Redownload"
msgstr ""
msgid "Geo|Repository sync capacity"
msgstr ""
msgid "Geo|Resync"
msgstr ""
msgid "Geo|Retry counts"
msgstr ""
msgid "Geo|Select groups to replicate."
msgstr ""
msgid "Geo|Shards to synchronize"
msgstr ""
msgid "Geo|Status"
msgstr ""
msgid "Geo|Synced"
msgstr ""
msgid "Geo|Synchronization failed - %{error}"
msgstr ""
msgid "Geo|Verification capacity"
msgstr ""
msgid "Geo|Verification failed - %{error}"
msgstr ""
msgid "Geo|You need a different license to use Geo replication"
msgstr ""
msgid "Git"
msgstr ""
......@@ -4342,9 +4405,6 @@ msgstr ""
msgid "Network"
msgstr ""
msgid "Never"
msgstr ""
msgid "New"
msgstr ""
......@@ -6181,9 +6241,6 @@ msgstr ""
msgid "Sync information"
msgstr ""
msgid "Synced"
msgstr ""
msgid "System Hooks"
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