Closed EpocDotFr closed 2 years ago
Hi,
It's implemented to avoid whitespaces in keys in case of typos from developers. If you need it to not trim the keys, you are welcome to make a PR with a config variable and then do the trim or not based on that variable on the mentioned line: src/Translation.php#L127.
Otherwise i'll see if I can implement it in the upcoming weeks.
Will create an MR then, thanks 👍
Hello all,
Say I have a translation in my source code which is formatted like this:
In the POEditor interface, when translating this sentence to another language, the aforementioned whitespace should remain. Which is perfectly fine and well-handled by POEditor. It's even giving you a visual hint about this whitespace. Example in French:
However, when downloading translations using the
translation:download
command, all translations are trimmed. Excerpt from the resultingfr.json
file:Looks like it's on-purpose: src/Translation.php#L127. Why such trimming?
Thank you in advance!