Opened 6 years ago
Last modified 5 years ago
#17341 new enhancement
Better ways to already translated Help content
Reported by: | Hb--- | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | unspecified | Version: | |
Keywords: | wiki trac help l18n swing | Cc: | stoecker |
Description (last modified by )
With #15994 a translating interlink system was introduced. Since then wiki authors don't have to worry about outdated links.
But neither Trac nor the wikitr:
macro know the preferred language of the reader. So readers might get English pages even when translated versions are available. For example:
- Pressing F1 in a JOSM installation preferring German brings /De:Help.
- Clicking the link Relation Editor on that page brings the default page Help/Dialog/RelationEditor because the translated variant is missing.
- Clicking the link Back to Main Help at the bottom brings the reader to the English page /Help and NOT to the German one.
The [[TranslatedPages]]
language panel offers an easy way to the preferred language. But it's shown in usual browsers only and filtered out by JOSM.
To provide better translated content some options are possible:
a) Hope that in future some Java version will bring a better HTML viewer and don't filter the language panel out in JOSM any more.
b) Replace Oracles HTML viewer by better internal browser now. But a GPL licensed one is needed or some dollars.
c) Abandon the HTML viewer and use the default browser. This is already done when handling bug reports. (The options a) to c) to not apply because JOSM filters the language list, not java)
d) A modified output format of the [[TranslatedPages]]
macro could be shown by the current HTML viewer. The format needs to be a horizontal line of language names on the top of each help content page. The OSM wiki offers such a solution. This would allow help readers to choose the language on each page.
e) Best solution is to make JOSM automatically insert the preferred language root in the called URL. In the scenario above this is De:
. The click in step 3 would call https://josm.openstreetmap.de/wiki/
De:
Help
. If the translated page exists, it will be delivered. If it is missing, then the already existing fallback mechanism inside JOSM would deliver the default page.
Attachments (0)
Change History (3)
comment:2 by , 6 years ago
If parameters from URL or HTTP_LANGUAGE_ACCEPT can be given to the wikitr: macro or Trac, then all unwanted effects can be excluded with two optional parameters:
- The value of the preferred language. It could be delivered from JOSMs preferences for all URLs invoked in the Help Viewer.
- An Origin-Flag. If this is set, then wikitr: or Trac must disobey the language parameter and must deliver the language called in the URL.
So pages could have an <a href=".&origin=true>Read the Translation source</a>
link to themselves in their footer.
comment:3 by , 5 years ago
Description: | modified (diff) |
---|
The request #18691 wishes a "link to English version in the internal help browser".
The most obvious solution is not included. Make wikitr: aware of JOSM language in the request, so it can auto-detect correct language. I didn't do this, as it has certain unwanted side effects e.g. when someone wants to read the English pages.