Commit c46a128d authored by Martin Wortschack's avatar Martin Wortschack

Externalize strings in EE specific flash messages

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