Template:Cdata/doc

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

This template adds a warning that file is very large because its creator kept the superfluous Adobe PGF or other CDATA garbage

The template automatically sets the following categories:

Usage

{{Cdata}}

Removing can be done

  1. With Adobe Illustator: export the SVG with the option “Minify” and disable “preserve illustrator editing capability” (this line has to be proved by someone with Adobe Illustrator)
  2. If you know how to edit a SVG file with a text editor: see User:Quibik/Cleaning_up_SVG_files_manually#Removing_unnecessary_content
  3. If you know how to use a terminal : there are three common SVG optimizers
  4. For users that want/need a grafical userinterface Inkscape (free software) saving as “Optimized SVG”, see Help:Inkscape#Inkscape_SVG_vs._Plain_SVG
  5. For everyone who does not install anything and don't know how to use a text editor: https://jakearchibald.github.io/svgomg/

Template parameters

ParameterDescriptionDefaultStatus
2
logo
Logoreplaces the logoCdata icon.svgoptional
3
iconsize
Icon sizesets the size of the icon in pixelsemptyoptional
4
more
Moreadds content at the end of the textemptyoptional
5
width
Widthsets the width of the warning boxautooptional
6
style
Styleadds style information for the warning boxemptyoptional
7
bad
bad SVGreplaces “This Adobe SVG” with “This bad Adobe SVG”, if value is “also”emptyoptional
8
user
Userreplaces “its creator” with the given valueemptyoptional
9
sub
Subreplaces “its creator” with “its creator TUBS”, if value is “: TUBS”emptyoptional
10
topic
topicreplaces “file” with a topic from Template talk:Igen/topemptyoptional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This template adds a warning that file is very large because its creator kept the superfluous Adobe PGF or other CDATA garbage

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
topic10 topic

replaces “file” with a topic from [[Template talk:Igen/top]]

Suggested values
7 a acm ai b bi bri bs c ce ch ci cp cr cti d dr e ed eh ei em eq esd esl et ex ey f fai ff ffi fi fm g ggg gi gl gv hd i jc je jf l lb lp m mbs mlw mn ni npi o oc oi p pi pom r rf rm s sd sf sig sp sx t tai ti tl ts u v wm wmd wp y bitm draw math pano plot pres
Lineoptional
Logo2 logo

replaces the logo

Default
Cdata icon.svg
Fileoptional
Icon size3 iconsize

sets the size of the icon in pixels

Numberoptional
More4 more

adds content at the end of the text

Unknownoptional
Width5 width

sets the width of the warning box

Default
auto
Lineoptional
Style6 style

adds style information for the warning box

Lineoptional
bad SVG7 bad

replaces “This Adobe SVG” with “This ''bad'' Adobe SVG”, if value is “also”

Suggested values
also
Lineoptional
User8 user

replaces “its creator” with the given value

Lineoptional
Sub9 sub

replaces “its creator” with “its creator [[:User:TUBS|TUBS]]”, if value is “: TUBS”

Suggested values
: TUBS
Lineoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Examples

{{Cdata|}}

renders as:

 
This Adobe SVG file is very large because its creator kept the superfluous Adobe PGF or other CDATA garbage
.

{{Cdata|logo=Line chart icon Noun 70892 cc.svg |iconsize=10 |more=, and there is more |width=75% |style=border-radius:10px; |bad=also |user={{U|John Doe}} |topic=ed}}

renders as:

 
This bad Adobe SVG diagram is very large because John Doe kept the superfluous Adobe PGF or other CDATA garbage
, and there is more

Localization

العربية  Deutsch  English  македонски  polski  русский  slovenščina  தமிழ்

This template is localized through {{Autotranslate}}.


To add your language to the list of languages supported by this template, please copy the code of Template:Cdata/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.