Opened 7 years ago
Last modified 7 years ago
#15994 closed defect
Better language interlink support — at Version 7
Reported by: | stoecker | Owned by: | stoecker |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Trac | Version: | |
Keywords: | Cc: | Klumbumbus, ak099, DiGro, Hb--- |
Description (last modified by )
Hi,
I added a new interlink system for translated wiki links
[[wikitr:OrigLink|Text]]
will be replaced by the translated form when it is translated or the original when not. This eases the workload of testing if interlinks are correct or not - you simply don't have to do it anymore :-).
The form
[[wikitr:{t} (en):OrigLink|Text]]
allows to add a note behind the label in case the text is no native (text freely choosable).
As you are the most active translators could you please test that feature and report problems (or success :-)
If no label text is given the labels probably will differ from the defaults, but I don't think that important. I hope I got all type of relevant links and the target correct, if not please tell.
Change History (7)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Cool idea.
Trying on De:Help/Preferences gives three times /help
in the generated URL. See bottom of page.
Where shall the language code be placed?
Is there really a space char in front of the (hint text)?
comment:3 by , 7 years ago
You used
[[wikitr: (englisch)De:Help/Action/AutoSave|Automatisches Speichern]]
That is
- "wikitr" → correct
- " (englisch)De" → wrong, should be " (englisch)" only, you forgot the ":"
- "Help/Action/AutoSave" → wrong, should either be "/Help/Action/AutoSave" or "Action/AutoSave" (as the Page is already in sublevel "Help/".
- "Automatisches Speichern" → correct
I fixed the page and shortened the text from " (englisch)" to " (en") which is not so ugly :-).
Where shall the language code be placed?
Nowhere
Is there really a space char in front of the (hint text)?
Yes. Otherwise it will be directly behind the label.
comment:5 by , 7 years ago
I'm thinking about a generic setting for the base language extension, so one doesn't have always to specify " (en)", but
- probably not every language is happy with similar text
- getting rid of the default seems no better than adding it
- more complex makes it harder to understand
- probably for right to left languages it anyway needs to be handled different.
Ideas, comments?
P.S. The wikitr: can also be used in English pages. It will have no visible effect there, but probably makes live easier for translators ;-)
P.P.S. [wikitr:link text]
also works, but I don't know how a base language extension with a space sign could be specified in this form.
comment:6 by , 7 years ago
Ok. Now TracLanguages contains a column, which can be used to set a default interlink parameter and an empty value can be used to remove that default again.
comment:7 by , 7 years ago
Description: | modified (diff) |
---|
To support RTL languages the base language text must now contain the pattern {t}. Anyway as it must be set once only now I think that's ok. See also docs at WikiMacros for macro TranslatedPages.
P.S. Comments, improvements welcome...