Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add disp attribute to XBM and XLIFF 1.2 too #17345
I'm submitting a ...
When you run the extract tool to create XLIFF 2.0 there is this new neat feature that saves the variable or experssion inside an interpolation placeholder. If I have this
The following source element will be created.
This is very good because without it an essential information (e.g. variable name) would be lost. When disp is there the localization tool can show the pattern in a way that is much more descriptive. Here is a screenshot from a localization tool in the case where variable name coould be read.
As you can see pattern with variable names are pretty easy to read and understand.
However if there are no disp attribute the localization tool can only get the placeholder index and the same project as above would look like this.
As you can see pattern with only index are harder to read and undestand. Developer can copensate this by adding commens (as seen on both screenshots) but it would be a bit illogical because instead of variable name he or she would have to use 0 or 1 ...
Implement the same feature that is currently in XLIFF 2.0 to XBM and XLIFF 1.2 extractors.
Minimal reproduction of the problem with instructions
Extract any interpolated string first to XLIFF 2.0 and then either to XMB or XLIFF 1.2
What is the motivation / use case for changing the behavior?
Make localization easier.
Please tell us about your environment:
Windows 8.1, VS code 1.12.2
Thanks. This is not that important because XLIFF 2.0 works fine :-)
I will continue testing the new features. Thank you for implementing them, It seems the the only really important missing piece is the source code (.ts) string extraction.
I am happy that Angular has this official I18N/L10N method. Most other JS platforms do not have and then you end up with several 3rd party implementations. Hard for developers, hard for localization tool vendors.