forked from MapComplete/MapComplete
Various small fixes
This commit is contained in:
parent
1ea285d303
commit
2dd428497e
45 changed files with 776 additions and 587 deletions
|
@ -1,6 +1,7 @@
|
|||
import {UIElement} from "../UIElement"
|
||||
import Locale from "./Locale"
|
||||
import Combine from "../Base/Combine";
|
||||
import {Utils} from "../../Utils";
|
||||
|
||||
|
||||
export default class Translation extends UIElement {
|
||||
|
@ -87,4 +88,16 @@ export default class Translation extends UIElement {
|
|||
}
|
||||
|
||||
|
||||
FirstSentence() {
|
||||
|
||||
const tr = {};
|
||||
for (const lng in this.translations) {
|
||||
let txt = this.translations[lng];
|
||||
txt = txt.replace(/\..*/, "");
|
||||
txt = Utils.EllipsesAfter(txt, 255);
|
||||
tr[lng] = txt;
|
||||
}
|
||||
|
||||
return new Translation(tr);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue