1ec5 left a comment (openstreetmap/openstreetmap-website#3939)

I want to thank @maro-21 for adding links to many /qqq messages so that 
translators like me can understand the context of what we’re translating. This 
documentation is useful regardless of interpolation. For example, I often need 
to know that a message will appear in the context of a particular page or that 
it’s a variant of some other message.

Interpolation is imperfect but better than the “Lego” localization that we have 
in some places, for example in 
https://github.com/openstreetmap/openstreetmap-website/pull/6601#discussion_r2604963172.
 The translator has to keep even more messages in sync. If anything gets out of 
sync, the user will experience a trailing thought or redundancy, which is 
functionally worse than an issue with grammatical agreement.

> In the German version the bold section would ideally be split.

If there are situations where splitting is unavoidable, so that the German 
version really needs two links with distinct labels where other languages could 
make do with just one, then maybe we could hard-code an extra interpolation 
variable in reserve for German on a case-by-case basis. It would be similar to 
how base localizations often make it possible to pluralize messages even though 
there would be no difference in English.

> However, there are some fundamental problems, including security 
> implications, with allowing html in the translations.

I’m glad that this project has been moving away from raw HTML in localizable 
messages. It is a security issue with the permissive editing on one end of the 
pipeline and the automation on the other end. In addition, OpenHistoricalMap’s 
fork is still cleaning up stale HTML in translations, since there’s no 
mechanism to ensure that the markup is in sync.

> Have you considered using a simplified markdown?

iD does this in a sort of ad hoc way. In general, that project does not use 
rich text anywhere, but the interactive tutorial is an exception. iD uses 
[Markdown-esque `**` for 
bold](https://github.com/openstreetmap/iD/blob/1a86bc5f1765b3a784218bcaf28345663b56af07/data/core.yaml#L1555)
 in those spots and does a manual find-and-replace to turn that into HTML.

> The English texts are are really difficult to translate as is, because they 
> use unusual and complicated sentence structures. Rewording into simpler 
> English might solve some of the problems as well.

That’s honestly the best approach for avoiding cross-language problems. Shorter 
sentences are better UI sentences anyways.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3939#issuecomment-3675800120
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/issues/3939/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to