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

Write more descriptive information to the Azure Devops log #21

Closed
jhoek opened this issue Nov 23, 2021 · 8 comments · Fixed by #26
Closed

Write more descriptive information to the Azure Devops log #21

jhoek opened this issue Nov 23, 2021 · 8 comments · Fixed by #26
Labels
enhancement New feature or request shipped Issue is available in the public release.

Comments

@jhoek
Copy link
Contributor

jhoek commented Nov 23, 2021

Currently, in Test-XliffTranslation, for each missing and incorrect translation entry, the ID is written to the host (in our case: Azure Devops Pipelines log).

$missingTranslationUnits | ForEach-Object {
  Write-Host ($detectedMessage -f $_.id);
}

This leads to log entries that look like this:

2021-11-08T14:00:29.3495600Z ##[warning]Missing translation in unit 'Table 476401740 - Field 3249588532 - Property 62802879'.

I think most users would like some influence on the way these things are reported - the actual table ID, field no. and property name would certainly help in the example above.

My suggestion would be a scriptblock parameter that accepts a single XmlNode (the translation unit) and returns the string that you want to send to Write-Host. The default value for the parameter could be a scriptblock that returns the ID property of the translation unit it receives, so that the out-of-the-box behaviour remains as it is today.

@rvanbekkum rvanbekkum added the enhancement New feature or request label Nov 23, 2021
@rvanbekkum
Copy link
Owner

That's a nice idea. I will look into it.

@jhoek
Copy link
Contributor Author

jhoek commented Nov 30, 2021

We plan to use this scriptblock for BC translations. Since your module is not exclusively targeted at BC development, I wasn't sure whether to include this as an example.

{ param($TranslationUnit) $TranslationUnit.note | Where-Object from -eq 'Xliff Generator' | Select-Object -ExpandProperty '#text' }

@rvanbekkum
Copy link
Owner

If it is just as an example (rather than the default value), then that can't hurt, right? 😊

@rvanbekkum rvanbekkum reopened this Nov 30, 2021
@rvanbekkum rvanbekkum added the ships-in-future-update Resolution will be available in the next release. label Nov 30, 2021
@jhoek
Copy link
Contributor Author

jhoek commented Nov 30, 2021

If it is just as an example (rather than the default value), then that can't hurt, right? 😊

Maybe you could include the example script block in the README?

@rvanbekkum
Copy link
Owner

Surely! 🙂

@rvanbekkum
Copy link
Owner

And perhaps I could look into adding it as the default value for Test-BcAppXliffTranslations as that one is targeted at BC development. I think it would be a better default value for BC use-cases. Will most likely take this up as part of #22.

@rvanbekkum
Copy link
Owner

I have just made this the default for the Test-BcAppXliffTranslations function with the latest commit in the develop branch, i.e., c3d2dbc

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

Shipped in version 1.5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request shipped Issue is available in the public release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants