Evaluation error

When opening the Piece tool I want to change the properties,

I click on the Eigenschaften (top on the grey field.

normally I can than change the properties but since the latest uptdate this error occurs

I click on the bott

I cant change the properties.

1 Like

Can you post the pattern? The error is showing something to do in the label template. Just out of curiosity… what does the app and pattern do if you switch the language to English?

Also is it pssible you can post the label template xml file yiu used? There’s apparently something in the template that can’t be parsed.

3 Likes

@Douglas , hello and thx for the answer, attached you find the pattern.

ShopperBauhaus.sm2d (20.3 KB)

3 Likes

HI Guido… Ok. There’s nothing wrong with the pattern - per se. The issue is with the label template xml file as indicated in the error msg.

image

In fact, it’s failing to even read the 1 char of the file (line 1, col 1) so it’s apparently not a valid xml. What I don’t get is the only time a template is read from a file is when you click Edit Template… just opening the Properties dialog should not be loading any label templates. Once any templates are loaded and the pattern saved, the label templates are now embeded in the pattern file, and are read when the pattern is parsed.

A template should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<template>
<version>1.0.0</version>
<lines>
    <line alignment="4" bold="true" italic="false" sfIncrement="6" text="%pLetter%"/>
    <line alignment="4" bold="true" italic="false" sfIncrement="2" text="%pName%"/>
    <line alignment="4" bold="false" italic="false" sfIncrement="0" text="%mFabric%, %wCut% %pQuantity%"/>
</lines>
</template>

I’d have to see the template file to know what’s wrong with it.

That being said… there’s a reason for the “templates” and the translated placeholders they use, rather than hard coding each label as you did.

Lets take the 1 piece as an example:

Screenshot 2024-03-05 033556

I first assume the name here should just be Futtertasche and not FuttertaschePatternPiece?

So now in the Labels->Piece Label->Edit Template instead of this:

image

We insert the various placeholders:

image

to get this:

image

and when the Piece label is rendered it fills in the Property data into the placeholders to get this:

image

Simply changing the GUI language to English will then retranslate the label to:

image

The idea, once you have created a set of templates, all you need to do is load a template into a label and that’s it. There’s generally no need to edit every label. Also by using the translated placeholders it’s easier to share patterns, as the user will see the label template and output in whatever GUI language they’re using.

image

And just for context… the translation for the lining placeholder as found in the De ts file:

<message>
    <source>mLining</source>
    <comment>placeholder</comment>
    <translation>mFutter</translation>
</message>
2 Likes