Removal of empty lines in XML files

In my Android project I have files with existing translations. I want to add them to Crowdin to extend and update the translation.

The XML files contain empty lines inbetween string resources to better structure the content for human readability.

When I add the files I noticed that empty lines which are present in the file before are removed by Crowdin in the automated pull request as indicated in the screenshot:


  1. Is the empty lines removal something I can configure, e.g. via crowdin.yml or the web administration interface?
  2. Is the empty lines removal something you are working on to improve?

Crowdin don’t use exactly your file. On the export, the file is, let’s say, rebuilded in order to be 120% valid. As it’s a default parses behaviour, this can’t be changed, unless the code of Crowdin’s parser would be changed.

Probably segmentation will help you but it’s added before file upload, so most likely it may change nothing. Still if you make empty lines to be recognised as comments, it may work.

Still, I’d say accept that diff, it will be one time. Anyway system exports a valid file

Thank you for the explanation. I thought so too (that an internal representation is used which is the rendered for the export).

I am still wondering if any other Android project complained about loosing the empty lines which benefit human readability.

I was also asking myself if any of the “Apps & Integrations” does focus on this topic. I saw regex tools being mentioned but that would not be my first pick, similar to segmentation.

If tons of users complains about it, it surely should have been changed already. Maybe there’s no complainets or it’s not possible techicnally to keep those empty stings, dont know…

Store is huge, I’m sure you should find someting interesting that may benefit your work.

I guess it depends on the number of Android projects which use Crowdin as a translation service. I would be able to tell how popular this platform is compared with others.

Hard to say how much uses for private projects, because they can’t be googled, but there are some with open policy

True. I saw the public projects. It would be easier to find Android projects if there would be an “android” filter in addition to the “mobile” filter. Right now, to narrow down the search I filtered for project which use “Android” in their title.

1 Like