I've been using Crowdin to translate Krastorio 2, using Crowdin's GitHub action to do the synchronization. It's been working pretty well! However, in order for Crowdin to provide a good translation interface, the action renames the files to .ini. The problem is, Factorio does not follow the INI standard.
Crowdin, following the INI spec, will automatically add quotes around any value that has special characters (#;=) in it. For example:
Code: Select all
# Before:
my-rich-text=[color=255,0,0]Red[/color]
# After:
my-rich-text="[color=255,0,0]Red[/color]"
There is another problem: Crowdin, following the INI spec, will consider anything between a semicolon and EOL to be a comment. So if you have a translation such as:
Code: Select all
my-semicolon=The way; this way!
My current plan is to put together some scripts to convert the source files to have quotes around every translation, then call the Crowdin action, then call another script to remove those quotes in the files that Crowdin returns. However, this is far from an ideal solution. I would like to request that Factorio properly follow the INI spec for locale files so this issue doesn't even come up. Barring that, if Factorio could handle the quotes around translations, that would be plenty.