This is a Quality image. Click here for more information.

Template talk:Image generation/sandbox

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

Test of all codes[edit]

This example shows the sequence how the boxes appear;
the displayed sequence is fixed in the template and is independent of the sequence how it is written.


<<t0=Text>>Tincture

InfoField
argentazurecarnation

Image generation:

InfoField

<<t1=Text>>

 
This coat of arms was created with Inkscape…important.
<<T2=Text>>
 
This coat of arms was uploaded with Commonist.
<<t3=Text>>

Source code

<<code example>>
(only example code)
 
 This coat of arms uses embedded text that can be easily translated using a text editor.
<<t4=Text>>
 
The Commons:WikiProject Heraldry will help you to organize and sort coats of arms images.
 
Coat of arms created for the Project “Heraldry” of the German speaking Wikipedia
 
 Coat of arms created for the Blazon Project of the French Wikipedia. 
<<t5=Text>>
This image has been assessed using the Quality image guidelines and is considered a Quality image.

العربية  جازايرية  беларуская  беларуская (тарашкевіца)  български  বাংলা  català  čeština  Cymraeg  Deutsch  Schweizer Hochdeutsch  Zazaki  Ελληνικά  English  Esperanto  español  eesti  euskara  فارسی  suomi  français  galego  עברית  हिन्दी  hrvatski  magyar  հայերեն  Bahasa Indonesia  italiano  日本語  Jawa  ქართული  한국어  kurdî  Lëtzebuergesch  lietuvių  македонски  മലയാളം  मराठी  Bahasa Melayu  Nederlands  Norfuk / Pitkern  polski  português  português do Brasil  rumantsch  română  русский  sicilianu  slovenčina  slovenščina  shqip  српски / srpski  svenska  தமிழ்  తెలుగు  ไทย  Tagalog  Türkçe  toki pona  українська  vèneto  Tiếng Việt  中文  中文(简体)  中文(繁體)  +/−

<<T6=Text>>
 
This bad Adobe SVG coat of arms is very large because its creator kept the superfluous Adobe PGF or other CDATA garbage
.
 
This SVG coat of arms uses the path text method.
llink=Category:Qs icons SVGThis SVG coat of arms shows a very simple image. Drawing uncomplicated graphics with a text editor seems more adequate than using a vector graphics program, and will often result in a dramatic reduction of file size.
For an example, see the file Sample.svg.
<<t7=Text>>
<< T = final Text.>>

How to test "cat" parameter[edit]

|cat={{#ifeq:{{{ct}}}|-|-|{{#ifeq:{{padleft:|2|{{{ct|}}}}}|[[|{{{ct}}}|[[Category:{{{ct}}}]]}}}}

sub & top[edit]

Because of the many different subcategories - with hyphen, semicolon, space - the template needs either to get the full subcat-string, or numerous entries in the tables are necessary. To keep the tables shorter and have not an entry for each seldom used subcategory, and the problem with the semicolon which makes the new-line troubles, quite a lot of subcat-codes exist.

code sub /top comment
s= :{s} s the standard
s:= :{s:}s s: sub with ucfirst and added plural "s", top with lcfirst
s-= -{s-}s s- sub with ucfirst and added plural "s", top with lcfirst
sub:= :sub sub: unchanged usage
sc= :{sc} none deprecated param - use s:
sm= -{sm} none deprecated param - use s-
S:= :_{S:}s none sub with ucfirst and added plural "s"; w= necessary
S= _{S} none with Igen/top; w= necessary
sub= sub none without Igen/top; w= necessary
Sub= _Sub none without Igen/top; w= necessary

Only the values of s= s:= s-= sub:= are used for sub and for top; Igen/sub and Igen/top try to decode it, if not possible the values are used as-they-are.

When as well a subcat parm and w= are used, always the value passed via parameter w= is taken for the topic.

Module[edit]

There is now a Lua Module:IgenSub (maybe better name GetIgen?) which reads:

which can used as:

  • {{#invoke:IgenSub|sub|m}} :Maps
  • {{#invoke:IgenSub|top|m}} map

Currently there is no significant performance increase, but the data manipulation and access shows more visualized and compatible. -- User: Perhelion 11:35, 2 October 2018 (UTC)[reply]

Die letzte Änderung von mir hat performance-technisch wohl nichts gebracht. Also es liegt an dir Sarang wie du das siehst. -- User: Perhelion 17:56, 3 October 2018 (UTC)[reply]
@Perhelion: Wie ich das sehe: Ich halte diese Änderungen für eine gute Sache. Doch scheint mir dass ich zuvor einiges begradigen und den jetzt bestehenden Wirrwarr auflösen muss, ehe auf /json umgestellt werden kann. Insbesondere, ehe in allen 53 Sprachversionen auf /top umgestellt werden kann.
Wie du leicht sehen kannst, ist mit Sprachen noch nicht viel los, gerade mal bei den Wappen ist relativ viel (aber noch nicht vollständig) übersetzt. Ich habe wenig Hoffnung, dass Sprachkundige sich dafür erbarmen - wobei IMHO die /json-Variante leichter zu pflegen wäre.
Vorerst mal stelle ich "deine" sandbox nach /sandbox/json, so kann damit getestet werden, und mache weiter mit der Elimination des alten Parameters sm=. Ich habe auch schon mal alle default-Inkscape gesammelt, es kommt 1726mal vor; ich werde jedes einzelne untersuchen müssen was es wirklich ist, um fälschliche default-Zuordnungen zu bereinigen. Da habe ich genug zu tun! Es gibt auch noch die mehr als 4K SVG files die irgendwann aufzuräumen sind... -- sarang사랑 08:54, 5 October 2018 (UTC)[reply]
Einige habe ich schon getoolt, jetzt sind es noch 984 957.
Aber ich habe nur die mit explizit {{Igen||+|s=..}} erfasst; um auch noch die mit {{Igen|+|s=..}} einzufangen bedurfte es einer kleinen Erweiterung; sie werden dann in Created with Inkscape-undef gesammelt. -- sarang사랑 08:41, 17 March 2019 (UTC)[reply]