Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation(s) that need work - no output compared to Xliff-sync #8

Closed
fvet opened this issue Apr 8, 2021 · 5 comments
Closed

Translation(s) that need work - no output compared to Xliff-sync #8

fvet opened this issue Apr 8, 2021 · 5 comments
Labels
bug Something isn't working shipped Issue is available in the public release.

Comments

@fvet
Copy link

fvet commented Apr 8, 2021

@rvanbekkum

I've a project with following XliffSync settings:

"xliffSync.baseFile": "Navitrans 365 Core.g.xlf",
    "xliffSync.findBySource": true,
    "xliffSync.missingTranslation": "%EMPTY%",
    "xliffSync.autoCheckNeedWorkTranslations": true,
    "xliffSync.autoCheckMissingTranslations": true,

When manually synching g.xliff to nl-be.xliff (via synchronize translation units in VSCode), I get a message for 2 missing translations (ok) and 1 translation that needs work (fine !!)

image

This is indeed marked in the nl-be.xliff file

<target state="needs-adaptation">Opmerkingen</target>

Re-running the synchronize translation units in VSCode, gives the same message: 2 missing translations (ok) and 1 translation that needs work (fine !!)


I've integrated the above in a pipeline using PS-xliff-sync, to ensure translations are synced as part of the build process and we use the output as build artifact, to have an idea on the amount of work needed to translate our apps. This works for the missing translations, but seems not to list the 'translations that need work'.

Running a PS script to check on missing translations and to check for problems ...

$WorkspaceFolder = 'C:\GIT\Navitrans.Core\' 
$SourceFile = Join-Path $WorkspaceFolder "App\Translations\Navitrans 365 Core.g.xlf"
Sync-XliffTranslations -sourcePath $SourceFile -targetPath (Join-Path $WorkspaceFolder "App\Translations\Navitrans 365 Core.nl-BE.xlf") -reportProgress
Check-XliffTranslations -targetPath (Join-Path $WorkspaceFolder "App\Translations\Navitrans 365 Core.nl-BE.xlf") -checkForMissing -reportProgress -checkForProblems -translationRules ConsecutiveSpacesConsistent, ConsecutiveSpacesExist, OptionLeadingSpaces, OptionMemberCount, Placeholders

... only provide this output

Detected: 2 missing translation(s).
Missing translation in unit 'Enum 870401921 - EnumValue 3355985101 - Property 2879900210'.
Missing translation in unit 'Enum 870401921 - EnumValue 4008471815 - Property 2879900210'.
Detected: 0 translation(s) that need work.  <<<< ?

I expected to see the same result as in VSCode, that 1 translation needed work (instead of 0).

Is there something wrong with my settings?

Navitrans 365 Core.zip

@rvanbekkum rvanbekkum added the bug Something isn't working label Apr 18, 2021
@rvanbekkum
Copy link
Owner

Hi @fvet,
I just checked and I see the issue, vsc-xliff-sync has the following statement which will include trans-units with state needs-adaptation in the count that is missing in ps-xliff-sync:

    if (targetDocument.getState(unit) === translationState.needsWorkTranslation) {
        return true;
    }

This should be an easy thing to fix. I will include it with a new release!

@fvet
Copy link
Author

fvet commented Apr 29, 2021

Hi @rvanbekkum , any idea on when we might expect the new release? ;)

@rvanbekkum
Copy link
Owner

Hi @fvet,
I will probably work on it this weekend!

@fvet
Copy link
Author

fvet commented Apr 30, 2021

@rvanbekkum You should enjoy the nice weather and the re-opening of the bars instead this weekend :)

@rvanbekkum rvanbekkum added ships-in-future-update Resolution will be available in the next release. shipped Issue is available in the public release. and removed ships-in-future-update Resolution will be available in the next release. labels May 20, 2021
@rvanbekkum
Copy link
Owner

A change for this has been shipped in version 1.2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working shipped Issue is available in the public release.
Projects
None yet
Development

No branches or pull requests

2 participants