Various small fixes

This commit is contained in:
Pieter Vander Vennet 2020-09-17 13:13:02 +02:00
parent 1ea285d303
commit 2dd428497e
45 changed files with 776 additions and 587 deletions

View file

@ -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);
}
}