Template talk:WikispeciesCompact

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Juiced lemon, more compact? mmmm.... OK! --Pristigaster 22:46, 28 May 2007 (UTC)[reply]

Wikipedia version

[edit]

I have adapted the source code of this template to create Wikipedia:Template:WikispeciesCompact. -84user (talk) 10:11, 9 September 2009 (UTC)[reply]

Internationalisation

[edit]

{{Edit protected}}

Could someone introduce at least French and German translation ? This is already done for the non compact model. Frédéric (talk) 13:19, 11 December 2010 (UTC)[reply]

{{LangSwitch |cs=Projekt [[Wikispecies|Wikidruhy]] nabízí informace o: |de=[[Wikispecies]] Informationen zu: |en=[[Wikispecies]] has information related to: |fr=[[Wikispecies]] contient des informations sur : |nds=Bi [[Wikispecies]] gifft dat ok Infos to dit Thema: }}

✓ Done --ZooFari 21:18, 19 January 2011 (UTC)[reply]

Carriage return bug on this template

[edit]

When this template is called after an empty line, this template behaves as if there was 2 preceeding empty lines (and displays a large vertical gap).
Reason: this template must create a leading empty line.
For example: In User:Liné1/sandbox there is a big vertical space between the text and the box.
Very strange: In User:Liné1/sandbox2, I replaced {{WikispeciesCompact}} by its content and it solves the problem!!!!
Could you help me find the bug?
Cheers Liné1 (talk) 13:24, 13 May 2011 (UTC)[reply]
(PS: I placed questions here, here, here, here, here, here and there)

I think it has to do with {{WikispeciesCompact}} beginning with {{WikispeciesCompact/layout}} that begins with tab opening. I think I remember about a wiki bug like that. Cheers Liné1 (talk) 06:06, 21 May 2011 (UTC)[reply]
What is a "tab opening" ? All I see on {{WikispeciesCompact/layout}} is a table. The case you describe is likely unrelated to {{WikispeciesCompact}}, instead it's the nature of the MediaWiki template parser. Whenever an empty line is inserted between two lines, it creates a new paragraph. If that second line starts with a table (or a table inside a template), then the paragraph is immediately closed in favour of the table. As a results the following wikitext:
Hello world

{{WikispeciesCompact}}
renders:
<p>Hello world</p>
<p></p><table ....WikispeciesCompact..</table>
Just like
Hello world

Hello Krinkle
renders:
<p>Hello world</p>
<p>Hello Krinkle</p>
There is no short term solution for this, other than not putting an empty line before {{WikispeciesCompact}}, the template will make sure it starts on a new line automatically. –Krinkletalk 15:14, 28 May 2011 (UTC)[reply]
Sorry, I missed your answer. The issue is in {{WikispeciesCompact}} as you don't have the same behavior with {{Wikispecies}}.
I have made some tests:
  1. User:Liné1/sandbox contains line + CR + {{WikispeciesCompact}} call => there is the bug (a new paragraph as if 2 lines separated line from wikispeciesCompact call)
  2. User:Liné1/sandbox2 contains line + CR + {{WikispeciesCompact/layout}} call => no bug
  3. User:Liné1/sandbox3 contains line + CR + {{Liné1SandBoxTemplate}} call => BUG.
  4. User:Liné1/sandbox4 contains line + CR + {{Wikispecies}} call => no bug.
But {{Liné1SandBoxTemplate}} contains only a call to {{WikispeciesCompact/layout}} (like WikispeciesCompact)
So the problem is arround calling a template that calls another template that opens a table.
Best regards Liné1 (talk) 17:46, 8 September 2011 (UTC)[reply]
I'm not sure if {{WikispeciesCompact}} is set up correctly. Usually if internationalization is split in layout template and strings, there are subpages for each language (e.g. {{IMOcat}} )
{{Wikispecies}} takes a simpler approach: it includes everything in one template. --  Docu  at 20:55, 11 September 2011 (UTC)[reply]
I have changed the organisation of the template in the {{WikispeciesCompact/sandbox}}. Layout first and internationzlization second, with a {{Wikispecies/i18n}} (single subpage for internationalization). It seems to work, and too me it is a more convenient setup, though this is not the standard practice.--Zolo (talk) 05:38, 12 September 2011 (UTC)[reply]
Excellent work:
Thanks a lot, I will find an admin to do the change.
Cheers Liné1 (talk) 06:25, 12 September 2011 (UTC)[reply]