Commit 8d8e2173 authored by Sean McGivern's avatar Sean McGivern

Merge branch '207834-add-missing-internationalization-support-to-error-messages' into 'master'

Add internationalization support to error messages [Part 1]

See merge request gitlab-org/gitlab!25819
parents e662ccf0 b335cb9c
...@@ -38,7 +38,7 @@ class Appearance < ApplicationRecord ...@@ -38,7 +38,7 @@ class Appearance < ApplicationRecord
def single_appearance_row def single_appearance_row
if self.class.any? if self.class.any?
errors.add(:single_appearance_row, 'Only 1 appearances row can exist') errors.add(:base, _('Only 1 appearances row can exist'))
end end
end end
......
...@@ -389,7 +389,7 @@ module ApplicationSettingImplementation ...@@ -389,7 +389,7 @@ module ApplicationSettingImplementation
def terms_exist def terms_exist
return unless enforce_terms? return unless enforce_terms?
errors.add(:terms, "You need to set terms to be enforced") unless terms.present? errors.add(:base, _('You need to set terms to be enforced')) unless terms.present?
end end
def expire_performance_bar_allowed_user_ids_cache def expire_performance_bar_allowed_user_ids_cache
......
...@@ -148,7 +148,7 @@ module Ci ...@@ -148,7 +148,7 @@ module Ci
def valid_file_format? def valid_file_format?
unless TYPE_AND_FORMAT_PAIRS[self.file_type&.to_sym] == self.file_format&.to_sym unless TYPE_AND_FORMAT_PAIRS[self.file_type&.to_sym] == self.file_format&.to_sym
errors.add(:file_format, 'Invalid file format with specified file type') errors.add(:base, _('Invalid file format with specified file type'))
end end
end end
......
...@@ -306,7 +306,7 @@ module Clusters ...@@ -306,7 +306,7 @@ module Clusters
.where.not(id: id) .where.not(id: id)
if duplicate_management_clusters.any? if duplicate_management_clusters.any?
errors.add(:environment_scope, "cannot add duplicated environment scope") errors.add(:environment_scope, 'cannot add duplicated environment scope')
end end
end end
...@@ -380,7 +380,7 @@ module Clusters ...@@ -380,7 +380,7 @@ module Clusters
def restrict_modification def restrict_modification
if provider&.on_creation? if provider&.on_creation?
errors.add(:base, "cannot modify during creation") errors.add(:base, _('Cannot modify provider during creation'))
return false return false
end end
......
...@@ -19,7 +19,7 @@ module HasRepository ...@@ -19,7 +19,7 @@ module HasRepository
def valid_repo? def valid_repo?
repository.exists? repository.exists?
rescue rescue
errors.add(:path, _('Invalid repository path')) errors.add(:base, _('Invalid repository path'))
false false
end end
......
...@@ -37,7 +37,7 @@ module Milestoneable ...@@ -37,7 +37,7 @@ module Milestoneable
private private
def milestone_is_valid def milestone_is_valid
errors.add(:milestone_id, message: "is invalid") if respond_to?(:milestone_id) && milestone_id.present? && !milestone_available? errors.add(:milestone_id, 'is invalid') if respond_to?(:milestone_id) && milestone_id.present? && !milestone_available?
end end
end end
......
...@@ -77,7 +77,7 @@ module TimeTrackable ...@@ -77,7 +77,7 @@ module TimeTrackable
return if time_spent.nil? || time_spent == :reset return if time_spent.nil? || time_spent == :reset
if time_spent < 0 && (time_spent.abs > original_total_time_spent) if time_spent < 0 && (time_spent.abs > original_total_time_spent)
errors.add(:time_spent, 'Time to subtract exceeds the total time spent') errors.add(:base, _('Time to subtract exceeds the total time spent'))
end end
end end
......
...@@ -105,7 +105,7 @@ class DeployToken < ApplicationRecord ...@@ -105,7 +105,7 @@ class DeployToken < ApplicationRecord
end end
def ensure_at_least_one_scope def ensure_at_least_one_scope
errors.add(:base, "Scopes can't be blank") unless read_repository || read_registry errors.add(:base, _("Scopes can't be blank")) unless read_repository || read_registry
end end
def default_username def default_username
......
...@@ -19,7 +19,13 @@ class DescriptionVersion < ApplicationRecord ...@@ -19,7 +19,13 @@ class DescriptionVersion < ApplicationRecord
def exactly_one_issuable def exactly_one_issuable
issuable_count = self.class.issuable_attrs.count { |attr| self["#{attr}_id"] } issuable_count = self.class.issuable_attrs.count { |attr| self["#{attr}_id"] }
errors.add(:base, "Exactly one of #{self.class.issuable_attrs.join(', ')} is required") if issuable_count != 1 if issuable_count != 1
errors.add(
:base,
_("Exactly one of %{attributes} is required") %
{ attributes: self.class.issuable_attrs.join(', ') }
)
end
end end
end end
......
...@@ -78,7 +78,7 @@ class ExternalPullRequest < ApplicationRecord ...@@ -78,7 +78,7 @@ class ExternalPullRequest < ApplicationRecord
def not_from_fork def not_from_fork
if from_fork? if from_fork?
errors.add(:base, 'Pull requests from fork are not supported') errors.add(:base, _('Pull requests from fork are not supported'))
end end
end end
......
...@@ -11,6 +11,6 @@ class MilestoneRelease < ApplicationRecord ...@@ -11,6 +11,6 @@ class MilestoneRelease < ApplicationRecord
def same_project_between_milestone_and_release def same_project_between_milestone_and_release
return if milestone&.project_id == release&.project_id return if milestone&.project_id == release&.project_id
errors.add(:base, 'does not have the same project as the milestone') errors.add(:base, _('Release does not have the same project as the milestone'))
end end
end end
...@@ -376,7 +376,7 @@ class Namespace < ApplicationRecord ...@@ -376,7 +376,7 @@ class Namespace < ApplicationRecord
def nesting_level_allowed def nesting_level_allowed
if ancestors.count > Group::NUMBER_OF_ANCESTORS_ALLOWED if ancestors.count > Group::NUMBER_OF_ANCESTORS_ALLOWED
errors.add(:parent_id, "has too deep level of nesting") errors.add(:parent_id, 'has too deep level of nesting')
end end
end end
......
...@@ -168,7 +168,7 @@ class IssueTrackerService < Service ...@@ -168,7 +168,7 @@ class IssueTrackerService < Service
return if project.blank? return if project.blank?
if project.services.external_issue_trackers.where.not(id: id).any? if project.services.external_issue_trackers.where.not(id: id).any?
errors.add(:base, 'Another issue tracker is already in use. Only one issue tracker service can be active at a time') errors.add(:base, _('Another issue tracker is already in use. Only one issue tracker service can be active at a time'))
end end
end end
end end
......
...@@ -69,13 +69,13 @@ class PrometheusAlert < ApplicationRecord ...@@ -69,13 +69,13 @@ class PrometheusAlert < ApplicationRecord
def require_valid_environment_project! def require_valid_environment_project!
return if project == environment&.project return if project == environment&.project
errors.add(:environment, "invalid project") errors.add(:environment, 'invalid project')
end end
def require_valid_metric_project! def require_valid_metric_project!
return if prometheus_metric&.common? return if prometheus_metric&.common?
return if project == prometheus_metric&.project return if project == prometheus_metric&.project
errors.add(:prometheus_metric, "invalid project") errors.add(:prometheus_metric, 'invalid project')
end end
end end
...@@ -37,6 +37,9 @@ class ResourceEvent < ApplicationRecord ...@@ -37,6 +37,9 @@ class ResourceEvent < ApplicationRecord
return true if issuable_count == 1 return true if issuable_count == 1
end end
errors.add(:base, "Exactly one of #{self.class.issuable_attrs.join(', ')} is required") errors.add(
:base, _("Exactly one of %{attributes} is required") %
{ attributes: self.class.issuable_attrs.join(', ') }
)
end end
end end
...@@ -111,7 +111,10 @@ class SentNotification < ApplicationRecord ...@@ -111,7 +111,10 @@ class SentNotification < ApplicationRecord
note = create_reply('Test', dryrun: true) note = create_reply('Test', dryrun: true)
unless note.valid? unless note.valid?
self.errors.add(:base, "Note parameters are invalid: #{note.errors.full_messages.to_sentence}") self.errors.add(
:base, _("Note parameters are invalid: %{errors}") %
{ errors: note.errors.full_messages.to_sentence }
)
end end
end end
......
...@@ -28,9 +28,9 @@ class Timelog < ApplicationRecord ...@@ -28,9 +28,9 @@ class Timelog < ApplicationRecord
def issuable_id_is_present def issuable_id_is_present
if issue_id && merge_request_id if issue_id && merge_request_id
errors.add(:base, 'Only Issue ID or Merge Request ID is required') errors.add(:base, _('Only Issue ID or Merge Request ID is required'))
elsif issuable.nil? elsif issuable.nil?
errors.add(:base, 'Issue or Merge Request ID is required') errors.add(:base, _('Issue or Merge Request ID is required'))
end end
end end
......
...@@ -108,13 +108,13 @@ module DesignManagement ...@@ -108,13 +108,13 @@ module DesignManagement
return if id_a == id_b return if id_a == id_b
errors.add(:issue, "must be the same on design and version") errors.add(:issue, 'must be the same on design and version')
end end
def design_and_version_have_issue_id def design_and_version_have_issue_id
return if [design, version].all? { |obj| obj.try(:issue_id).present? } return if [design, version].all? { |obj| obj.try(:issue_id).present? }
errors.add(:issue, "must be present on both design and version") errors.add(:issue, 'must be present on both design and version')
end end
end end
end end
...@@ -310,7 +310,7 @@ module EE ...@@ -310,7 +310,7 @@ module EE
return if custom_project_templates_group_id.blank? return if custom_project_templates_group_id.blank?
return if children.exists?(id: custom_project_templates_group_id) return if children.exists?(id: custom_project_templates_group_id)
errors.add(:custom_project_templates_group_id, "has to be a subgroup of the group") errors.add(:custom_project_templates_group_id, 'has to be a subgroup of the group')
end end
def billed_group_members def billed_group_members
......
...@@ -71,7 +71,7 @@ module EE ...@@ -71,7 +71,7 @@ module EE
def validate_managing_group def validate_managing_group
return unless saml_provider&.enforced_group_managed_accounts? return unless saml_provider&.enforced_group_managed_accounts?
errors.add(:base, 'Group requires separate account') if saml_provider.group != user.managing_group errors.add(:base, _('Group requires separate account')) if saml_provider.group != user.managing_group
end end
end end
end end
...@@ -131,7 +131,7 @@ module EE ...@@ -131,7 +131,7 @@ module EE
def cannot_be_admin_and_auditor def cannot_be_admin_and_auditor
if admin? && auditor? if admin? && auditor?
errors.add(:admin, "user cannot also be an Auditor.") errors.add(:admin, 'user cannot also be an Auditor.')
end end
end end
......
...@@ -343,14 +343,14 @@ class GeoNode < ApplicationRecord ...@@ -343,14 +343,14 @@ class GeoNode < ApplicationRecord
# Prevent locking yourself out # Prevent locking yourself out
def require_current_node_to_be_primary def require_current_node_to_be_primary
if name == self.class.current_node_name if name == self.class.current_node_name
errors.add(:base, 'Current node must be the primary node or you will be locking yourself out') errors.add(:base, _('Current node must be the primary node or you will be locking yourself out'))
end end
end end
# Prevent creating a Geo Node unless Hashed Storage is enabled # Prevent creating a Geo Node unless Hashed Storage is enabled
def require_hashed_storage def require_hashed_storage
unless Gitlab::CurrentSettings.hashed_storage_enabled? unless Gitlab::CurrentSettings.hashed_storage_enabled?
errors.add(:base, 'Hashed Storage must be enabled to use Geo') errors.add(:base, _('Hashed Storage must be enabled to use Geo'))
end end
end end
......
...@@ -476,7 +476,7 @@ class License < ApplicationRecord ...@@ -476,7 +476,7 @@ class License < ApplicationRecord
def valid_license def valid_license
return if license? return if license?
self.errors.add(:base, "The license key is invalid. Make sure it is exactly as you received it from GitLab Inc.") self.errors.add(:base, _('The license key is invalid. Make sure it is exactly as you received it from GitLab Inc.'))
end end
def prior_historical_max def prior_historical_max
...@@ -542,6 +542,6 @@ class License < ApplicationRecord ...@@ -542,6 +542,6 @@ class License < ApplicationRecord
def not_expired def not_expired
return unless self.license? && self.expired? return unless self.license? && self.expired?
self.errors.add(:base, "This license has already expired.") self.errors.add(:base, _('This license has already expired.'))
end end
end end
...@@ -35,7 +35,7 @@ class Packages::ConanMetadatum < ApplicationRecord ...@@ -35,7 +35,7 @@ class Packages::ConanMetadatum < ApplicationRecord
def conan_package_type def conan_package_type
unless package && package.conan? unless package && package.conan?
errors.add(:base, 'Package type must be Conan') errors.add(:base, _('Package type must be Conan'))
end end
end end
end end
...@@ -22,7 +22,7 @@ class Packages::MavenMetadatum < ApplicationRecord ...@@ -22,7 +22,7 @@ class Packages::MavenMetadatum < ApplicationRecord
def maven_package_type def maven_package_type
unless package && package.maven? unless package && package.maven?
errors.add(:base, 'Package type must be Maven') errors.add(:base, _('Package type must be Maven'))
end end
end end
end end
...@@ -125,7 +125,7 @@ class Packages::Package < ApplicationRecord ...@@ -125,7 +125,7 @@ class Packages::Package < ApplicationRecord
.id_not_in(id) .id_not_in(id)
.exists? .exists?
errors.add(:base, 'Package recipe already exists') if recipe_exists errors.add(:base, _('Package recipe already exists')) if recipe_exists
end end
def valid_npm_package_name def valid_npm_package_name
...@@ -140,7 +140,7 @@ class Packages::Package < ApplicationRecord ...@@ -140,7 +140,7 @@ class Packages::Package < ApplicationRecord
return unless project return unless project
if project.package_already_taken?(name) if project.package_already_taken?(name)
errors.add(:base, 'Package already exists') errors.add(:base, _('Package already exists'))
end end
end end
end end
...@@ -25,7 +25,7 @@ class ServiceDeskSetting < ApplicationRecord ...@@ -25,7 +25,7 @@ class ServiceDeskSetting < ApplicationRecord
def valid_issue_template def valid_issue_template
if issue_template_missing? if issue_template_missing?
errors.add(:issue_template_key, "is empty or does not exist") errors.add(:issue_template_key, 'is empty or does not exist')
end end
end end
end end
...@@ -12,14 +12,14 @@ module DraftNotes ...@@ -12,14 +12,14 @@ module DraftNotes
def execute def execute
if in_reply_to_discussion_id.present? if in_reply_to_discussion_id.present?
unless discussion unless discussion
return base_error('Thread to reply to cannot be found') return base_error(_('Thread to reply to cannot be found'))
end end
params[:discussion_id] = discussion.reply_id params[:discussion_id] = discussion.reply_id
end end
if params[:resolve_discussion] && !can_resolve_discussion? if params[:resolve_discussion] && !can_resolve_discussion?
return base_error('User is not allowed to resolve thread') return base_error(_('User is not allowed to resolve thread'))
end end
draft_note = DraftNote.new(params) draft_note = DraftNote.new(params)
......
...@@ -2015,6 +2015,9 @@ msgstr "" ...@@ -2015,6 +2015,9 @@ msgstr ""
msgid "Anonymous" msgid "Anonymous"
msgstr "" msgstr ""
msgid "Another issue tracker is already in use. Only one issue tracker service can be active at a time"
msgstr ""
msgid "Anti-spam verification" msgid "Anti-spam verification"
msgstr "" msgstr ""
...@@ -3251,6 +3254,9 @@ msgstr "" ...@@ -3251,6 +3254,9 @@ msgstr ""
msgid "Cannot modify managed Kubernetes cluster" msgid "Cannot modify managed Kubernetes cluster"
msgstr "" msgstr ""
msgid "Cannot modify provider during creation"
msgstr ""
msgid "Cannot refer to a group milestone by an internal id!" msgid "Cannot refer to a group milestone by an internal id!"
msgstr "" msgstr ""
...@@ -5820,6 +5826,9 @@ msgstr "" ...@@ -5820,6 +5826,9 @@ msgstr ""
msgid "Current node" msgid "Current node"
msgstr "" msgstr ""
msgid "Current node must be the primary node or you will be locking yourself out"
msgstr ""
msgid "Current password" msgid "Current password"
msgstr "" msgstr ""
...@@ -8021,6 +8030,9 @@ msgstr "" ...@@ -8021,6 +8030,9 @@ msgstr ""
msgid "Evidence collection" msgid "Evidence collection"
msgstr "" msgstr ""
msgid "Exactly one of %{attributes} is required"
msgstr ""
msgid "Example: @sub\\.company\\.com$" msgid "Example: @sub\\.company\\.com$"
msgstr "" msgstr ""
...@@ -9779,6 +9791,9 @@ msgstr "" ...@@ -9779,6 +9791,9 @@ msgstr ""
msgid "Group pipeline minutes were successfully reset." msgid "Group pipeline minutes were successfully reset."
msgstr "" msgstr ""
msgid "Group requires separate account"
msgstr ""
msgid "Group variables (inherited)" msgid "Group variables (inherited)"
msgstr "" msgstr ""
...@@ -10124,6 +10139,9 @@ msgstr "" ...@@ -10124,6 +10139,9 @@ msgstr ""
msgid "HTTP Basic: Access denied\\nYou must use a personal access token with 'api' scope for Git over HTTP.\\nYou can generate one at %{profile_personal_access_tokens_url}" msgid "HTTP Basic: Access denied\\nYou must use a personal access token with 'api' scope for Git over HTTP.\\nYou can generate one at %{profile_personal_access_tokens_url}"
msgstr "" msgstr ""
msgid "Hashed Storage must be enabled to use Geo"
msgstr ""
msgid "Hashed repository storage paths" msgid "Hashed repository storage paths"
msgstr "" msgstr ""
...@@ -10758,6 +10776,9 @@ msgstr "" ...@@ -10758,6 +10776,9 @@ msgstr ""
msgid "Invalid field" msgid "Invalid field"
msgstr "" msgstr ""
msgid "Invalid file format with specified file type"
msgstr ""
msgid "Invalid file." msgid "Invalid file."
msgstr "" msgstr ""
...@@ -10851,6 +10872,9 @@ msgstr "" ...@@ -10851,6 +10872,9 @@ msgstr ""
msgid "Issue events" msgid "Issue events"
msgstr "" msgstr ""
msgid "Issue or Merge Request ID is required"
msgstr ""
msgid "Issue template (optional)" msgid "Issue template (optional)"
msgstr "" msgstr ""
...@@ -13147,6 +13171,9 @@ msgstr "" ...@@ -13147,6 +13171,9 @@ msgstr ""
msgid "Note" msgid "Note"
msgstr "" msgstr ""
msgid "Note parameters are invalid: %{errors}"
msgstr ""
msgid "Note that this invitation was sent to %{mail_to_invite_email}, but you are signed in as %{link_to_current_user} with email %{mail_to_current_user}." msgid "Note that this invitation was sent to %{mail_to_invite_email}, but you are signed in as %{link_to_current_user} with email %{mail_to_current_user}."
msgstr "" msgstr ""
...@@ -13380,6 +13407,12 @@ msgstr "" ...@@ -13380,6 +13407,12 @@ msgstr ""
msgid "Only 'Reporter' roles and above on tiers Premium / Silver and above can see Value Stream Analytics." msgid "Only 'Reporter' roles and above on tiers Premium / Silver and above can see Value Stream Analytics."
msgstr "" msgstr ""
msgid "Only 1 appearances row can exist"
msgstr ""
msgid "Only Issue ID or Merge Request ID is required"
msgstr ""
msgid "Only Project Members" msgid "Only Project Members"
msgstr "" msgstr ""
...@@ -13554,12 +13587,24 @@ msgstr "" ...@@ -13554,12 +13587,24 @@ msgstr ""
msgid "Package Registry" msgid "Package Registry"
msgstr "" msgstr ""
msgid "Package already exists"
msgstr ""
msgid "Package deleted successfully" msgid "Package deleted successfully"
msgstr "" msgstr ""
msgid "Package information" msgid "Package information"
msgstr "" msgstr ""
msgid "Package recipe already exists"
msgstr ""
msgid "Package type must be Conan"
msgstr ""
msgid "Package type must be Maven"
msgstr ""
msgid "Package was removed" msgid "Package was removed"
msgstr "" msgstr ""
...@@ -15759,6 +15804,9 @@ msgstr "" ...@@ -15759,6 +15804,9 @@ msgstr ""
msgid "Pull" msgid "Pull"
msgstr "" msgstr ""
msgid "Pull requests from fork are not supported"
msgstr ""
msgid "Puma is running with a thread count above 1 and the Rugged service is enabled. This may decrease performance in some environments. See our %{link_start}documentation%{link_end} for details of this issue." msgid "Puma is running with a thread count above 1 and the Rugged service is enabled. This may decrease performance in some environments. See our %{link_start}documentation%{link_end} for details of this issue."
msgstr "" msgstr ""
...@@ -16021,6 +16069,9 @@ msgid_plural "Releases" ...@@ -16021,6 +16069,9 @@ msgid_plural "Releases"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Release does not have the same project as the milestone"
msgstr ""
msgid "Release notes" msgid "Release notes"
msgstr "" msgstr ""
...@@ -16840,6 +16891,9 @@ msgstr "" ...@@ -16840,6 +16891,9 @@ msgstr ""
msgid "Scopes" msgid "Scopes"
msgstr "" msgstr ""
msgid "Scopes can't be blank"
msgstr ""
msgid "Scroll down" msgid "Scroll down"
msgstr "" msgstr ""
...@@ -19358,6 +19412,9 @@ msgstr "" ...@@ -19358,6 +19412,9 @@ 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 key is invalid. Make sure it is exactly as you received it from GitLab Inc."
msgstr ""
msgid "The license was removed. GitLab has fallen back on the previous license." msgid "The license was removed. GitLab has fallen back on the previous license."
msgstr "" msgstr ""
...@@ -20012,6 +20069,9 @@ msgstr "" ...@@ -20012,6 +20069,9 @@ msgstr ""
msgid "This job will automatically run after its timer finishes. Often they are used for incremental roll-out deploys to production environments. When unscheduled it converts into a manual action." msgid "This job will automatically run after its timer finishes. Often they are used for incremental roll-out deploys to production environments. When unscheduled it converts into a manual action."
msgstr "" msgstr ""
msgid "This license has already expired."
msgstr ""
msgid "This may expose confidential information as the selected fork is in another namespace that can have other members." msgid "This may expose confidential information as the selected fork is in another namespace that can have other members."
msgstr "" msgstr ""
...@@ -20123,6 +20183,9 @@ msgstr "" ...@@ -20123,6 +20183,9 @@ msgstr ""
msgid "Those emails automatically become issues (with the comments becoming the email conversation) listed here." msgid "Those emails automatically become issues (with the comments becoming the email conversation) listed here."
msgstr "" msgstr ""
msgid "Thread to reply to cannot be found"
msgstr ""
msgid "Threat Monitoring" msgid "Threat Monitoring"
msgstr "" msgstr ""
...@@ -20219,6 +20282,9 @@ msgstr "" ...@@ -20219,6 +20282,9 @@ msgstr ""
msgid "Time to merge" msgid "Time to merge"
msgstr "" msgstr ""
msgid "Time to subtract exceeds the total time spent"
msgstr ""
msgid "Time tracking" msgid "Time tracking"
msgstr "" msgstr ""
...@@ -21297,6 +21363,9 @@ msgstr "" ...@@ -21297,6 +21363,9 @@ msgstr ""
msgid "User identity was successfully updated." msgid "User identity was successfully updated."
msgstr "" msgstr ""
msgid "User is not allowed to resolve thread"
msgstr ""
msgid "User key was successfully removed." msgid "User key was successfully removed."
msgstr "" msgstr ""
...@@ -22612,6 +22681,9 @@ msgstr "" ...@@ -22612,6 +22681,9 @@ msgstr ""
msgid "You need to register a two-factor authentication app before you can set up a U2F device." msgid "You need to register a two-factor authentication app before you can set up a U2F device."
msgstr "" msgstr ""
msgid "You need to set terms to be enforced"
msgstr ""
msgid "You need to specify both an Access Token and a Host URL." msgid "You need to specify both an Access Token and a Host URL."
msgstr "" msgstr ""
......
...@@ -86,7 +86,7 @@ describe Clusters::UpdateService do ...@@ -86,7 +86,7 @@ describe Clusters::UpdateService do
it 'rejects changes' do it 'rejects changes' do
is_expected.to eq(false) is_expected.to eq(false)
expect(cluster.errors.full_messages).to include('cannot modify during creation') expect(cluster.errors.full_messages).to include('Cannot modify provider during creation')
end end
end end
end end
......
...@@ -109,7 +109,7 @@ RSpec.shared_examples 'time tracking endpoints' do |issuable_name| ...@@ -109,7 +109,7 @@ RSpec.shared_examples 'time tracking endpoints' do |issuable_name|
end end
expect(response).to have_gitlab_http_status(:bad_request) expect(response).to have_gitlab_http_status(:bad_request)
expect(json_response['message']['time_spent'].first).to match(/exceeds the total time spent/) expect(json_response['message']['base'].first).to eq(_('Time to subtract exceeds the total time spent'))
end end
end end
end end
......
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