Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
subugoe
emo
TIDO
Commits
c5346ab8
Commit
c5346ab8
authored
Aug 09, 2021
by
dindigala
Browse files
refactor: addressing review comments
parent
ec5b7981
Pipeline
#219201
passed with stages
in 4 minutes and 37 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/annotations/annotations.vue
View file @
c5346ab8
...
...
@@ -286,7 +286,10 @@ export default {
if
(
id
.
startsWith
(
'
.
'
))
{
id
=
id
.
replace
(
'
.
'
,
''
);
}
prev
[
id
]
=
curr
.
body
.
value
;
prev
[
id
]
=
{
value
:
curr
.
body
.
value
,
contentType
:
curr
.
body
[
'
x-content-type
'
],
};
return
prev
;
},
{});
...
...
@@ -345,12 +348,26 @@ export default {
tooltipEl
.
setAttribute
(
'
data-annotation-classes
'
,
`
${
el
.
className
}
`
);
tooltipEl
.
setAttribute
(
'
class
'
,
'
annotation-tooltip
'
);
// TODO: add translation ability to the string "Referenced Annotation"
// TODO: plural/singluar "s" to "Referenced Annotation" depending of count of annotation references
// TODO: don't list annotation references via comma, but add a linebreak instead
// TODO: start every annotation reference with the follwoing string " - "
// TODO: add icon to (before) every annotation reference
const
text
=
`<span class="text-body1">Referenced Annotation:</span><br><span class="text-body2">
${
annotationClasses
.
join
(
'
,
'
)}
</span>`
;
const
isMultiple
=
annotationClasses
.
length
>
1
;
let
annotationLists
=
''
;
annotationClasses
.
forEach
((
annotationList
)
=>
{
annotationLists
+=
`<li>
${
this
.
createSVG
(
this
.
getIconName
(
annotationList
.
contentType
)).
outerHTML
}
<span>
${
annotationList
.
value
}
</span>
</li>`
;
});
const
text
=
`<span class="text-body1">
${
!
isMultiple
?
`
${
this
.
$t
(
'
toolTip_Reference
'
)}
`
:
`
${
this
.
$t
(
'
toolTip_References
'
)}
`
}
:
</span>
<br>
<div class="text-body2">
${
annotationLists
}
</div>`
;
tooltipEl
.
innerHTML
=
text
;
tooltipEl
.
setAttribute
(
'
id
'
,
this
.
getTooltipId
(
el
));
...
...
@@ -499,6 +516,21 @@ export default {
.annotation-tooltip
{
-webkit-touch-callout
:
none
;
}
.text-body2
{
list-style-type
:
none
;
padding
:
8px
;
}
.text-body2
>
li
{
margin
:
none
;
text-indent
:
-4px
;
}
.
text-body2
>
li
:
:
before
{
content
:
'-'
;
text-indent
:
-4px
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
...
...
src/i18n/de/index.js
View file @
c5346ab8
...
...
@@ -58,6 +58,8 @@ export default {
Title
:
'
Titel
'
,
title_homepage
:
'
Die syrischen und arabischen Ahiqar-Texte
'
,
title_viewer
:
'
Edition anzeigen
'
,
toolTip_Reference
:
'
Referenzierte Annotation
'
,
toolTip_References
:
'
Referenzierte Annotationen
'
,
transcription
:
'
Transkription
'
,
transliteration
:
'
Transliteration
'
,
Year
:
'
Erstellungsjahr
'
,
...
...
src/i18n/en-us/index.js
View file @
c5346ab8
...
...
@@ -58,6 +58,8 @@ export default {
Title
:
'
Title
'
,
title_homepage
:
'
The Syriac, Arabic, and Karshuni Ahiqar Texts
'
,
title_viewer
:
'
Edition Viewer
'
,
toolTip_Reference
:
'
Referenced Annotation
'
,
toolTip_References
:
'
Referenced Annotations
'
,
transcription
:
'
Transcription
'
,
transliteration
:
'
Transliteration
'
,
Year
:
'
Year of creation
'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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