A button to show preview of message (translation)
It will be easy to find syntax errors in the translation, or see how the translation will look like. It could reduce the number of cases such as T379558
| Nemoralis | |
| Nov 18 2024, 12:10 AM |
| F58051313: image.png | |
| Dec 24 2024, 10:36 AM |
A button to show preview of message (translation)
It will be easy to find syntax errors in the translation, or see how the translation will look like. It could reduce the number of cases such as T379558
Messages come from various different places and we don't actually know which of them are parsed as wikitext.
Maybe we should? When not using the translation interface, non-wikitext messages are currently presented as wikitext, that could be also fixed based on this piece of information. I think it could be stored at the group (sometimes aggregate group) level, with possible values:
The preview makes sense for any type other than unknown (since the <pre> doesn’t add anything to the <textbox> the user is typing into).
@Nemoralis, please note that even if this feature is implemented, it won’t be able to provide more than what clicking Show in wiki editor and then previewing there could provide: it won’t be able to provide sample parameters, it won’t be able to tell if the message is actually parsed at the start of a line (so # et al really cause problems), whether all wikitext is usable in the message, and so on. In order to provide such information, we’d have to expect developers writing translatable code to provide all sorts of metadata, which isn’t realistic.
This is a problem especially with editing message documentation, since the link from
leads to Special:Translate and not to a normal editing page but you can’t actually preview anything on that page.Syntax highlighting can also help to find & fix syntax errors, I fixed this using wiki editor