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

When running Test-BCAppXliffTranslation with CustomTranslation Rules #41

Open
metda11 opened this issue Jul 25, 2024 · 1 comment
Open
Labels
input-needed Extra attention is needed question Further information is requested

Comments

@metda11
Copy link

metda11 commented Jul 25, 2024

First of all, great Job, it´s escactly what I was searching for. :-)

Secondly...
Is there an option to get no errors at all when I am disable the DevNote?

1.) Also I recognized that the parameters for the Test-XliffTranslation are not available as parameter in the Test-BCAppXliffTranslations
-checkForMissing -checkForProblems

2.) I would like to disable the PlaceholdersDevNote Check and I tried as follows, but still receiving errors from the work to do part.
But know without detailed message.

This is my Powershell Script

`
$MyTranslationRules = @("ConsecutiveSpacesConsistent", "OptionMemberCount", "OptionLeadingSpaces", "Placeholders")
#AllRules: "ConsecutiveSpacesConsistent", "ConsecutiveSpacesExist", "OptionMemberCount", "OptionLeadingSpaces", "Placeholders", "PlaceholdersDevNote"

Test-BcAppXliffTranslations -translationRules $MyTranslationRules -AzureDevOps error -printProblems -buildProjectFolder $buildProjectFolder -appFolders "App"

the Log without PlaceHoldersDevNote:

Loading target document C:\Users\d.metzler\Documents\Repo\InnoNav ERP Cloud\InnoNavApp\App\Translations\InnoNav App.de-AT.xlf Retrieving translation units from target document Processing unit nodes... (Please be patient) Detected: 0 missing translation(s). Detected: 6 translation(s) that need work. Translation issue in unit 'Table 3470124257 - Field 3641927271 - Method 2126772001 - NamedType 1981280967'. Translation issue in unit 'Codeunit 148877090 - NamedType 3837253833'. Translation issue in unit 'Codeunit 4149547151 - NamedType 1196336482'. Translation issue in unit 'Page 1145169541 - Control 209132376 - Property 62802879'. Translation issue in unit 'Report 1980390421 - Method 2736589801 - NamedType 4019284659'. Translation issue in unit 'XmlPort 1051831573 - NamedType 1486195221'.

the Log with PlaceHoldersDevNote:

Retrieving translation units from target document Processing unit nodes... (Please be patient) Detected: 0 missing translation(s). Detected: 6 translation(s) that need work. ##vso[task.logissue type=error]Translation issue in unit 'Table DevOps Work Item - Field ID - Method OnValidate - NamedType IdAlreadyInUseLbl: Problem detected: One or more placeholders are missing an explanation in the Developer note.'. ##vso[task.logissue type=error]Translation issue in unit 'Codeunit General Mgt. - NamedType CSSRemovedQst: Problem detected: One or more placeholders are missing an explanation in the Developer note.'. ##vso[task.logissue type=error]Translation issue in unit 'Codeunit ViewNeo Screen Mgt. - NamedType Text001Lbl: Problem detected: One or more placeholders are missing an explanation in the Developer note.'. ##vso[task.logissue type=error]Translation issue in unit 'Page Productivity Cue - Control SelectedPeriod - Property OptionCaption: Problem detected: The number of option members in the source and translation text do not match.'. ##vso[task.logissue type=error]Translation issue in unit 'Report Init InnoTask DefaultResources - Method OnPostReport - NamedType TaskInsertedLbl: Problem detected: One or more placeholders are missing an explanation in the Developer note.'. ##vso[task.logissue type=error]Translation issue in unit 'XmlPort SEPA CT pain.001.001.03 NV - NamedType NoDataToExportErr: Problem detected: One or more placeholders are missing an explanation in the Developer note.'. Saving document to C:\Users\d.metzler\Documents\Repo\InnoNav ERP Cloud\InnoNavApp\App\Translations\InnoNav App.de-AT.xlf 6 issues detected in file C:\Users\d.metzler\Documents\Repo\InnoNav ERP Cloud\InnoNavApp\App\Translations\InnoNav App.de-AT.xlf. ##[endgroup] ##vso[task.logissue type=error]6 issues detected in translation files! ##vso[task.complete result=Failed;]Make step fail

@rvanbekkum
Copy link
Owner

Dear @metda11,

Thank you for filing your issue.

Is there an option to get no errors at all when I am disable the DevNote?

I suspect you could use Sync-XliffTranslations instead, or indeed pass a different set to the -translationRules parameter.

I recognized that the parameters for the Test-XliffTranslation are not available as parameter in the Test-BCAppXliffTranslations

You can pass these along via the -testAdditionalParameters parameter. This parameter passes the additional parameters to the Test-XliffTranslations command. That way the Test-BcAppXliffTranslations command does not need to updated whenever Test-XliffTranslations gets additional parameters.

In version 1.6.0 (https://github.com/rvanbekkum/ps-xliff-sync/releases/tag/1.6.0) the following change was applied:

Changed default value for parameter -FormatTranslationUnit in Test-BcAppXliffTranslations to show both the Xliff Generator note and XLIFF Sync note for detected problems.

If you use this version or a newer one, than you should get the detailed message as well. It's odd that you don't get it when changing the translation-rules to not include the PlaceHoldersDevNote rule.
Are you still experiencing this problem?

@rvanbekkum rvanbekkum added input-needed Extra attention is needed question Further information is requested labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input-needed Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants