1
0
Fork 0

tada: Initial commit

This commit is contained in:
Joost De Cock 2018-08-28 07:28:21 +02:00
parent 7c28c3b198
commit 99d65d546d
18 changed files with 5143 additions and 3 deletions

View file

@ -0,0 +1,18 @@
import { version, name } from "../package.json";
import locales from "../locales";
export default {
name: name,
version: version,
hooks: {
preRender: function(next) {
this.attributes.add("freesewing:plugin-i18n", version);
next();
},
insertText: function(next) {
if(typeof locales[this.pattern.settings.locale][this.text] === 'string')
this.text = locales[this.pattern.settings.locale][this.text];
next();
}
}
};