Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d931b1c3
Commit
d931b1c3
authored
Jul 03, 2020
by
David O'Regan
Committed by
Natalia Tepluhina
Jul 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve translations for Alert Management assignees
parent
e8979927
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
38 deletions
+35
-38
app/assets/javascripts/alert_management/components/sidebar/sidebar_assignees.vue
...alert_management/components/sidebar/sidebar_assignees.vue
+26
-23
locale/gitlab.pot
locale/gitlab.pot
+9
-15
No files found.
app/assets/javascripts/alert_management/components/sidebar/sidebar_assignees.vue
View file @
d931b1c3
...
...
@@ -11,7 +11,7 @@ import {
GlSprintf
,
}
from
'
@gitlab/ui
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
import
alertSetAssignees
from
'
../../graphql/mutations/alert_set_assignees.graphql
'
;
import
SidebarAssignee
from
'
./sidebar_assignee.vue
'
;
import
{
debounce
}
from
'
lodash
'
;
...
...
@@ -19,15 +19,18 @@ import { debounce } from 'lodash';
const
DATA_REFETCH_DELAY
=
250
;
export
default
{
FETCH_USERS_ERROR
:
s__
(
'
AlertManagement|There was an error while updating the assignee(s) list. Please try again.
'
,
),
UPDATE_ALERT_ASSIGNEES_ERROR
:
s__
(
'
AlertManagement|There was an error while updating the assignee(s) of the alert. Please try again.
'
,
),
UPDATE_ALERT_ASSIGNEES_GRAPHQL_ERROR
:
s__
(
'
AlertManagement|This assignee cannot be assigned to this alert.
'
,
),
i18n
:
{
FETCH_USERS_ERROR
:
s__
(
'
AlertManagement|There was an error while updating the assignee(s) list. Please try again.
'
,
),
UPDATE_ALERT_ASSIGNEES_ERROR
:
s__
(
'
AlertManagement|There was an error while updating the assignee(s) of the alert. Please try again.
'
,
),
UPDATE_ALERT_ASSIGNEES_GRAPHQL_ERROR
:
s__
(
'
AlertManagement|This assignee cannot be assigned to this alert.
'
,
),
ASSIGNEES_BLOCK
:
s__
(
'
AlertManagement|Alert assignee(s): %{assignees}
'
),
},
components
:
{
GlIcon
,
GlDropdown
,
...
...
@@ -80,7 +83,7 @@ export default {
return
this
.
alert
?.
assignees
?.
nodes
[
0
]?.
username
;
},
assignedUser
()
{
return
this
.
userName
||
s__
(
'
AlertManagement|
None
'
);
return
this
.
userName
||
__
(
'
None
'
);
},
sortedUsers
()
{
return
this
.
users
...
...
@@ -142,7 +145,7 @@ export default {
this
.
users
=
data
;
})
.
catch
(()
=>
{
this
.
$emit
(
'
alert-error
'
,
this
.
$options
.
FETCH_USERS_ERROR
);
this
.
$emit
(
'
alert-error
'
,
this
.
$options
.
i18n
.
FETCH_USERS_ERROR
);
})
.
finally
(()
=>
{
this
.
isDropdownSearching
=
false
;
...
...
@@ -165,14 +168,14 @@ export default {
if
(
errors
[
0
])
{
return
this
.
$emit
(
'
alert-sidebar-error
'
,
`
${
this
.
$options
.
UPDATE_ALERT_ASSIGNEES_GRAPHQL_ERROR
}
${
errors
[
0
]}
.`
,
`
${
this
.
$options
.
i18n
.
UPDATE_ALERT_ASSIGNEES_GRAPHQL_ERROR
}
${
errors
[
0
]}
.`
,
);
}
return
this
.
$emit
(
'
alert-refresh
'
);
})
.
catch
(()
=>
{
this
.
$emit
(
'
alert-error
'
,
this
.
$options
.
UPDATE_ALERT_ASSIGNEES_ERROR
);
this
.
$emit
(
'
alert-error
'
,
this
.
$options
.
i18n
.
UPDATE_ALERT_ASSIGNEES_ERROR
);
})
.
finally
(()
=>
{
this
.
isUpdating
=
false
;
...
...
@@ -189,7 +192,7 @@ export default {
<gl-loading-icon
v-if=
"isUpdating"
/>
</div>
<gl-tooltip
:target=
"() => $refs.status"
boundary=
"viewport"
placement=
"left"
>
<gl-sprintf
:message=
"
s__('AlertManagement|Alert assignee(s): %
{assignees}')
">
<gl-sprintf
:message=
"
$options.i18n.ASSIGNEES_BLOCK
"
>
<template
#assignees
>
{{
assignedUser
}}
</
template
>
...
...
@@ -198,7 +201,7 @@ export default {
<div
class=
"hide-collapsed"
>
<p
class=
"title gl-display-flex gl-justify-content-space-between"
>
{{
s__('AlertManagement|
Assignee') }}
{{
__('
Assignee') }}
<a
v-if=
"isEditable"
ref=
"editButton"
...
...
@@ -207,7 +210,7 @@ export default {
@
click=
"toggleFormDropdown"
@
keydown.esc=
"hideDropdown"
>
{{
s__('AlertManagement|
Edit') }}
{{
__('
Edit') }}
</a>
</p>
...
...
@@ -222,7 +225,7 @@ export default {
@
hide=
"hideDropdown"
>
<div
class=
"dropdown-title"
>
<span
class=
"alert-title"
>
{{
s__('AlertManagement|
Assign To') }}
</span>
<span
class=
"alert-title"
>
{{
__('
Assign To') }}
</span>
<gl-button
:aria-label=
"__('Close')"
variant=
"link"
...
...
@@ -247,12 +250,12 @@ export default {
active-class=
"is-active"
@
click=
"updateAlertAssignees('')"
>
{{
s__
(
'
AlertManagement|
Unassigned
'
)
}}
{{
__
(
'
Unassigned
'
)
}}
</gl-dropdown-item>
<gl-dropdown-divider
/>
<gl-dropdown-header
class=
"mt-0"
>
{{
s__
(
'
AlertManagement|
Assignee
'
)
}}
{{
__
(
'
Assignee
'
)
}}
</gl-dropdown-header>
<sidebar-assignee
v-for=
"user in sortedUsers"
...
...
@@ -263,7 +266,7 @@ export default {
/>
</
template
>
<gl-dropdown-item
v-else-if=
"userListEmpty"
>
{{
s__('AlertManagement|
No Matching Results') }}
{{
__('
No Matching Results') }}
</gl-dropdown-item>
<gl-loading-icon
v-else
/>
</div>
...
...
@@ -276,7 +279,7 @@ export default {
assignedUser
}}
</span>
<span
v-else
class=
"gl-display-flex gl-align-items-center"
>
{{
s__('AlertManagement|None -') }}
{{
__('None') }} -
<gl-button
class=
"gl-pl-2"
href=
"#"
...
...
@@ -284,7 +287,7 @@ export default {
data-testid=
"unassigned-users"
@
click=
"updateAlertAssignees(currentUser)"
>
{{
s__('AlertManagement|
assign yourself') }}
{{
__('
assign yourself') }}
</gl-button>
</span>
</p>
...
...
locale/gitlab.pot
View file @
d931b1c3
...
...
@@ -1905,9 +1905,6 @@ msgid_plural "Alerts"
msgstr[0] ""
msgstr[1] ""
msgid "AlertManagement| assign yourself"
msgstr ""
msgid "AlertManagement|Acknowledged"
msgstr ""
...
...
@@ -1932,15 +1929,9 @@ msgstr ""
msgid "AlertManagement|All alerts"
msgstr ""
msgid "AlertManagement|Assign To"
msgstr ""
msgid "AlertManagement|Assign status"
msgstr ""
msgid "AlertManagement|Assignee"
msgstr ""
msgid "AlertManagement|Assignees"
msgstr ""
...
...
@@ -1980,9 +1971,6 @@ msgstr ""
msgid "AlertManagement|More information"
msgstr ""
msgid "AlertManagement|No Matching Results"
msgstr ""
msgid "AlertManagement|No alert data to display."
msgstr ""
...
...
@@ -1995,9 +1983,6 @@ msgstr ""
msgid "AlertManagement|None"
msgstr ""
msgid "AlertManagement|None -"
msgstr ""
msgid "AlertManagement|Open"
msgstr ""
...
...
@@ -3077,6 +3062,9 @@ msgstr ""
msgid "Assign Iteration"
msgstr ""
msgid "Assign To"
msgstr ""
msgid "Assign custom color like #FF0000"
msgstr ""
...
...
@@ -15193,6 +15181,9 @@ msgstr ""
msgid "No Epic"
msgstr ""
msgid "No Matching Results"
msgstr ""
msgid "No Scopes"
msgstr ""
...
...
@@ -24548,6 +24539,9 @@ msgstr ""
msgid "Unassign from commenting user"
msgstr ""
msgid "Unassigned"
msgstr ""
msgid "Unblock"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment