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
d6c49c96
Commit
d6c49c96
authored
Sep 23, 2021
by
Stanislav Lashmanov
Committed by
Natalia Tepluhina
Sep 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace v-html with gl-sprintf in spent_only_pane.vue
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/241935
parent
a7822ccd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
+17
-16
app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue
...ipts/sidebar/components/time_tracking/spent_only_pane.vue
+16
-15
locale/gitlab.pot
locale/gitlab.pot
+1
-1
No files found.
app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue
View file @
d6c49c96
<
script
>
import
{
sprintf
,
s__
}
from
'
~/locale
'
;
import
{
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
const
timeSpent
=
s__
(
'
TimeTracking|%{spentStart}Spent: %{spentEnd}
'
);
export
default
{
name
:
'
TimeTrackingSpentOnlyPane
'
,
timeSpent
,
components
:
{
GlSprintf
,
},
props
:
{
timeSpentHumanReadable
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
timeSpent
()
{
return
sprintf
(
s__
(
'
TimeTracking|%{startTag}Spent: %{endTag}%{timeSpentHumanReadable}
'
),
{
startTag
:
'
<span class="gl-font-weight-bold">
'
,
endTag
:
'
</span>
'
,
timeSpentHumanReadable
:
this
.
timeSpentHumanReadable
,
},
false
,
);
},
},
};
</
script
>
<
template
>
<div
data-testid=
"spentOnlyPane"
v-html=
"timeSpent /* eslint-disable-line vue/no-v-html */"
></div>
<div
data-testid=
"spentOnlyPane"
>
<gl-sprintf
:message=
"$options.timeSpent"
>
<template
#spent
="
{ content }">
<span
class=
"gl-font-weight-bold"
>
{{
content
}}
</span
>
{{
timeSpentHumanReadable
}}
</
template
>
</gl-sprintf>
</div>
</template>
locale/gitlab.pot
View file @
d6c49c96
...
...
@@ -35118,7 +35118,7 @@ msgstr ""
msgid "TimeTrackingEstimated|Est"
msgstr ""
msgid "TimeTracking|%{s
tartTag}Spent: %{endTag}%{timeSpentHumanReadable
}"
msgid "TimeTracking|%{s
pentStart}Spent: %{spentEnd
}"
msgstr ""
msgid "TimeTracking|Estimated:"
...
...
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