feat(lab): Respect language setting
This commit is contained in:
parent
17a788488c
commit
c619662a31
3 changed files with 3 additions and 6 deletions
|
@ -5,12 +5,9 @@ import Part from './part'
|
|||
|
||||
const LabDraft = ({ app, pattern, gist, updateGist }) => {
|
||||
|
||||
const patternInstance = new pattern(gist)
|
||||
patternInstance.draft()
|
||||
const patternInstance = new pattern(gist).draft()
|
||||
const patternProps = patternInstance.getRenderProps()
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Svg {...patternProps}>
|
||||
<Defs {...patternProps} />
|
||||
|
|
|
@ -3,7 +3,7 @@ const TextOnPath = (props) => {
|
|||
// Handle translation
|
||||
let translated = ''
|
||||
for (let string of props.path.attributes.getAsArray('data-text')) {
|
||||
translated += props.app.t(string).replace(/"/g, '"') + ' '
|
||||
translated += props.app.t(string, false, props.language).replace(/"/g, '"') + ' '
|
||||
}
|
||||
const textPathProps = {
|
||||
xlinkHref: '#' + props.pathId,
|
||||
|
|
|
@ -3,7 +3,7 @@ const Text = (props) => {
|
|||
// Handle translation
|
||||
let translated = ''
|
||||
for (let string of props.point.attributes.getAsArray('data-text')) {
|
||||
translated += props.app.t(string.toString()).replace(/"/g, '"') + ' '
|
||||
translated += props.app.t(string.toString(), false, props.language).replace(/"/g, '"') + ' '
|
||||
}
|
||||
// Handle muti-line text
|
||||
if (translated.indexOf('\n') !== -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue