Template talk:Translation categories
Using for translated templates edit
{{Edit request}}
For using in "Template:" namespace need fixed second category name calculation. Proposed code:
<includeonly><onlyinclude>[[Category:{{{category|{{#titleparts:{{FULLPAGENAME}}|1}}}}}|{{basepage subpage|en|{{SUBPAGENAME}}}}]] [[Category:{{{nscategory|{{#ifeq:{{NAMESPACE}}|Template|Templates|{{NAMESPACE}}}}}}}-{{basepage subpage|en|{{SUBPAGENAME}}}}]]</onlyinclude></includeonly> {{documentation}}
- Should this replace the whole code of the template?--Ymblanter (talk) 03:33, 1 March 2013 (UTC)
- Yes, for the simplicity. Only second string was changed. --Kaganer (talk) 09:13, 1 March 2013 (UTC)
- See example in the Template:User_groups. After changes, unexists category "Template-en" should be replaced by exists category "Templates-en". --Kaganer (talk) 09:15, 1 March 2013 (UTC)
- Done, pls let me know if smth does not work and needs to be changed again.--Ymblanter (talk) 11:44, 1 March 2013 (UTC)
- Look good ;) Thanks! --Kaganer (talk) 15:45, 1 March 2013 (UTC)
- Done, pls let me know if smth does not work and needs to be changed again.--Ymblanter (talk) 11:44, 1 March 2013 (UTC)
Using for translatable subpages edit
This template did not works at the translatable subpages. See example: Wikidata:Notability/Exclusion criteria.
Please change code:
-{{basepage subpage|en|{{SUBPAGENAME}}}}
to
-{{#ifexist:{{FULLPAGENAME}}/en |{{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|{{#titleparts:{{PAGENAME}}|2}} |{{basepage subpage|en|{{SUBPAGENAME}}}} |{{basepage subpage|en|en|{{SUBPAGENAME}}}} }} |{{basepage subpage|en|{{SUBPAGENAME}}}} }}
Thanks. --Kaganer (talk) 11:30, 5 April 2013 (UTC)
- What page should be changed?--Ymblanter (talk) 12:57, 5 April 2013 (UTC)
- This template, string 2, end of link. Full template's text:
<includeonly>[[Category:{{{category|{{#titleparts:{{FULLPAGENAME}}|1}}}}}|{{basepage subpage|en|{{SUBPAGENAME}}}}]] [[Category:{{{nscategory|{{#ifeq:{{NAMESPACE}}|Template|Templates|{{NAMESPACE}}}}}}}-{{#ifexist:{{FULLPAGENAME}}/en |{{#ifeq:{{#titleparts:{{PAGENAME}}|1}}|{{#titleparts:{{PAGENAME}}|2}} |{{basepage subpage|en|{{SUBPAGENAME}}}} |{{basepage subpage|en|en|{{SUBPAGENAME}}}} }} |{{basepage subpage|en|{{SUBPAGENAME}}}} }}]]</includeonly><noinclude> {{documentation}} </noinclude>
- --Kaganer (talk) 20:23, 5 April 2013 (UTC)
- Done, pls report any problems here.--Ymblanter (talk) 20:28, 5 April 2013 (UTC)
- --Kaganer (talk) 20:23, 5 April 2013 (UTC)
Another refactoring edit
{{Edit request}}
This template is too complicated and is not worked correctly in the subsubpages (second level) - see Wikidata:Roads task force/Germany/Bundesautobahn.
Using {{Basepage subpage}}
for second category name is irrationally.
Proposed template text:
<includeonly>[[Category:{{{category|{{#titleparts:{{FULLPAGENAME}}|1}}}}}|{{basepage subpage|en|{{SUBPAGENAME}}}}]] [[Category:{{{nscategory|{{#ifeq:{{NAMESPACE}}|Template|Templates|{{NAMESPACE}}}}}}}-{{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}|{{#language:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}} |en |{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}} }}]]</includeonly><noinclude> {{documentation}} </noinclude>
Small update edit
{{Edit request}}
Using "lc:" edit
Two arguments #ifeq:
may be not equal in some variants of "base pages".
As example, for Wikidata:Meta-Wiki:
- code
{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}
- returned value
wikidata:meta-wiki
- returned value
- code
{{#language:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}
- returned value
wikidata:meta-Wiki
- returned value
Please change code
{{#language:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}
to code
{{lc:{{#language:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}}}
--Kaganer (talk) 11:55, 24 November 2016 (UTC)
Sort order for subpages with subsubpages edit
In some cases like Category:Wikidata:Tools, including some page, his translations and also its subpages with their translations, sort order needs be improved.
In my opinion, should not be used {{Basepage subpage}}
in this template.
I propose code {{basepage subpage|*|{{SUBPAGENAME}}}}
change to:
{{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}|{{lc:{{#language:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}}} |* |{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}} }}
--Kaganer (talk) 12:30, 24 November 2016 (UTC)
Full code proposed edit
Full proposed template's text:
<includeonly>[[Category:{{{category|{{#titleparts:{{FULLPAGENAME}}|1}}}}}|{{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}|{{lc:{{#language:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}}} |* |{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}} }}]] [[Category:{{{nscategory|{{#ifeq:{{NAMESPACE}}|Template|Templates|{{NAMESPACE}}}}}}}-{{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}|{{lc:{{#language:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}}}} |en |{{lc:{{#titleparts:{{FULLPAGENAME}}|1|-1}}}} }}]]</includeonly><noinclude> {{documentation}} </noinclude>