Replies: 3 comments
-
I don’t think the warning itself is a problem. If you're sure your files are not monolingual, you should be fine. However, Weblate does not permit suppressing warnings as far I know. So you can only pretend it's not there. Had the same problem recently, too; this warning appeared on a component where I am very certain it's not monolingual (just simple Gettext POT/PO). I think the warning is kind of nonsensical anyway. How does Weblate know that a translation component "looks monolingual"? What does "look monolingual" even mean? Is Weblate just guessing here? If this is indeed just a guessing, I might even suggest to just remove this warning from the Weblate code altogehter, because we cannot dismiss warnings, and this warning will just be annoying if it's wrong. I think all component warnings should be strictly fact-based, no guesswork or heuristics, please. |
Beta Was this translation helpful? Give feedback.
-
Without a Monolingual base language, the strings will not have a proper source, only keys (if I understood the structure of your files, this is also what the warning focuses on). This will make it confusing for users and will break things like machine translation or quality checks. |
Beta Was this translation helpful? Give feedback.
-
I don’t really think that answers our questions. :-( I’ve just looked again into my file and I still don’t see anything wrong with it. I use exclusively gettext PO files and all components work except one: I think you can even try to reproduce my use case by creating POT/PO files yourself with those 4 words. I have now further investigated it and it seems Weblate really does just use a heuristic to trigger the warning. (
The final part is what looks relevant.
Let’s pretend Then the function returns True if the source strings contain no whitespace, but a translation strings does. And I just checked the translations again and indeed, the Turkish translation for "Clear" is "Açık Hava". A whitespace. So that must be what triggered the warning. So wait a minute, is this warning basically just a whitespace checker? That doesn’t sound right. I don’t remember the gettext manual saying that all msgids without whitespace have any special meaning. The only special msgid I know of is the empty string, which is used for the PO file metadata. (Feel free to point me to the part of the manual that proves me wrong.) Therefore, I think this warning is completely broken by design and should be removed entirely (especially since it cannot be dismissed by the user). Unless this warning can be rewritten to be completely fact-based and not guess-based ("looks monolingual"). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a project with two languages, English and German. The translations use i18next JSON files,
de/translation.json
anden/translation.json
with the structure{ "pageName": { "keyName": "translation", ... }, ... }
. Translations are done by two different people, one for English and one for German, independently from each other, the "source" are the keys.I set up the project with "English (Developer)" as source language and no Monolingual base language file.
I now get a red warning icon after the language name in the UI:
When I click it, I come to a warning that says:
But if I do that, one of the languages disappears and what's worse, a missing translation in that language prevents translation of the other language. So if for example I set
en/translation.json
as monolingual base file, then English disappears and the German translator is unable to enter a translation for a particular key until the English translator has done so.So I'm inclined to just ignore the red warning and work like that, is that going to be a problem?
Is there a way to dismiss the warning?
Beta Was this translation helpful? Give feedback.
All reactions