-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate using Weblate for translations #1973
Comments
I've created a project for LOOT on Weblate. I'm still in the process of setting it up, but:
I've noticed that Weblate checks strings for various things, and there are many errors: The punctuation spacing errors seem to be false positives due to the format string placeholder syntax, so it looks like I'll need to configure Weblate to recognise that. There may also be other false positives, I haven't gone through the lists of failing checks. |
Could you also disable the reused translations check? |
I'll look into it, if it's complaining about the message being the same as English then I think it would be better to just leave that translation out, as if there's no translation for some text it'll just use the original English anyway. Capturing other input from Discord:
|
I've configured the Weblate webhook in this repository, enabled reviews in Weblate, and added |
I would advise against leaving out translations if the translation is the same as the English one. Not only wouldn't the translation progress be able to reach 100% that way, it also is helpful to make a statement, that "yes, the translation is indeed identical to the original, it is exactly right this way". That information is sort of not given, if the translation has been removed. Also future translators might think that they need to add the translation back in. |
Right, that makes sense where the translated text is unchanged, I was thinking about if we've still got any cases where untranslated text was just copied across (I think that has happened in the past?). |
Might be, though I can't recall any specifics in that regard right now. I'll look into it later in the evening. |
I've hooked up translation of the Inno Setup custom messages to Weblate. This required the custom messages to be split out into separate files (which Weblate requires all translation formats to do) and to simplify the non-Weblate translation flow the English strings appear in all translations where there's not a translated string, so that the message names appear in all translation files (as just having I've gone through the strings in Weblate and approved those that are translated and marked those that are just copies of the English strings as needing edits. I've also had a look at if we could use Weblate for translating the prelude, and:
Adopting an existing translation file format is out of scope for this ticket, so we can't use Weblate to translate the prelude directly, but I think it's possible to use it to replace the Google spreadsheet that we currently use to manage the prelude translations. The way that would work is that we'd have a similar setup to how the installer translations now work:
@pStyl3 does that sound like a worthwhile improvement over the current workflow? EDIT: I've created loot/prelude#65 and the Prelude component on Weblate to demo this approach. |
I've registered myself an account on Weblate now. While I'm new to Weblate and as such am still learning how it works, the suggested changes regarding the Prelude should have the following effects:
Overall, strictly spreaking about the weblate adaptation for the prelude, the proposed workflow still seems a bit clunky, as there will still be the need to manually sync translations between That being said, with weblate the workflow seems to be a bit less clunky as with the Google spreadsheet, so I'd say we should try to implement it and see how it goes. |
@pStyl3 I've invited you to the Administrators group for the LOOT project on Weblate. It might be possible to have a script that syncs between For now, I'll continue with that PR for the prelude. |
Thanks, I've accepted the invitation. |
Unfortunately I can't find any YAML parser that will give access to anchors or round-trip them and comments, so automatically updating the prelude is probably not feasible. I did write a script to extract the strings from the prelude using regexes, but it does make assumptions about the layout of the file and its formatting, so I don't think it would be a good idea to automate applying that script. The script assuming that messages are single-quoted did help me spot one Danish translation that was incorrectly quoted (it was using double quoted but had a EDIT: I've also added a script for writing message text from |
I've made some changes to the settings on Weblate, as strings that are "waiting for review" still get included in PRs to this repo. The relevant settings are:
See this PR comment for the context. Disabling reviews means that translations have effectively two states:
I've created a second account that is not in the LOOT project to test the suggestions, and found some bizarre behaviour:
So:
Frankly, I'm amazed that projects on hosted Weblate aren't inundated with spam and abuse with such permissive defaults, and I'm now pretty hesitant to start using Weblate for LOOT and open myself up to dealing with that. |
Raised by sibir in Discord here. It looks like it would reduce the barrier to entry for translators, but we need to work out how it would integrate with this repository. Weblate does support gettext, which is what LOOT uses.
I wouldn't want to require that translations go through Weblate, i.e. it should be possible to make changes to translations in Git and in Weblate without issues (aside from potentially conflicts if you edit the same lines).
The text was updated successfully, but these errors were encountered: