dima74 / factorio-mods-localization

Translate your Factorio mod easily with the power of Crowdin
MIT License
17 stars 1 forks source link

Rare wrong/corrupted *.cfg files #12

Closed ZwerOxotnik closed 7 months ago

ZwerOxotnik commented 2 years ago

cfg file: https://github.com/ZwerOxotnik/brush-tools/commit/65338fda5370bb20ac5d9589837451ac28289a77

Crowdin: https://crowdin.com/translate/factorio-mods-localization/922/en-es?filter=basic&value=3#q=give-recolor-bt

It should be like:

give-recolor-bt=Obtén una herramienta para cambiar el color
give-eraser-bt=Obtén una herramienta para borrar el color

Instead of:

give-recolor-bt=
Obtén una herramienta para cambiar el color=
give-eraser-bt=
Obtén una herramienta para borrar el color=

And that user haven't added = at the end.

dima74 commented 1 year ago

This happens when the translated string contains newlines. I fixed these two strings at Crowdin, will think how this can be solved in generic way

ZwerOxotnik commented 1 year ago

Do you wanna check me invalid stuff? First characters like space, \n, \r etc. should be removed by a pattern. (space is invalid as first character since x.x version in Factorio's cfg files)