Topic on User talk:Shirayuki

Localized link or template?

Macofe (talkcontribs)

I see that you use both 'Special:MyLanguage' and 'Template:Localized_link' for link localization (example). It seems that the template is better because it checks first if the localized link exists and defaults to other if it doesn't. Are there other differences? Why do you use both?

Only this time I could not make de template work. Maybe I made a mistake. If you spot it, let me know.

Shirayuki (talkcontribs)

Currently Release notes is not marked for translation, so I use "Special:MyLanguage".

Macofe (talkcontribs)

Why does it matter? If I understand the template correctly, it first checks for Special:MyLanguage/Page, so it seems safe to use it anyway.

I just made a test: I changed my language to Polish and then I edited (without saving) the page mentioned above to use the ll template in the "release notes" link. With the preview of the page, the template correctly took me to 'Release notes/pl'. And when I restablished my language to Spanish, the template took me to the English version, which is again correct because there is no 'Release notes/es' yet.

Shirayuki (talkcontribs)

I don't like "{{<tvar|1>ll|Release notes</>|Release notes}}" style.

Macofe (talkcontribs)

I said nothing about variables. It seems we are not in the same page here. Let's start over. Look again here. You changed:

  • [[Release notes|older versions]] -> [[Special:MyLanguage/Release notes|older versions]]
  • [[MediaWiki 1.25]] -> {{ll|MediaWiki 1.25}}

My question is why didn't you change

  • [[Release notes|older versions]] -> {{ll|Release notes|older versions}}

as you did with the others knowing that the template has the same result?

Nemo bis (talkcontribs)

Perhaps he uses "ll" when the link target and label are the same, because in that case it's more concise? {{ll|Release notes|older versions}} is quite ugly, while {{ll|MediaWiki 1.25}} can be considered more elegant than [[Special:MyLanguage/MediaWiki 1.25|MediaWiki 1.25]].

Personally I don't use ll but I don't have firm opinions about it and AFAICS there is no standard – either written or de facto – about its usage.

Shirayuki (talkcontribs)

I am talking about variables. About "{{ll|Release notes|older versions}}", we should make both ll and Release notes untranslatable. I think "{{<tvar|1>ll|Release notes</>|older versions}}" and "{{<tvar|1>ll</>|<tvar|2>Release notes</>|older versions}}" are ugly.

Kaganer (talkcontribs)

My best practice ;)

  1. If your link to translatable page is placed within a longer text, and displayed text
    1. is different from target pagename — then is better using 'Special:MyLanguage' (with 'tvar')
      exampletext text [[<tvar|some>Special:MyLanguage/Target page</>|displayed text]] text text
      reason — these same result without unneeded calling of template; more understandable for translators
    2. is equal to target pagename — then is better using 'Special:MyLanguage' also, by these same way
      reason — if displayed text is equal in English, this may not be true for other languages
  2. If your link to translatable page is placed as separate item (part of list or navigation template), and displayed text
    1. is different from target pagename — then is better using {{ll}}, with tagging only displayed text as translatable
      example{{ll|Target page|<translate>displayed text</translate>}}
      reason — these same result with more laconical wiki-code
    2. is equal to target pagename — then is better using {{ll}}, with excluding from translatable part
      example<translate>text text</translate>* {{ll|Target page}} <translate>text text</translate>
      reason — if target pagename is translated, {{ll}} is substitute appropriate translation automatically; no needed duplicate translations (with errors); economy of translators' efforts
Nemo bis (talkcontribs)
Reply to "Localized link or template?"