Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
callidus
mc_frontend
Commits
edc5ad2c
Commit
edc5ad2c
authored
Sep 24, 2018
by
Konstantin Schulz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disabled automatic assumptions about the citation system, everything now has to be picked manually
parent
4a1aa097
Pipeline
#1363
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
16 deletions
+12
-16
src/assets/i18n/de.json
src/assets/i18n/de.json
+0
-1
src/assets/i18n/en.json
src/assets/i18n/en.json
+0
-1
src/pages/corpus-detail/corpus-detail.ts
src/pages/corpus-detail/corpus-detail.ts
+11
-12
src/pages/home/home.ts
src/pages/home/home.ts
+1
-2
No files found.
src/assets/i18n/de.json
View file @
edc5ad2c
...
...
@@ -23,7 +23,6 @@
"INSTRUCTIONS"
:
"Anweisungen"
,
"INSTRUCTIONS_FILL_THE_GAP"
:
"Ordne die Wörter aus dem Pool den richtigen Lücken zu!"
,
"INVALID_TEXT_RANGE"
:
"Ungültige Textauswahl"
,
"NO_TEXT_RANGE_CHOSEN"
:
"Bitte wähle einen Textausschnitt."
,
"PART_OF_SPEECH_CONJUNCTION"
:
"Konjunktion"
,
"PDF"
:
"PDF"
,
"PHENOMENON_DEPENDENCY"
:
"Dependenz"
,
...
...
src/assets/i18n/en.json
View file @
edc5ad2c
...
...
@@ -23,7 +23,6 @@
"INSTRUCTIONS"
:
"Instructions"
,
"INSTRUCTIONS_FILL_THE_GAP"
:
"Assign the words from the pool to the correct gaps!"
,
"INVALID_TEXT_RANGE"
:
"Invalid text range"
,
"NO_TEXT_RANGE_CHOSEN"
:
"Please choose a text range."
,
"PART_OF_SPEECH_CONJUNCTION"
:
"Conjunction"
,
"PDF"
:
"PDF"
,
"PHENOMENON_DEPENDENCY"
:
"Dependency"
,
...
...
src/pages/corpus-detail/corpus-detail.ts
View file @
edc5ad2c
...
...
@@ -23,7 +23,6 @@ import {Citation} from "../../models/citation";
export
class
CorpusDetailPage
{
// TODO: rebuild the system so it works for any corpus of arbitrary citation depth
public
showMultiPartText
:
boolean
=
false
;
public
noTextRangeChosenString
:
string
;
public
CitationLevel
=
CitationLevel
;
public
invalidTextRangeString
:
string
;
public
areReffEditable
:
boolean
=
true
;
...
...
@@ -40,9 +39,6 @@ export class CorpusDetailPage {
if
(
Object
.
keys
(
this
.
corpusProvider
.
currentCorpus
.
citations
).
length
===
0
)
{
this
.
addReferences
(
this
.
corpusProvider
.
currentCorpus
.
citation_level_1
);
}
this
.
translateService
.
get
(
"
NO_TEXT_RANGE_CHOSEN
"
).
subscribe
((
value
)
=>
{
this
.
noTextRangeChosenString
=
value
;
});
this
.
translateService
.
get
(
"
INVALID_TEXT_RANGE
"
).
subscribe
((
value
)
=>
{
this
.
invalidTextRangeString
=
value
;
});
...
...
@@ -106,9 +102,18 @@ export class CorpusDetailPage {
}
showText
()
{
if
(
!
this
.
corpusProvider
.
currentTextRange
.
start
[
0
])
{
if
(
this
.
corpusProvider
.
currentCorpus
.
citation_level_2
===
CitationLevel
[
CitationLevel
.
default
])
{
this
.
corpusProvider
.
currentTextRange
.
start
.
splice
(
1
,
2
);
this
.
corpusProvider
.
currentTextRange
.
end
.
splice
(
1
,
2
);
}
else
if
(
this
.
corpusProvider
.
currentCorpus
.
citation_level_3
===
CitationLevel
[
CitationLevel
.
default
])
{
this
.
corpusProvider
.
currentTextRange
.
start
.
splice
(
2
,
1
);
this
.
corpusProvider
.
currentTextRange
.
end
.
splice
(
2
,
1
);
}
let
wholeTextRange
:
number
[]
=
this
.
corpusProvider
.
currentTextRange
.
start
.
concat
(
this
.
corpusProvider
.
currentTextRange
.
end
);
if
(
wholeTextRange
.
some
(
value
=>
!
value
))
{
let
toast
=
this
.
toastCtrl
.
create
({
message
:
this
.
no
TextRange
Chosen
String
,
message
:
this
.
invalid
TextRangeString
,
duration
:
3000
,
position
:
'
top
'
});
...
...
@@ -182,12 +187,6 @@ export class CorpusDetailPage {
}
private
adjustCurrentTextRange
()
{
this
.
corpusProvider
.
previousCorpus
=
this
.
corpusProvider
.
currentCorpus
;
for
(
let
i
in
this
.
corpusProvider
.
currentTextRange
.
start
)
{
if
(
this
.
corpusProvider
.
currentTextRange
.
start
[
+
i
]
&&
!
this
.
corpusProvider
.
currentTextRange
.
end
[
+
i
])
{
this
.
corpusProvider
.
currentTextRange
.
end
[
+
i
]
=
this
.
corpusProvider
.
currentTextRange
.
start
[
+
i
];
}
}
let
newUrnStart
:
string
=
this
.
corpusProvider
.
currentTextRange
.
start
.
join
(
"
.
"
);
let
newUrnEnd
:
string
=
this
.
corpusProvider
.
currentTextRange
.
end
.
join
(
"
.
"
);
this
.
corpusProvider
.
currentLastUrnPart
=
newUrnStart
+
"
-
"
+
newUrnEnd
;
...
...
src/pages/home/home.ts
View file @
edc5ad2c
...
...
@@ -25,8 +25,7 @@ export class HomePage {
}
test
()
{
let
persons
=
[
1
,
2
,
3
];
let
a
=
persons
.
join
(
"
.
"
);
let
a
=
[
1
].
concat
([
2
]);
let
d
=
0
;
}
}
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