Commit c755174d authored by Martin Wortschack's avatar Martin Wortschack Committed by Dmitriy Zaporozhets

Externalize strings in lib/gitlab/quick_actions

- Externalize strings for desc and explanation
- Update PO file
parent 28a278a4
......@@ -8,9 +8,9 @@ module EE
include ::Gitlab::QuickActions::Dsl
included do
desc 'Change assignee(s)'
desc _('Change assignee(s)')
explanation do
'Change assignee(s).'
_('Change assignee(s).')
end
params '@user1 @user2'
types Issue, MergeRequest
......@@ -23,9 +23,9 @@ module EE
@updates[:assignee_ids] = extract_users(reassign_param).map(&:id)
end
desc 'Set weight'
desc _('Set weight')
explanation do |weight|
"Sets weight to #{weight}." if weight
_("Sets weight to %{weight}.") % { weight: weight } if weight
end
params "0, 1, 2, …"
types Issue, MergeRequest
......@@ -40,8 +40,8 @@ module EE
@updates[:weight] = weight if weight
end
desc 'Clear weight'
explanation 'Clears weight.'
desc _('Clear weight')
explanation _('Clears weight.')
types Issue, MergeRequest
condition do
quick_action_target.persisted? &&
......
......@@ -8,10 +8,13 @@ module Gitlab
included do
# Commit only quick actions definitions
desc 'Tag this commit.'
desc _('Tag this commit.')
explanation do |tag_name, message|
with_message = %{ with "#{message}"} if message.present?
"Tags this commit to #{tag_name}#{with_message}."
if message.present?
_("Tags this commit to %{tag_name} with \"%{message}\".") % { tag_name: tag_name, message: message }
else
_("Tags this commit to %{tag_name}.") % { tag_name: tag_name }
end
end
params 'v1.2.3 <message>'
parse_params do |tag_name_and_message|
......
......@@ -43,9 +43,9 @@ module Gitlab
@updates[:state_event] = 'reopen'
end
desc 'Change title'
desc _('Change title')
explanation do |title_param|
"Changes the title to \"#{title_param}\"."
_("Changes the title to \"%{title_param}\".") % { title_param: title_param }
end
params '<New title>'
types Issuable
......@@ -57,7 +57,7 @@ module Gitlab
@updates[:title] = title_param
end
desc 'Add label(s)'
desc _('Add label(s)')
explanation do |labels_param|
labels = find_label_references(labels_param)
......@@ -81,13 +81,13 @@ module Gitlab
end
end
desc 'Remove all or specific label(s)'
desc _('Remove all or specific label(s)')
explanation do |labels_param = nil|
if labels_param.present?
labels = find_label_references(labels_param)
"Removes #{labels.join(' ')} #{'label'.pluralize(labels.count)}." if labels.any?
else
'Removes all labels.'
_('Removes all labels.')
end
end
params '~label1 ~"label 2"'
......@@ -112,7 +112,7 @@ module Gitlab
end
end
desc 'Replace all label(s)'
desc _('Replace all label(s)')
explanation do |labels_param|
labels = find_label_references(labels_param)
"Replaces all labels with #{labels.join(' ')} #{'label'.pluralize(labels.count)}." if labels.any?
......@@ -135,8 +135,8 @@ module Gitlab
end
end
desc 'Add a todo'
explanation 'Adds a todo.'
desc _('Add a todo')
explanation _('Adds a todo.')
types Issuable
condition do
quick_action_target.persisted? &&
......@@ -146,8 +146,8 @@ module Gitlab
@updates[:todo_event] = 'add'
end
desc 'Mark todo as done'
explanation 'Marks todo as done.'
desc _('Mark todo as done')
explanation _('Marks todo as done.')
types Issuable
condition do
quick_action_target.persisted? &&
......@@ -157,7 +157,7 @@ module Gitlab
@updates[:todo_event] = 'done'
end
desc 'Subscribe'
desc _('Subscribe')
explanation do
"Subscribes to this #{quick_action_target.to_ability_name.humanize(capitalize: false)}."
end
......@@ -170,7 +170,7 @@ module Gitlab
@updates[:subscription_event] = 'subscribe'
end
desc 'Unsubscribe'
desc _('Unsubscribe')
explanation do
"Unsubscribes from this #{quick_action_target.to_ability_name.humanize(capitalize: false)}."
end
......@@ -183,9 +183,9 @@ module Gitlab
@updates[:subscription_event] = 'unsubscribe'
end
desc 'Toggle emoji award'
desc _('Toggle emoji award')
explanation do |name|
"Toggles :#{name}: emoji award." if name
_("Toggles :%{name}: emoji award.") % { name: name } if name
end
params ':emoji:'
types Issuable
......@@ -202,14 +202,14 @@ module Gitlab
end
end
desc "Append the comment with #{SHRUG}"
desc _("Append the comment with %{shrug}") % { shrug: SHRUG }
params '<Comment>'
types Issuable
substitution :shrug do |comment|
"#{comment} #{SHRUG}"
end
desc "Append the comment with #{TABLEFLIP}"
desc _("Append the comment with %{TABLEFLIP}") % { tableflip: TABLEFLIP }
params '<Comment>'
types Issuable
substitution :tableflip do |comment|
......
......@@ -8,9 +8,9 @@ module Gitlab
included do
# Issue only quick actions definition
desc 'Set due date'
desc _('Set due date')
explanation do |due_date|
"Sets the due date to #{due_date.to_s(:medium)}." if due_date
_("Sets the due date to %{due_date}.") % { due_date: due_date.strftime('%b %-d, %Y') } if due_date
end
params '<in 2 days | this Friday | December 31st>'
types Issue
......@@ -25,8 +25,8 @@ module Gitlab
@updates[:due_date] = due_date if due_date
end
desc 'Remove due date'
explanation 'Removes the due date.'
desc _('Remove due date')
explanation _('Removes the due date.')
types Issue
condition do
quick_action_target.persisted? &&
......@@ -38,10 +38,10 @@ module Gitlab
@updates[:due_date] = nil
end
desc 'Move issue from one column of the board to another'
desc _('Move issue from one column of the board to another')
explanation do |target_list_name|
label = find_label_references(target_list_name).first
"Moves issue to #{label} column in the board." if label
_("Moves issue to %{label} column in the board.") % { label: label } if label
end
params '~"Target column"'
types Issue
......@@ -66,9 +66,9 @@ module Gitlab
end
# rubocop: enable CodeReuse/ActiveRecord
desc 'Mark this issue as a duplicate of another issue'
desc _('Mark this issue as a duplicate of another issue')
explanation do |duplicate_reference|
"Marks this issue as a duplicate of #{duplicate_reference}."
_("Marks this issue as a duplicate of %{duplicate_reference}.") % { duplicate_reference: duplicate_reference }
end
params '#issue'
types Issue
......@@ -84,9 +84,9 @@ module Gitlab
end
end
desc 'Move this issue to another project.'
desc _('Move this issue to another project.')
explanation do |path_to_project|
"Moves this issue to #{path_to_project}."
_("Moves this issue to %{path_to_project}.") % { path_to_project: path_to_project }
end
params 'path/to/project'
types Issue
......@@ -102,9 +102,9 @@ module Gitlab
end
end
desc 'Make issue confidential.'
desc _('Make issue confidential.')
explanation do
'Makes this issue confidential'
_('Makes this issue confidential')
end
types Issue
condition do
......@@ -114,10 +114,13 @@ module Gitlab
@updates[:confidential] = true
end
desc 'Create a merge request.'
desc _('Create a merge request.')
explanation do |branch_name = nil|
branch_text = branch_name ? "branch '#{branch_name}'" : 'a branch'
"Creates #{branch_text} and a merge request to resolve this issue"
if branch_name
_("Creates branch '%{branch_name}' and a merge request to resolve this issue") % { branch_name: branch_name }
else
"Creates a branch and a merge request to resolve this issue"
end
end
params "<branch name>"
types Issue
......
......@@ -8,7 +8,7 @@ module Gitlab
included do
# Issue, MergeRequest: quick actions definitions
desc 'Assign'
desc _('Assign')
# rubocop: disable CodeReuse/ActiveRecord
explanation do |users|
users = quick_action_target.allows_multiple_assignees? ? users : users.take(1)
......@@ -38,9 +38,9 @@ module Gitlab
desc do
if quick_action_target.allows_multiple_assignees?
'Remove all or specific assignee(s)'
_('Remove all or specific assignee(s)')
else
'Remove assignee'
_('Remove assignee')
end
end
explanation do |users = nil|
......@@ -70,9 +70,9 @@ module Gitlab
end
end
desc 'Set milestone'
desc _('Set milestone')
explanation do |milestone|
"Sets the milestone to #{milestone.to_reference}." if milestone
_("Sets the milestone to %{milestone_reference}.") % { milestone_reference: milestone.to_reference } if milestone
end
params '%"milestone"'
types Issue, MergeRequest
......@@ -88,9 +88,9 @@ module Gitlab
@updates[:milestone_id] = milestone.id if milestone
end
desc 'Remove milestone'
desc _('Remove milestone')
explanation do
"Removes #{quick_action_target.milestone.to_reference(format: :name)} milestone."
_("Removes %{milestone_reference} milestone.") % { milestone_reference: quick_action_target.milestone.to_reference(format: :name) }
end
types Issue, MergeRequest
condition do
......@@ -102,9 +102,9 @@ module Gitlab
@updates[:milestone_id] = nil
end
desc 'Copy labels and milestone from other issue or merge request'
desc _('Copy labels and milestone from other issue or merge request')
explanation do |source_issuable|
"Copy labels and milestone from #{source_issuable.to_reference}."
_("Copy labels and milestone from %{source_issuable_reference}.") % { source_issuable_reference: source_issuable.to_reference }
end
params '#issue | !merge_request'
types Issue, MergeRequest
......@@ -122,11 +122,11 @@ module Gitlab
end
end
desc 'Set time estimate'
desc _('Set time estimate')
explanation do |time_estimate|
time_estimate = Gitlab::TimeTrackingFormatter.output(time_estimate)
"Sets time estimate to #{time_estimate}." if time_estimate
_("Sets time estimate to %{time_estimate}.") % { time_estimate: time_estimate } if time_estimate
end
params '<1w 3d 2h 14m>'
types Issue, MergeRequest
......@@ -142,18 +142,18 @@ module Gitlab
end
end
desc 'Add or subtract spent time'
desc _('Add or subtract spent time')
explanation do |time_spent, time_spent_date|
if time_spent
if time_spent > 0
verb = 'Adds'
verb = _('Adds')
value = time_spent
else
verb = 'Subtracts'
verb = _('Subtracts')
value = -time_spent
end
"#{verb} #{Gitlab::TimeTrackingFormatter.output(value)} spent time."
_("%{verb} %{time_spent_value} spent time.") % { verb: verb, time_spent_value: Gitlab::TimeTrackingFormatter.output(value) }
end
end
params '<time(1h30m | -1h30m)> <date(YYYY-MM-DD)>'
......@@ -174,8 +174,8 @@ module Gitlab
end
end
desc 'Remove time estimate'
explanation 'Removes time estimate.'
desc _('Remove time estimate')
explanation _('Removes time estimate.')
types Issue, MergeRequest
condition do
quick_action_target.persisted? &&
......@@ -185,8 +185,8 @@ module Gitlab
@updates[:time_estimate] = 0
end
desc 'Remove spent time'
explanation 'Removes spent time.'
desc _('Remove spent time')
explanation _('Removes spent time.')
condition do
quick_action_target.persisted? &&
current_user.can?(:"admin_#{quick_action_target.to_ability_name}", project)
......@@ -196,8 +196,8 @@ module Gitlab
@updates[:spend_time] = { duration: :reset, user_id: current_user.id }
end
desc "Lock the discussion"
explanation "Locks the discussion"
desc _("Lock the discussion")
explanation _("Locks the discussion")
types Issue, MergeRequest
condition do
quick_action_target.persisted? &&
......@@ -208,8 +208,8 @@ module Gitlab
@updates[:discussion_locked] = true
end
desc "Unlock the discussion"
explanation "Unlocks the discussion"
desc _("Unlock the discussion")
explanation _("Unlocks the discussion")
types Issue, MergeRequest
condition do
quick_action_target.persisted? &&
......
......@@ -269,6 +269,9 @@ msgstr ""
msgid "%{user_name} profile page"
msgstr ""
msgid "%{verb} %{time_spent_value} spent time."
msgstr ""
msgid "'%{level}' is not a valid visibility level"
msgstr ""
......@@ -602,6 +605,9 @@ msgstr ""
msgid "Add a task list"
msgstr ""
msgid "Add a todo"
msgstr ""
msgid "Add additional text to appear in all email communications. %{character_limit} character limit"
msgstr ""
......@@ -626,6 +632,9 @@ msgstr ""
msgid "Add italic text"
msgstr ""
msgid "Add label(s)"
msgstr ""
msgid "Add license"
msgstr ""
......@@ -638,6 +647,9 @@ msgstr ""
msgid "Add new directory"
msgstr ""
msgid "Add or subtract spent time"
msgstr ""
msgid "Add reaction"
msgstr ""
......@@ -674,6 +686,12 @@ msgstr ""
msgid "Additional text"
msgstr ""
msgid "Adds"
msgstr ""
msgid "Adds a todo."
msgstr ""
msgid "Aditional minutes"
msgstr ""
......@@ -1168,6 +1186,12 @@ msgstr ""
msgid "Appearance was successfully updated."
msgstr ""
msgid "Append the comment with %{TABLEFLIP}"
msgstr ""
msgid "Append the comment with %{shrug}"
msgstr ""
msgid "Application"
msgstr ""
......@@ -1362,6 +1386,9 @@ msgstr ""
msgid "Assets"
msgstr ""
msgid "Assign"
msgstr ""
msgid "Assign custom color like #FF0000"
msgstr ""
......@@ -2058,6 +2085,12 @@ msgstr ""
msgid "Change Weight"
msgstr ""
msgid "Change assignee(s)"
msgstr ""
msgid "Change assignee(s)."
msgstr ""
msgid "Change path"
msgstr ""
......@@ -2070,6 +2103,9 @@ msgstr ""
msgid "Change this value to influence how frequently the GitLab UI polls for updates."
msgstr ""
msgid "Change title"
msgstr ""
msgid "ChangeTypeActionLabel|Pick into branch"
msgstr ""
......@@ -2094,6 +2130,9 @@ msgstr ""
msgid "Changes suppressed. Click to show."
msgstr ""
msgid "Changes the title to \"%{title_param}\"."
msgstr ""
msgid "Charts"
msgstr ""
......@@ -2307,6 +2346,12 @@ msgstr ""
msgid "Clear search input"
msgstr ""
msgid "Clear weight"
msgstr ""
msgid "Clears weight."
msgstr ""
msgid "Click any <strong>project name</strong> in the project list below to navigate to the project milestone."
msgstr ""
......@@ -3218,6 +3263,12 @@ msgstr ""
msgid "Copy file path to clipboard"
msgstr ""
msgid "Copy labels and milestone from %{source_issuable_reference}."
msgstr ""
msgid "Copy labels and milestone from other issue or merge request"
msgstr ""
msgid "Copy link"
msgstr ""
......@@ -3275,6 +3326,9 @@ msgstr ""
msgid "Create a GitLab account first, and then connect it to your %{label} account."
msgstr ""
msgid "Create a merge request."
msgstr ""
msgid "Create a new branch"
msgstr ""
......@@ -3377,6 +3431,9 @@ msgstr ""
msgid "Created on:"
msgstr ""
msgid "Creates branch '%{branch_name}' and a merge request to resolve this issue"
msgstr ""
msgid "Creating epic"
msgstr ""
......@@ -6953,6 +7010,9 @@ msgstr ""
msgid "Lock not found"
msgstr ""
msgid "Lock the discussion"
msgstr ""
msgid "Lock this %{issuableDisplayName}? Only <strong>project members</strong> will be able to comment."
msgstr ""
......@@ -6971,6 +7031,9 @@ msgstr ""
msgid "Locks give the ability to lock specific file or folder."
msgstr ""
msgid "Locks the discussion"
msgstr ""
msgid "Login with smartcard"
msgstr ""
......@@ -6998,9 +7061,15 @@ msgstr ""
msgid "Make everyone on your team more productive regardless of their location. GitLab Geo creates read-only mirrors of your GitLab instance so you can reduce the time it takes to clone and fetch large repos."
msgstr ""
msgid "Make issue confidential."
msgstr ""
msgid "Make sure you're logged into the account that owns the projects you'd like to import."
msgstr ""
msgid "Makes this issue confidential"
msgstr ""
msgid "Manage"
msgstr ""
......@@ -7061,6 +7130,9 @@ msgstr ""
msgid "March"
msgstr ""
msgid "Mark this issue as a duplicate of another issue"
msgstr ""
msgid "Mark todo as done"
msgstr ""
......@@ -7073,6 +7145,12 @@ msgstr ""
msgid "Markdown enabled"
msgstr ""
msgid "Marks this issue as a duplicate of %{duplicate_reference}."
msgstr ""
msgid "Marks todo as done."
msgstr ""
msgid "Maven Metadata"
msgstr ""
......@@ -7520,12 +7598,24 @@ msgstr ""
msgid "Move issue"
msgstr ""
msgid "Move issue from one column of the board to another"
msgstr ""
msgid "Move this issue to another project."
msgstr ""
msgid "MoveIssue|Cannot move issue due to insufficient permissions!"
msgstr ""
msgid "MoveIssue|Cannot move issue to project it originates from!"
msgstr ""
msgid "Moves issue to %{label} column in the board."
msgstr ""
msgid "Moves this issue to %{path_to_project}."
msgstr ""
msgid "Multiple issue boards"
msgstr ""
......@@ -9500,6 +9590,12 @@ msgstr ""
msgid "Remove all approvals in a merge request when new commits are pushed to its source branch"
msgstr ""
msgid "Remove all or specific assignee(s)"
msgstr ""
msgid "Remove all or specific label(s)"
msgstr ""
msgid "Remove approver"
msgstr ""
......@@ -9509,27 +9605,42 @@ msgstr ""
msgid "Remove approvers?"
msgstr ""
msgid "Remove assignee"
msgstr ""
msgid "Remove avatar"
msgstr ""
msgid "Remove due date"
msgstr ""
msgid "Remove fork relationship"
msgstr ""
msgid "Remove group"
msgstr ""
msgid "Remove milestone"
msgstr ""
msgid "Remove priority"
msgstr ""
msgid "Remove project"
msgstr ""
msgid "Remove spent time"
msgstr ""
msgid "Remove this label? Are you sure?"
msgstr ""
msgid "Remove this label? This will affect all projects within the group. Are you sure?"
msgstr ""
msgid "Remove time estimate"
msgstr ""
msgid "Removed"
msgstr ""
......@@ -9542,6 +9653,21 @@ msgstr ""
msgid "Removed projects cannot be restored!"
msgstr ""
msgid "Removes %{milestone_reference} milestone."
msgstr ""
msgid "Removes all labels."
msgstr ""
msgid "Removes spent time."
msgstr ""
msgid "Removes the due date."
msgstr ""
msgid "Removes time estimate."
msgstr ""
msgid "Removing group will cause all child projects and resources to be removed."
msgstr ""
......@@ -9572,6 +9698,9 @@ msgstr ""
msgid "Replace"
msgstr ""
msgid "Replace all label(s)"
msgstr ""
msgid "Reply to comment"
msgstr ""
......@@ -10331,12 +10460,18 @@ msgstr ""
msgid "Set default and restrict visibility levels. Configure import sources and git access protocol."
msgstr ""
msgid "Set due date"
msgstr ""
msgid "Set instance-wide template repository"
msgstr ""
msgid "Set max session time for web terminal."
msgstr ""
msgid "Set milestone"
msgstr ""
msgid "Set new password"
msgstr ""
......@@ -10361,6 +10496,9 @@ msgstr ""
msgid "Set the maximum number of pipeline minutes that a group can use on shared Runners per month. 0 for unlimited."
msgstr ""
msgid "Set time estimate"
msgstr ""
msgid "Set up CI/CD"
msgstr ""
......@@ -10382,6 +10520,9 @@ msgstr ""
msgid "Set up your project to automatically push and/or pull changes to/from another repository. Branches, tags, and commits will be synced automatically."
msgstr ""
msgid "Set weight"
msgstr ""
msgid "SetPasswordToCloneLink|set a password"
msgstr ""
......@@ -10409,6 +10550,18 @@ msgstr ""
msgid "SetStatusModal|What's your status?"
msgstr ""
msgid "Sets the due date to %{due_date}."
msgstr ""
msgid "Sets the milestone to %{milestone_reference}."
msgstr ""
msgid "Sets time estimate to %{time_estimate}."
msgstr ""
msgid "Sets weight to %{weight}."
msgstr ""
msgid "Settings"
msgstr ""
......@@ -11065,6 +11218,9 @@ msgstr ""
msgid "SubscriptionTable|Usage count is performed once a day at 12:00 PM."
msgstr ""
msgid "Subtracts"
msgstr ""
msgid "Successfully blocked"
msgstr ""
......@@ -11137,12 +11293,21 @@ msgstr ""
msgid "Tag list:"
msgstr ""
msgid "Tag this commit."
msgstr ""
msgid "Tags"
msgstr ""
msgid "Tags feed"
msgstr ""
msgid "Tags this commit to %{tag_name} with \"%{message}\"."
msgstr ""
msgid "Tags this commit to %{tag_name}."
msgstr ""
msgid "Tags:"
msgstr ""
......@@ -12184,6 +12349,9 @@ msgstr ""
msgid "Toggle discussion"
msgstr ""
msgid "Toggle emoji award"
msgstr ""
msgid "Toggle navigation"
msgstr ""
......@@ -12196,6 +12364,9 @@ msgstr ""
msgid "ToggleButton|Toggle Status: ON"
msgstr ""
msgid "Toggles :%{name}: emoji award."
msgstr ""
msgid "Token"
msgstr ""
......@@ -12388,12 +12559,18 @@ msgstr ""
msgid "Unlock"
msgstr ""
msgid "Unlock the discussion"
msgstr ""
msgid "Unlock this %{issuableDisplayName}? <strong>Everyone</strong> will be able to comment."
msgstr ""
msgid "Unlocked"
msgstr ""
msgid "Unlocks the discussion"
msgstr ""
msgid "Unresolve discussion"
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