Help on segmentation / InlineGraphic / xml file

Hi, I have an xml file a don't get my desired segmentation done.

I have this structure, where the segment is segmented by the inline graphic.
<ActivityStep><ActivityStepDescription><BodyText>
Die Schaltfläche [Starten] <TranslationLock><InlineGraphic><fm:Frame></fm:Frame></InlineGraphic></TranslationLock> für den zu befüllenden Behälter wählen.</BodyText></ActivityStepDescription>

So I get this i Studio:

When adding the InlineGraphic tag to my parser rules, I get this:

These are the settings I used:

How do I get the text in one segment inluding the InlineGraphic? I also tried with deleting the TranslationLock in xml, just to see, but same result.

Here the complete view of the xml structure:

Thnx in advance!
Burim

Top Replies

  • 14 days ago in reply to Burim Bektesi +1 verified

    This thread is a great exercise in making sure you provide the full story at the start!

    You could do this (I just replicated the last element without the InLineGraphic):

    To do this I just…

Parents
  • It's always easier if you provide enough xml code to make it easy for someone to help you without having to type out the file and fix namespace and closing tag issues before they can even look at your problem.

    So, I created this simple file:

    segment.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <rootelement>
    <ActivityStep>
    	<ActivityStepDescription>
    		<BodyText>Die Schaltfläche [Starten] <TranslationLock><InlineGraphic><fm:Frame xmlns:fm="http://www.w3.org/TR/html4/"></fm:Frame></InlineGraphic></TranslationLock> für den zu befüllenden Behälter wählen.</BodyText>
    	</ActivityStepDescription>
    </ActivityStep>
    </rootelement>

    I then opened this with the default XML filetype in Studio 2021 and this is what I see:

    Looks fine and is what you are trying to achieve.  Why don't you start with the defaults and then refine your filetype to remove anything you don't want, or add anything not picked up.  Test as you go and then you'll probably find it easier.

  • Hi Paul,

    I cut my file down leaving only the parts I need for this issue.

    TEST_InlineGraphic_OBJ_DCL_EN.xml
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <fctdcl RSID-Object="BasisRS://OBJ_DCL/147583//001/1//296642:396" RSKM-AppliesTo="" RSKM-Auftrag="" RSKM-BaseDocument="0000016233" RSKM-BaseDocumentVersion="001" RSKM-DocuType="Betriebsanleitung" RSKM-DocumentNo="" RSKM-FreigabeDatum="27.08.2020" RSKM-Language="DE" RSKM-OrderNo="" RSKM-ProductGroup="" RSKM-ProductName="" RSKM-ProductType="Materialaufbereitung" RSKM-Title="OM_(DOS) LP804" RSKM-Version="001" RSKM-Web="Nein" TCIM-ProjectID="4598" TCIM-SourceLanguage="DE" TCIM-TargetLanguage="EN" TCIM-TransState="PreTranslated" xml:space="preserve" xmlns:fct="http://www.fct.de/general" xmlns:fm="fctfmns.xml">
    <Cover>
    <CoverTitle>Betriebsanleitung</CoverTitle></Cover>
    <Chapter><Chapter><Para RSID-Component="BasisRS://OBJ_BAUST/131983/DE/002/1//310348:3" RSIM-VariantControl="" TCIM-Checksum="3795546564:1" TCIM-InternalID="320" TCIM-TransState="CompToTranslate"><Separator Type="NoLine"/><Activity><ActivityStepGroup>
    <ActivityStep>
    <ActivityStepDescription>
    <BodyText>Die Schaltfläche [Grundstellung] 
    <TranslationLock TransLockReason="CompTranslated">
    <InlineGraphic HTMLOutput="" RSID-Graphic="BasisRS://OBJ_GRAF/152297/XX/001/1//304438:1:*ORG*/354394" TCIM-InternalID="309" TCIM-TransState="CompTranslated">
    <fm:Frame Align="4" BaseLine="458752" Color="Schwarz" Common="0,0,0,2,0,393216,6553600," Cropped="0" GroupParent="0" HasImgGroups="0" Offset="0" Pos="21984784,9226968,1393284,1393284,0" Style="15,15,65536,0" Type="1"><fm:Inset Color="Schwarz" Common="0,0,0,2,2,393216,6553600," Dpi="72" File="\\Sonne\timrs\FCTTIMPUBLIC\Redaktionsgrafiken\DAT0030\00354394.png" Fixed="1" Flipped="0" GroupParent="0" Pos="3402,3402,1386481,1386481,0" Style="15,7,65536,0" TCIM-ViewFile="_images\00354395.jpg"/>
    </fm:Frame>
    </InlineGraphic>
    </TranslationLock> für die Materialförderung wählen.
    </BodyText>
    </ActivityStepDescription>
    </ActivityStep></ActivityStepGroup></Activity>
    </Para></Chapter>
    </Chapter>
    <Chapter>
    <Para RSID-Component="BasisRS://OBJ_BAUST/153911/DE/001/1//307199:7" RSIM-VariantControl="" TCIM-Checksum="656960878:1" TCIM-InternalID="333" TCIM-TransState="CompToTranslate"><Activity><ActivityStepGroup>
    <ActivityStep><ActivityStepDescription><BodyText>Auf Bedieneinheit unter Menü [Produktion] <TranslationLock TransLockReason="CompTranslated"><InlineGraphic HTMLOutput="" RSID-Graphic="BasisRS://OBJ_GRAF/151484/XX/001/1//303159:1:*ORG*/352849" TCIM-InternalID="334" TCIM-TransState="CompTranslated"><fm:Frame Align="4" BaseLine="524288" Color="Schwarz" Common="0,0,0,2,0,393216,6553600," Cropped="0" GroupParent="0" HasImgGroups="0" Offset="0" Pos="25737784,7233542,1486170,1289562,0" Style="15,15,65536,0" Type="1"><fm:Inset Color="Schwarz" Common="0,0,0,2,2,393216,6553600," Dpi="72" File="\\Sonne\timrs\FCTTIMPUBLIC\Redaktionsgrafiken\DAT0030\00352849.png" Fixed="1" Flipped="0" GroupParent="0" Pos="63381,116733,1457713,1056096,0" Style="15,7,65536,0" TCIM-ViewFile="_images\00352850.jpg"/></fm:Frame></InlineGraphic></TranslationLock> das Widget [Füllstand]  <TranslationLock TransLockReason="CompTranslated"><InlineGraphic HTMLOutput="" RSID-Graphic="BasisRS://OBJ_GRAF/153939/XX/001/1//307229:1:*ORG*/357728" TCIM-InternalID="335" TCIM-TransState="CompTranslated"><fm:Frame Align="4" BaseLine="524288" Color="Schwarz" Common="0,0,0,2,0,393216,6553600," Cropped="0" GroupParent="0" HasImgGroups="0" Offset="0" Pos="12446674,7970821,1486170,1338714,0" Style="15,15,65536,0" Type="1"><fm:Inset Color="Schwarz" Common="0,0,0,2,2,393216,6553600," Dpi="72" File="\\Sonne\timrs\FCTTIMPUBLIC\Redaktionsgrafiken\DAT0031\00357728.png" Fixed="1" Flipped="0" GroupParent="0" Pos="318078,150518,807268,985496,0" Style="15,7,65536,0" TCIM-ViewFile="_images\00357729.jpg"/></fm:Frame></InlineGraphic></TranslationLock> wählen. </BodyText></ActivityStepDescription></ActivityStep>
    <ActivityStep>
    <ActivityStepDescription>
    <BodyText>Die Schaltfläche [Starten] <TranslationLock TransLockReason="CompTranslated"><InlineGraphic HTMLOutput="" RSID-Graphic="BasisRS://OBJ_GRAF/153945/XX/001/1//307235:1:*ORG*/357735" TCIM-InternalID="336" TCIM-TransState="CompTranslated"><fm:Frame Align="4" BaseLine="524288" Color="Schwarz" Common="0,0,0,2,0,393216,6553600," Cropped="0" GroupParent="0" HasImgGroups="0" Offset="0" Pos="20019129,9018699,1486170,1339411,0" Style="15,15,65536,0" Type="1"><fm:Inset Color="Schwarz" Common="0,0,0,2,2,393216,6553600," Dpi="72" File="\\Sonne\timrs\FCTTIMPUBLIC\Redaktionsgrafiken\DAT0031\00357735.png" Fixed="1" Flipped="0" GroupParent="0" Pos="-21523,-94903,1529217,1529217,0" Style="15,7,65536,0" TCIM-ViewFile="_images\00357736.jpg"/></fm:Frame></InlineGraphic></TranslationLock> für den zu befüllenden Behälter wählen.</BodyText></ActivityStepDescription>
    </ActivityStep>
    </ActivityStepGroup>
    </Activity><Separator Type="NoLine"/>
    </Para>
    </Chapter>
    </fctdcl>


    In anyXML I indeed do get the result I want, but I have to use my customer settings. There, even if I deactivate all other parsers and use only the <InlineGraphic> and <fm:Frame> I get the same result :-(

    :-(

  • It sounds to me as though you need to go back to your customer and discuss this with them.  Unless you can share the settings file so we can look at this properly and try to see why it's behaving the way it is.

  • Discussing with the customer won't help, as it's me who created the settings file. But of course I can share my settings file. Sorry. I will share everything from the beginning next time.

  • Looks like you're missing a rule for <fm:Inset> and this is why it's being segmented.

  • Hi Paul, sorry, I haven't ssen that tag :-(

    I made it now, but only when declaring also //TranslationLock to "always translate", what I can't  do actually, as //TranslationLock has to lock already translated texts.

    Is there no method to tell Trados here to consider the <TranslationLock> only in combination with <InlineGraphic>?

    Gruß

    Burim

  • This thread is a great exercise in making sure you provide the full story at the start!

    You could do this (I just replicated the last element without the InLineGraphic):

    To do this I just used this rule:

    //TranslationLock[not(descendant::InlineGraphic)]

    Place this above your normal one and it should allow you to get what you need:

    Or if I misunderstood something you should have the information now to achieve what you wanted.

  • Hi Paul, great, it works. Thnx a lot. Bothe lessons learned. Sorry :-(

    Can you "translate" what it means to put:
    //TranslationLock[not(descendant:InlineGraphic)] -> Not to translate

    and below:
    //TranslationLock -> Always translate

    DANKE :-)
    Burim

  • It means... when you find the TranslationLock element that does't have a child element called InLineGraphic then treat it as non-translatable. 

    Studio sees this first and so if it finds a TranslationLock element that does have a child element called InLineGraphic then it skips that rule and moves on.

    The next rule is treat any TranslationLock elements that are left as translatable... this will be the ones that do have InLineGraphic.

    You could have done this the other way around but this was the first idea that popped into my head :-)

  • Can you precise "the other way around"? Like this? Just for my curiousity.

    //TranslationLock(descendant:InlineGraphic) -> do not translate

    //TranslationLock -> Not to translate


  • No, not like that.  You need to be able to translate something so the first one would be "translate", not "do not translate", and second one would be "do not translate".

Reply Children
No Data