1
0
Fork 0

add cutting instructions to title. ensure translation on drafts

This commit is contained in:
Enoch Riese 2023-03-09 08:59:03 -06:00
parent 6f6b3a2b8a
commit bf51065cc8
11 changed files with 88 additions and 66 deletions

View file

@ -1,6 +1,7 @@
import Worker from 'web-worker'
import fileSaver from 'file-saver'
import { themePlugin } from '@freesewing/plugin-theme'
import { pluginI18n } from '@freesewing/plugin-i18n'
import { pagesPlugin } from '../layout/plugin-layout-part.mjs'
import { capitalize } from 'shared/utils.mjs'
@ -75,14 +76,7 @@ export const handleExport = async (format, gist, design, t, app, onComplete, onE
// add the theme and translation to the pattern
pattern.use(themePlugin, { stripped: format !== 'svg', skipGrid: ['pages'] })
pattern.use(
{
hooks: {
insertText: (locale, text, { t }) => t(text),
},
},
{ t }
)
pattern.use(pluginI18n, { t })
// a specified size should override the gist one
if (format !== 'pdf') {