emit diagnostic when a key contains different parameters than its value #59
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
storage:resx
As a developer, I want to get notified when e resource-key contains more or less
parameters
than a value of one of the localized resources, in order to prevent runtime-errors after modifying translations.example1 - too few parameters
the following content of a resx-file should produce a diagnostic
The resource-key 'Hello {user:s}, it is {today:d}' of resource 'SomeResource.resx' specifies 1 parameter(s) more, than it´s current value.
//SomeResource.resx
example2 - too many parameters
the following content of a resx-file should produce a diagnostic
The resource-key 'Hello {user:s}' of resource 'SomeResource.de-DE.resx' specifies 1 parameter(s) less, than it´s current value.
//SomeResource.de-DE.resx
example3 - parameters type mismatch in format-string
the following content of a resx-file should produce a diagnostic
The parameter ' {user:s}' of resource-key 'Hello {user:s}, it is {today:d}' of resource 'SomeResource.en-US.resx' is being formatted with an incompatible format '{0:yyyyDDmm}' .
//SomeResource.en-US.resx
All of the above samples should emit a designated diagnostic
TR-XXXX
with appropriate explanationsThe text was updated successfully, but these errors were encountered: