[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about Weblate scripts
From: |
Libor Polčák |
Subject: |
Re: Question about Weblate scripts |
Date: |
Tue, 31 Oct 2023 12:32:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.17.1 |
Hello Ricardo,
Hello Libor,
Thank you for your detailed analysis and support!
After resetting (well, checking out) the weblate branch and re-running the
script with the debug branch, I can confirm it's working as expected. I'm not
sure what was hanging everything up, but things look normal and seem to work
according to your comments.
If you'd like, I can go back to the script and test those conditions, but
things are working now (and I'm sure we'll run into something again once we
expand the translation pipeline)
I think that it is not necessary. But we should be careful about the locales.
I will now make another attempt to add Weblate components for the website
pages. After reading and testing Weblate's Markdown support, it might be the
case that it's not sufficient for our use case -- for instance, I'm not sure it
can handle the markdown frontmatter properly. We'll experiment further, but
maybe the meeting today is a good moment to discuss a possible plan B in case
this is not an option:
1. Manually set up a pipeline using a2po, which is what Weblate uses behind
the scenes for its Markdown support, but maybe it can be fine-tuned for our
specific purposes. This will be quite a bit of work though
2. Have a different translation pipeline without Weblate for the website files
(e.g. just edit them in the repository?). This is of course a last-resource
compromise which we'd definitely like to avoid
I also see an option 3 (that might actually be #1), I will explain so that we
can discuss in the evening. In the webextension JSON I have placeholders that
are not supported by Weblate. So the scripts main2weblate and weblate2main
transform entries like:
"defaultLevelSelection": {
"message": "Default level ($levelName$)",
"description": "This text is displayed as the default level in the
popup",
"placeholders": {
"levelName": {
"content": "$1",
"description": "Translated name of the default level
used by the user",
"example": "Recommended, see the keys JSSL*Name like
JSSL2Name"
}
}
},
to
"defaultLevelSelection###placeholders###levelName": {
"message": "$1",
"description": "If in doubt, keep as is ### Translated name of the default
level used by the user ###EXAMPLE### Recommended, see the keys JSSL*Name like JSSL2Name"
},
"defaultLevelSelection": {
"message": "Default level ($levelName$)",
"description": "This text is displayed as the default level in the
popup"
},
And vice-versa.
Libor