1
0
Fork 0
freesewing/packages/plugin-i18n
2019-04-19 08:22:30 +02:00
..
img tada: Initial commit 2019-04-19 08:22:29 +02:00
src bug: Handling scenario when no data is passed to plugin 2019-04-19 08:22:30 +02:00
tests Merge branch 'master' of github.com:freesewing/plugin-i18n 2019-04-19 08:22:30 +02:00
.babelrc Merge branch 'master' of github.com:freesewing/plugin-i18n 2019-04-19 08:22:30 +02:00
.editorconfig tada: Initial commit 2019-04-19 08:22:29 +02:00
.gitignore tada: Initial commit 2019-04-19 08:22:29 +02:00
.npmignore tada: Initial commit 2019-04-19 08:22:29 +02:00
.travis.yml Merge branch 'master' of github.com:freesewing/plugin-i18n 2019-04-19 08:22:30 +02:00
LICENSE tada: Initial commit 2019-04-19 08:22:29 +02:00
package-lock.json bookmark: v0.2.0 2019-04-19 08:22:30 +02:00
package.json bookmark: v0.2.0 2019-04-19 08:22:30 +02:00
README.md boom: Updated to new plugin model 2019-04-19 08:22:29 +02:00
rollup.config.js wrench: Updated rollup config 2019-04-19 08:22:30 +02:00

Freesewing logo

 freesewing
a library for made-to-measure sewing patterns

Travis build Version License Code coverage DeepScan grade Chat on Gitter Become a Patron

plugin-i18n

A freesewing plugin to provide translation to your patterns.

Install

On node.js:

npm install @freesewing/plugin-i18n

in the browser, simply include the plugin from unpkg:

<script type="text/javascript" src="https://unpkg.com/@freesewing/plugin-i18n"></script>

This plugin will register as freesewing.plugins.i18n.

Loading this plugin and providing translation data

This plugin does not come with translations. You should provide the translations when registering the plugin.

Perhaps you want to use your own translations, or you can use ours from the @freesewing/i18n package. Note that if you use ours, you only need to add the plugin export:

import brian from '@freesewing/brian';
import i18nPlugin from '@freesewing/plugin-grainline';
import { plugin } from '@freesewing/i18n';

const pattern = new Brian().with(i18nPlugin, {
  prefix: "plugin.",
  strings: plugin
});

Build

To build this plugin, run:

npm run build

License: MIT

See the license file for details.