vsc-xliff-sync icon indicating copy to clipboard operation
vsc-xliff-sync copied to clipboard

Do not mark trans-units with 'needs-adaptation' if 'xliffSync.parseFromDeveloperNoteOverwrite' = true

Open fvet opened this issue 1 year ago • 0 comments

@rvanbekkum In some of our apps, NL and EN translations are provided by the developer via AL code (using the 'comment = ' solution). What we would like to achieve for these apps, is that the single source of truth for translations is always the AL code, so the developer should not really bother on how the xliff content is updated, since all translations originate from code. Just syncing translation files should be sufficient.

The project settings look like:

"xliffSync.autoCheckMissingTranslations": true,
    "xliffSync.autoCheckNeedWorkTranslations": true,
    "xliffSync.needWorkTranslationRules": [
        "OptionMemberCount",
        "OptionLeadingSpaces",
        "Placeholders",
        "ConsecutiveSpacesConsistent",
        "ConsecutiveSpacesExist"
    ],
    "xliffSync.parseFromDeveloperNote": true,   // !!
    "xliffSync.parseFromDeveloperNoteOverwrite": true,   // !!
    "xliffSync.parseFromDeveloperNoteSeparator": "||",
    "xliffSync.findBySource": true,
    "xliffSync.findBySourceAndDeveloperNote": true,
    "xliffSync.parseFromDeveloperNoteTrimCharacters": "\"",
    "xliffSync.preserveTargetAttributesOrder": true,

However, if I adapt a caption, tooltip, ....

E.g. before

ToolTip = 'When active, the line discount will be given on the direct unit cost including excise.', Comment = 'nl-BE="Indien actief zal de regelkorting gegeven worden op de directe kostprijs inclusief accijns."';

after

ToolTip = 'When active, the line discount will be given on the direct unit cost including excise (see manual for more information).', Comment = 'nl-BE="Indien actief zal de regelkorting gegeven worden op de directe kostprijs inclusief accijns (zie handleiding voor meer informatie)."';

Then after packaging my app, and syncing the translation files, the related trans-unit id are marked as needs-adaptation. To me, this looks wrong, as the project settings specify that translations should be overwritten by the DeveloperNotes, so no need to review I'd suppose. Any thoughts on this?

 <trans-unit id="PageExtension 4150078002 - Control 2219526984 - Property 1295455071" size-unit="char" translate="yes" xml:space="preserve" al-object-target="Page 2965669802">
          <source>When active, the line discount will be given on the direct unit cost including excise (see manual for more information).</source>
          <target state="needs-adaptation">Indien actief zal de regelkorting gegeven worden op de directe kostprijs inclusief accijns (zie handleiding voor meer informatie).</target>
          <note from="XLIFF Sync" annotates="general" priority="1">Source text has changed. Please review the translation.</note>
          <note from="Developer" annotates="general" priority="2">nl-BE="Indien actief zal de regelkorting gegeven worden op de directe kostprijs inclusief accijns (zie handleiding voor meer informatie)."</note>
          <note from="Xliff Generator" annotates="general" priority="3">PageExtension ESCEBlanketPurchaseOrder - Control ESCE Line Disc. Excise - Property ToolTip</note>
        </trans-unit>

fvet avatar Jul 07 '23 10:07 fvet