For now, the content of the messages of the constraint script is only in English.
It should be possible to display these messages in the languages of the user.
Description
Status | Subtype | Assigned | Task | |
---|---|---|---|---|
· · · | ||||
Resolved | Lydia_Pintscher | T97018 [Story] Integrate violations into Wikidata UI | ||
Resolved | Lydia_Pintscher | T164051 [Task] Allow translation of the messages | ||
· · · |
Event Timeline
If I set my language to German, I get German messages, and if I set it to French, the messages look pretty French to me. In Portuguese, I get the English ones – but I think that’s just because there aren’t any Portuguese translations for violation messages yet (the pt file only translates some meta messages, and the pt-br file only translates a single message, for the word “Constraint”).
Do you know which language the original reporter was using? I think we’re just missing the translations, the software should support this already.
(The labels “Status”, “Message”, and “Constraint” are untranslated in the user script’s report display, but we might be able to solve that differently – “Status” can be removed anyways, “Message” doesn’t really need a header, and the “Constraint” could instead be a small headline above the message.)
(Also, because the messages are generated server-side, I think it will take until the next deployment of the extension for updated translations to become effective. So even if users have already started translating, they’ll still see the English messages for a bit longer…)
(Change 350804 gets rid of the unlocalized “Status”, “Message”, and “Constraint” strings.)
@Lucas_Werkmeister_WMDE Here are some details from the user that reported the problem:
my user-selected language in Wikidata is Czech (čeština, wiki code "cs"). I also have it set in my Babel, if it matters.
So e.g. I was crawling through Q20 (Norway), where in property P530 (diplomatic relation), there is a violation by Q34 (Sweden), saying (in Olga's tool)
Symmetric This property must only be used when there is a statement on its value entity with the same property and this item as its valueHowever, when I navigate myself to property talk of P530 I can see the description of symmetric property clearly in Czech. (And so the other 3 constraints there).
So much for example, other constrains behave likewise.
Unfortunately, our translations are independent of the templates, and while Czech has some translations, the translation for the “symmetric” constraint (wbqc-violation-message-symmetric) is missing. I’m not very familiar with translatewiki.net, but I think this would be the place to translate that particular message. In general, all messages keys for this extension start with wbqc-, and all violation messages in particular with wbqc-violation-message-, but I don’t know how to search for those messages on translatewiki.net.
I don’t think it makes sense to invest the work to import the translations from the templates, either, since we want to improve the messages anyways (T163997), and the template messages won’t help us with that.
I don’t think it makes sense to invest the work to import the translations from the templates, either, since we want to improve the messages anyways (T163997), and the template messages won’t help us with that.
Regarding future translations: Can we add some context information along with the messages to be translated to make sure they are understood right? I hope we manage to craft the English text so they are understood well, but just in case if would be good to deliver some examples people can check their translation with. (@Lea_Lacroix_WMDE, is such a thing possible at the translatewiki?)