i18n ignore leading and trailing spaces
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
now ng-xi18n will generate xliff including spaces, for example there is an element
<p i18n>
复制
</p>
it will generate
<source>
复制
</source>
it’s really weak to rely on spaces since they could changed Unintentionally or even by IDE reformat code.
Expected behavior
ignore leading and tailing spaces
Issue Analytics
- State:
- Created 7 years ago
- Reactions:92
- Comments:52 (23 by maintainers)
Top Results From Across the Web
How can I stop a label from automatically trimming white ...
So far I've tried placing a space after the i18n key itself to no avail. ... the label from automatically removing the trailing...
Read more >NSCollectionLayoutEdgeSpacing - Apple Developer
The leading and trailing spaces within edge spacing differ in left-to-right versus right-to-left environments. In a left-to-right environment, the leading ...
Read more >Whitespaces are Evil..How Angular translates your string ...
This post contains a set of statements on how to tag particular element with i18n and cases developer needs to consider while coding....
Read more >How to ignore extra whitespaces in translation functions like _e?
A better bet would be to translate multiple smaller fixed text strings and then join them later, or to adjust your code so...
Read more >trimws: Remove Leading/Trailing Whitespace - Rdrr.io
x. a character vector. which. a character string specifying whether to remove both leading and trailing whitespace (default), or only leading ( "left"...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi everyone. This has not been on my radar but it sounds like it might be a good idea to implement it. I think we could put it behind some kind of flag to prevent a breaking change. In the not-too-distant future we also need to migrate away from our legacy message ids, so this could also be part of that work. Since this is not a trivial piece of work, I am not sure right now when it will be implemented. Sorry not to give you any better indication, right now.
The issue remains in 2020. Just because it’s “going to be in ivy” doesn’t mean it can’t be fixed here…