btimofeev / UniPatcher

A game console ROM patcher for Android
GNU General Public License v3.0
155 stars 18 forks source link

Translation platform #22

Closed comradekingu closed 3 years ago

comradekingu commented 3 years ago

I am getting the notifications about updated strings from Transifex, but I havent logged in after EU-GDPR and I still can't without accepting a bunch of terms. Can you perhaps move the translations to Hosted Weblate? https://hosted.weblate.org/hosting/ I can help with that if you add https://hosted.weblate.org/user/kingu/ as an admin. :)

btimofeev commented 3 years ago

Ok, we can try. I created a project and added you as an admin. But I have not figured out how to add files for translation.

btimofeev commented 3 years ago

Weblate doesn't seem to support markdown and plain text files (or I didn't find how to add these line-by-line translations.). I store faq, about and info for Gogle Play in these formats:

https://github.com/btimofeev/UniPatcher/tree/master/app/src/main/res/raw https://github.com/btimofeev/UniPatcher/blob/master/google-play/en/google-play.txt

I can try to convert markdown to html (maybe it will even be better, since I don't have to convert later inside the application). But what about plain text?

comradekingu commented 3 years ago

Top stuff. I changed the VCS from "Git" to "GitHub" and added the Fastlane in this component https://hosted.weblate.org/projects/unipatcher/metadata/ Also turned on spreading of translations to other projects, and the language consistency plugin (so that if a language is created, it will be there for both components).

Edit: Should be just adding webhooks to go now https://docs.weblate.org/en/latest/admin/continuous.html#automatically-receiving-changes-from-github

Edit2: Also freezing the project on Transifex should help avoid any issues.

btimofeev commented 3 years ago

I configured a webhook and added a commit bot.

Transifex itself does not commit anything, I upload changes from it manually. The project also needs to be approved on Weblate.

btimofeev commented 3 years ago

The project has been approved on Weblate, so we can start using it. I changed all links in the application to the new server.

I also converted the markdown files to html and added it as components. But I did not understand how to configure the addition of a new language for this. The site says that I must specify some kind of template.

comradekingu commented 3 years ago

I see these have been added https://hosted.weblate.org/projects/unipatcher/about/ https://hosted.weblate.org/projects/unipatcher/faq/ where are the files to be added, and what should the convention for the translation files be? For any langauge in those "start ned language/translation" at the bottom should do it, which will create that language in all components.

I added the plugin for automatic translation based on other strings in the other components.

btimofeev commented 3 years ago

Weblate works very poorly with HTML. I added a new line in the middle of the file and all translations below it broke. Now I don't even know how to edit the FAQ. Transifex worked much better with this :(

comradekingu commented 3 years ago

Should convert it to markdown, the HTML support is very basic.

btimofeev commented 3 years ago

I already had these lines in markdown. I wrote above that I could not find where to select the markdown format and I converted md to html.

I spent a few hours yesterday and added everything in the main xml, there should be no problem with it.

btimofeev commented 3 years ago

@comradekingu Can Weblate be configured to not swap lines in xml? Or is there no such option?

comradekingu commented 3 years ago

@btimofeev I am not sure, using fuzziness for new strings based on old ones is possible, and it seems I set that up already. The current update changed authorship of all strings to you, hoping that just happened once? Where is the HTML coming from? What are you trying to do when XML lines are swapped? The strings are tracked by ID, or whatever Android calls them.

btimofeev commented 3 years ago

Shuffling lines is not a problem, it's just not so familiar to me.

I transferred all the lines from html to xml, so unfortunately I was assigned to the authors. This will not happen in the future.