Modify

Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#16101 closed enhancement (worksforme)

Please use wikitr: links

Reported by: stoecker Owned by: BathoryPeter
Priority: normal Milestone:
Component: Wiki content Version:
Keywords: Cc:

Description

Hello, you started to translate Hungarian pages which is very welcome.

A note to make life easier. For some time now JOSM wiki also supports wikitr: links instead of wiki:. You can use this for all links which could be translated later. As soon as you create a new page, all links to it automatically will point to Hungarian version, otherwise to the English one.

Simply replace each entry with wiki: by wikitr: or add it to any link without wiki:. You may need to make links absolute (i.e. start with /Help/....), as wikitr: is a bit more strict about links and only allows links relative to current page or absolute ones

Docs are here: WikiMacros

See also #15994.

Attachments (0)

Change History (6)

comment:1 Changed 2 years ago by BathoryPeter

Hello, and thanks for the notes!

I'm using wikitr: from the beginning, but source texts are often confusing. There are four link formats used in English text: [[target|label]], [target|label], [wiki:target label] and [wiki:target label]. As of TracLinks, all of them are equivalent in the English text, but not on translation pages. To make it even more confusing, on a subpage (e.g. Help/Actions/Draw) we have to prefix links with /. But only when using wikitr: realm. And source text usually don't use realms.

A lot of these information is missing from Wiki translation page.

  • It notes to use wikitr but nothing about what to do when link is in a very different format.
  • Don't tell where to put language prefix on a subpage (Hu:Help/Actions/Draw or Help/Action/Hu:Draw). [I'm a Wikipedia editor, I know namspaces but others may not.]
  • "Images from the English base page can easily be on translated pages". Sounds simple. But the following sample is confusing again: [[Image(Styles:Mappaint_deprecated.png)]]. What should I put before what? Okay, after some attempt and pressing Preview button it works. If the source text references [[Image(Mappaint_deprecated.png)]] I should add the page name ("Styles" here) after the opening brace. It could be marked somehow, for example with bolding: [[Image(Styles:Mappaint_deprecated.png)]]

For the first problem: I suggest to unify links in English texts to use wikitr: (or wikitr:/) everywhere. If you agree, I can help fixing links in source texts.

ps: Introduction#AddingaNodeoraWay has a dead link to Help/Modes. I can't find such a page.

comment:2 in reply to:  1 ; Changed 2 years ago by stoecker

Replying to BathoryPeter:

Hello, and thanks for the notes!

I'm using wikitr: from the beginning, but source texts are often confusing. There are four link formats used in English text: [[target|label]], [target|label], [wiki:target label] and [wiki:target label]. As of TracLinks, all of them are equivalent in the English text, but not on translation pages. To make it even more confusing, on a subpage (e.g. Help/Actions/Draw) we have to prefix links with /. But only when using wikitr: realm. And source text usually don't use realms.

Convert all of them to wikitr:.

wikitr: essentially behaves like wiki:, but restricts the links "guesses". E.g. on a page "Help/Action/Draw" any link without "/" will have "Help/Action" in front (i.e. like any normal directory on harddisk does). The wiki: supports some "auto-search-what-you-mean" features which I think aren't a good idea and thus did not implement them.

A lot of these information is missing from Wiki translation page.

  • It notes to use wikitr but nothing about what to do when link is in a very different format.

Actually in the translatable sections (i.e. most pages :-) all links should be wikitr:. Until that time we'll have to live with mixed stuff (like everywhere :-)

  • Don't tell where to put language prefix on a subpage (Hu:Help/Actions/Draw or Help/Action/Hu:Draw). [I'm a Wikipedia editor, I know namspaces but others may not.]

Right. Should be fixed.

  • "Images from the English base page can easily be on translated pages". Sounds simple. But the following sample is confusing again: [[Image(Styles:Mappaint_deprecated.png)]]. What should I put before what? Okay, after some attempt and pressing Preview button it works. If the source text references [[Image(Mappaint_deprecated.png)]] I should add the page name ("Styles" here) after the opening brace. It could be marked somehow, for example with bolding: [[Image(Styles:Mappaint_deprecated.png)]]

Also.

For the first problem: I suggest to unify links in English texts to use wikitr: (or wikitr:/) everywhere. If you agree, I can help fixing links in source texts.

Yes sure. That's the goal. It's a pretty new thing, so it is used seldom ATM.

ps: Introduction#AddingaNodeoraWay has a dead link to Help/Modes. I can't find such a page.

? Did only find two links to Draw action.

Please fix also the Translation description with what you feel is missing. It is always better when texts are written by someone who actually needs to read them :-)

Last edited 2 years ago by stoecker (previous) (diff)

comment:3 Changed 2 years ago by stoecker

P.S. It took 5 years to get rid of TOC-macro, so expect some time until links are proper :-)

comment:4 in reply to:  2 Changed 2 years ago by Klumbumbus

Replying to stoecker:

Replying to BathoryPeter:

ps: Introduction#AddingaNodeoraWay has a dead link to Help/Modes. I can't find such a page.

? Did only find two links to Draw action.

I fixed it: https://josm.openstreetmap.de/wiki/Introduction?action=diff&version=124

comment:5 Changed 23 months ago by stoecker

Resolution: worksforme
Status: assignedclosed

comment:6 in reply to:  1 Changed 23 months ago by Hb---

Replying to BathoryPeter:

A lot of these information is missing from Wiki translation page.

Correct. Please feel free to add missing parts and to improve the bad ones.

Some content on that page is based on #15872.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain BathoryPeter.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.