Huge refactoring (WIP)
This commit is contained in:
parent
62c4f0a928
commit
895aa132ec
55 changed files with 1177 additions and 2190 deletions
|
@ -1056,6 +1056,22 @@ export default class Translations {
|
|||
return s;
|
||||
}
|
||||
|
||||
|
||||
static T(t: string | any): Translation {
|
||||
if(t === undefined){
|
||||
return undefined;
|
||||
}
|
||||
if(typeof t === "string"){
|
||||
return new Translation({"*":t});
|
||||
}
|
||||
if(t.render !== undefined){
|
||||
const msg = "Creating a translation, but this object contains a 'render'-field. Use the translation directly"
|
||||
console.error(msg, t);
|
||||
throw msg
|
||||
}
|
||||
return new Translation(t);
|
||||
}
|
||||
|
||||
private static wtcache = {}
|
||||
public static WT(s: string | Translation): Translation {
|
||||
if(s === undefined){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue