Commit 7ee640ff authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'mw-i18n-flashes-ee-specific' into 'master'

Externalize strings in EE specific flash messages

See merge request gitlab-org/gitlab-ee!10989
parents ae8bfa83 c46a128d
......@@ -23,7 +23,7 @@ class Admin::Geo::NodesController < Admin::Geo::ApplicationController
@node = ::Geo::NodeCreateService.new(geo_node_params).execute
if @node.persisted?
redirect_to admin_geo_nodes_path, notice: 'Node was successfully created.'
redirect_to admin_geo_nodes_path, notice: _('Node was successfully created.')
else
@nodes = GeoNode.all
......@@ -37,7 +37,7 @@ class Admin::Geo::NodesController < Admin::Geo::ApplicationController
def update
if ::Geo::NodeUpdateService.new(@node, geo_node_params).execute
redirect_to admin_geo_nodes_path, notice: 'Node was successfully updated.'
redirect_to admin_geo_nodes_path, notice: _('Node was successfully updated.')
else
render :edit
end
......
......@@ -24,7 +24,7 @@ class Admin::LicensesController < Admin::ApplicationController
def create
unless params[:license][:data].present? || params[:license][:data_file].present?
flash[:alert] = 'Please enter or upload a license.'
flash[:alert] = _('Please enter or upload a license.')
@license = License.new
redirect_to new_admin_license_path
......@@ -35,7 +35,7 @@ class Admin::LicensesController < Admin::ApplicationController
respond_with(@license, location: admin_license_path) do
if @license.save
flash[:notice] = "The license was successfully uploaded and is now active. You can see the details below."
flash[:notice] = _('The license was successfully uploaded and is now active. You can see the details below.')
end
end
end
......@@ -44,9 +44,9 @@ class Admin::LicensesController < Admin::ApplicationController
license.destroy
if License.current
flash[:notice] = "The license was removed. GitLab has fallen back on the previous license."
flash[:notice] = _('The license was removed. GitLab has fallen back on the previous license.')
else
flash[:alert] = "The license was removed. GitLab now no longer has a valid license."
flash[:alert] = _('The license was removed. GitLab now no longer has a valid license.')
end
redirect_to admin_license_path, status: :found
......
......@@ -13,7 +13,7 @@ class Admin::PushRulesController < Admin::ApplicationController
@push_rule.update(push_rule_params)
if @push_rule.valid?
redirect_to admin_push_rule_path, notice: 'Push Rule updated successfully.'
redirect_to admin_push_rule_path, notice: _('Push Rule updated successfully.')
else
render :show
end
......
......@@ -8,9 +8,9 @@ module EE
group
if ClearNamespaceSharedRunnersMinutesService.new(@group).execute
redirect_to [:admin, @group], notice: 'Group pipeline minutes were successfully reset.'
redirect_to [:admin, @group], notice: _('Group pipeline minutes were successfully reset.')
else
flash.now[:error] = 'There was an error resetting group pipeline minutes.'
flash.now[:error] = _('There was an error resetting group pipeline minutes.')
render "edit"
end
end
......
......@@ -8,9 +8,9 @@ module EE
user
if ClearNamespaceSharedRunnersMinutesService.new(@user.namespace).execute
redirect_to [:admin, @user], notice: 'User pipeline minutes were successfully reset.'
redirect_to [:admin, @user], notice: _('User pipeline minutes were successfully reset.')
else
flash.now[:error] = 'There was an error resetting user pipeline minutes.'
flash.now[:error] = _('There was an error resetting user pipeline minutes.')
render "edit"
end
end
......
......@@ -16,8 +16,8 @@ module EE
private
def show_ldap_sync_flash
flash[:notice] = 'LDAP sync in progress. This could take a few minutes. '\
'Refresh the page to see the changes.'
flash[:notice] = _('LDAP sync in progress. This could take a few minutes. '\
'Refresh the page to see the changes.')
end
end
end
......
......@@ -13,11 +13,11 @@ module EE
if result[:status] == :success
flash[:notice] =
if project.mirror?
"Mirroring settings were successfully updated. The project is being updated."
_('Mirroring settings were successfully updated. The project is being updated.')
elsif project.previous_changes.key?('mirror')
"Mirroring was successfully disabled."
_('Mirroring was successfully disabled.')
else
"Mirroring settings were successfully updated."
_('Mirroring settings were successfully updated.')
end
else
flash[:alert] = project.errors.full_messages.join(', ').html_safe
......@@ -39,10 +39,10 @@ module EE
def update_now
if params[:sync_remote]
project.update_remote_mirrors
flash[:notice] = "The remote repository is being updated..."
flash[:notice] = _('The remote repository is being updated...')
else
project.import_state.force_import_job!
flash[:notice] = "The repository is being updated..."
flash[:notice] = _('The repository is being updated...')
end
redirect_to_repository_settings(project, anchor: 'js-push-remote-settings')
......
......@@ -43,7 +43,7 @@ module EE
@metric = project.prometheus_metrics.create(metrics_params) # rubocop:disable Gitlab/ModuleWithInstanceVariables
if @metric.persisted? # rubocop:disable Gitlab/ModuleWithInstanceVariables
redirect_to edit_project_service_path(project, ::PrometheusService),
notice: 'Metric was successfully added.'
notice: _('Metric was successfully added.')
else
render 'new'
end
......@@ -55,7 +55,7 @@ module EE
if @metric.persisted? # rubocop:disable Gitlab/ModuleWithInstanceVariables
redirect_to edit_project_service_path(project, ::PrometheusService),
notice: 'Metric was successfully updated.'
notice: _('Metric was successfully updated.')
else
render 'edit'
end
......
......@@ -37,7 +37,7 @@ class Groups::HooksController < Groups::ApplicationController
set_hook_execution_notice(result)
else
flash[:alert] = 'Hook execution failed. Ensure the group has a project with commits.'
flash[:alert] = _('Hook execution failed. Ensure the group has a project with commits.')
end
redirect_back_or_default(default: { action: 'index' })
......
......@@ -80,12 +80,12 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
if result[:status] == :success
respond_to do |format|
format.html { redirect_to_index(notice: 'Feature flag was successfully removed.') }
format.html { redirect_to_index(notice: _('Feature flag was successfully removed.')) }
format.json { render_success_json(feature_flag) }
end
else
respond_to do |format|
format.html { redirect_to_index(alert: 'Feature flag was not removed.') }
format.html { redirect_to_index(alert: _('Feature flag was not removed.')) }
format.json { render_error_json(result[:message]) }
end
end
......
......@@ -16,7 +16,7 @@ class Projects::PushRulesController < Projects::ApplicationController
@push_rule.update(push_rule_params)
if @push_rule.valid?
flash[:notice] = 'Push Rules updated successfully.'
flash[:notice] = _('Push Rules updated successfully.')
else
flash[:alert] = @push_rule.errors.full_messages.join(', ').html_safe
end
......
......@@ -4717,6 +4717,12 @@ msgstr ""
msgid "Feature Flags"
msgstr ""
msgid "Feature flag was not removed."
msgstr ""
msgid "Feature flag was successfully removed."
msgstr ""
msgid "FeatureFlags|* (All Environments)"
msgstr ""
......@@ -5661,6 +5667,9 @@ msgstr ""
msgid "Group overview content"
msgstr ""
msgid "Group pipeline minutes were successfully reset."
msgstr ""
msgid "Group was successfully updated."
msgstr ""
......@@ -5948,6 +5957,9 @@ msgstr ""
msgid "History"
msgstr ""
msgid "Hook execution failed. Ensure the group has a project with commits."
msgstr ""
msgid "Hook was successfully created."
msgstr ""
......@@ -6589,6 +6601,9 @@ msgstr ""
msgid "LDAP settings"
msgstr ""
msgid "LDAP sync in progress. This could take a few minutes. Refresh the page to see the changes."
msgstr ""
msgid "LFS"
msgstr ""
......@@ -7205,6 +7220,12 @@ msgstr ""
msgid "Messages"
msgstr ""
msgid "Metric was successfully added."
msgstr ""
msgid "Metric was successfully updated."
msgstr ""
msgid "Metrics"
msgstr ""
......@@ -7385,6 +7406,12 @@ msgstr ""
msgid "Mirroring settings were successfully updated."
msgstr ""
msgid "Mirroring settings were successfully updated. The project is being updated."
msgstr ""
msgid "Mirroring was successfully disabled."
msgstr ""
msgid "MissingSSHKeyWarningLink|add an SSH key"
msgstr ""
......@@ -7726,6 +7753,12 @@ msgstr ""
msgid "No, directly import the existing email addresses and usernames."
msgstr ""
msgid "Node was successfully created."
msgstr ""
msgid "Node was successfully updated."
msgstr ""
msgid "Nodes"
msgstr ""
......@@ -8406,6 +8439,9 @@ msgstr ""
msgid "Please enter a valid number"
msgstr ""
msgid "Please enter or upload a license."
msgstr ""
msgid "Please fill in a descriptive name for your group."
msgstr ""
......@@ -9201,9 +9237,15 @@ msgstr ""
msgid "Push"
msgstr ""
msgid "Push Rule updated successfully."
msgstr ""
msgid "Push Rules"
msgstr ""
msgid "Push Rules updated successfully."
msgstr ""
msgid "Push an existing Git repository"
msgstr ""
......@@ -11244,6 +11286,15 @@ msgstr ""
msgid "The issue stage shows the time it takes from creating an issue to assigning the issue to a milestone, or add the issue to a list on your Issue Board. Begin creating issues to see data for this stage."
msgstr ""
msgid "The license was removed. GitLab has fallen back on the previous license."
msgstr ""
msgid "The license was removed. GitLab now no longer has a valid license."
msgstr ""
msgid "The license was successfully uploaded and is now active. You can see the details below."
msgstr ""
msgid "The maximum file size allowed is %{size}."
msgstr ""
......@@ -11316,6 +11367,9 @@ msgstr ""
msgid "The repository for this project is empty"
msgstr ""
msgid "The repository is being updated..."
msgstr ""
msgid "The repository must be accessible over <code>http://</code>, <code>https://</code> or <code>git://</code>."
msgstr ""
......@@ -11439,6 +11493,12 @@ msgstr ""
msgid "There was an error removing the e-mail."
msgstr ""
msgid "There was an error resetting group pipeline minutes."
msgstr ""
msgid "There was an error resetting user pipeline minutes."
msgstr ""
msgid "There was an error saving your changes."
msgstr ""
......@@ -12412,6 +12472,9 @@ msgstr ""
msgid "User map"
msgstr ""
msgid "User pipeline minutes were successfully reset."
msgstr ""
msgid "User settings"
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