AmadeusITGroup / otter

The Otter project is a highly modular framework whose goal is to provide a common platform to accelerate and facilitate the development of runtime customizable Angular based Web Applications
https://amadeusitgroup.github.io/otter/
BSD 3-Clause "New" or "Revised" License
51 stars 39 forks source link

[Bug]: Error in console logs when using LocalizationContextualizationDevtools#showLocalizationKeys #1454

Open guillaume-goulet opened 8 months ago

guillaume-goulet commented 8 months ago

Package name

localization

Package version

9.6.11

Reproduction steps

Call LocalizationContextualizationDevtools#showLocalizationKeys(true) then LocalizationContextualizationDevtools#showLocalizationKeys(false)

Current result

Localization keys are correctly shown/hide but the javascript console show the following errors: image

Expected result

No console log errors

Additional comments

No errors are thrown when using the Otter demo app. It seems linked to the "date" pipe with a localized input.

This is possibly related to synchronization, where when showKeys is set to false in the localization service, the translate pipe does not immediately pick it up and hence, the raw strings are sent as format to the date pipe hence the error

Eventually, with change detection, the proper formats are constructed.

matthieu-crouzet commented 8 months ago

example of localization to reproduce myDateVariable | date : (myFormatDateLocalizationKeyVariable | translate) the date pipe should be the one exposed in @o3r/localization (rename to o3rDate in v10)