Template talk:Igen/top

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

{{Igen/top}} uses 3 parameters

1= the topic code (see the table)
2= an optional value (used when the topic code does not exist, or has neither a translation in that language nor a default)}
code found but translation missing: displays _?_
not-found codes: more than 3 characters are displayed-as-they-are; up to 3 characters display parameter 2 (even when empty)
lang= the language code for the translation
Example
{{ Igen/topbriThat "breeze" iconlang = es }}   ⇒   Este icono
{{ Igen/topbslang = es }}   ⇒   _?_
{{ Igen/topxxlang = es }}   ⇒  

Table of all "topic" codes

[edit]

9 June 2019

code subcat topic (en)
7 :Digits digit
a :Arrows arrow
acm :Australian census maps census map
ai :Antu icons icon
b :Buttons button
bi :BSicons BSicon
bri :Breeze icons icon
bs :Barnstars barnstar
c :CoA coat of arms
ce :CoA elements CoA element
ch :Charts chart
ci :Crystal icons icon
cp :Church plans church plan
cr :Crowns crown
cti :Creative tail icons icon
d :Diagrams diagram
dr :Drawings drawing
e :Emblems emblem
ed :Electrical diagrams diagram
eh :Ecclesiastical heraldry ecclesial CoA
ei :Echo icons icon
em :Emblems insignia
eq :Structural formulas chemical equation
esd :ElectronSD diagram
esl :Electrical symbols circuit diagram
et :Elegant themes icons icon
ex :Examples < ex >
ey :Electrical symbols symbol
f :Flags flag
fai :Faenza icons < fai >
ff :Special or fictional flags < ff >
ffi :Football flag icons flag icon
fi :Flag icons icon
fm :Flag maps flag map
g :Geometrics geometry
ggg :World maps (gggs) world map
gi :Gnome icons icon
gl :Glyphs glyph
gv :Gigillo signs sign
hd :Hasse diagrams diagram
i :Icons icon
jc :Japanese crests emblem
je :Japanese emblems emblem
jf :Japanese flags flag
l :Logos logo
lb :Labels label
lp :License plates license plate
m :Maps map
mbs :Maps by User:Sémhur map
mlw :CoA by MaxxL coat of arms
mn :Musical notations notation
:Musical notations notation
ni :Nuvola icons icon
npi :Noun project icons icon
o :Orders military insignia
oc :OpenClipart drawing
oi :Oxygen icons icon
p :Pictograms pictogram
pi :Padlock icons icon
pom :Maps by UserPomfuttge map
r :Roundels roundel
rf :Rainbow flags flag
rm :Royal monograms monogram
s :Seals seal
sd :Shell Diagrams diagram
sf :Structural formulas structural formula
sig :Signatures signature
sp :Sport pictograms pictogram
sx :Examples for SVG < sx >
t :Trigonometry trigonometry
tai :Tango arrow icons icon
ti :Tango icons icon
tl :Text logos text-logo
ts :Typesets typeset
u :Unicode Unicode character
v :Signs sign
wm :World maps world map
wmd :World destination maps world map
wp :Patterns pattern
y :Symbols symbol
bitm :Raster images raster image
draw :Drawings drawing
math :Mathematical images mathematical image
pano :Panorama images panoramic image
plot :Plotted images plot
pres :Presentations presentation
Note

There are much too many icon topics, at some time I stopped to define more of them and do it now with long text instead with short codes, e.g. s:=Norro-1 icon; the same is now done to diffuse maps by users (no more codes like mbs, mlw, pom).

When the need rises to specify the (english) display text and a subcategory for a strange topic, it can be done by Image generation with different codes e.g. s:=, see as examples

  • Archaeological site icon (white).svg (with |s:=simple map icon: used as text, and with ucfirst and plural-s for subcategory).
  • Wenufoye piwke corazon heart.svg (with |su:=Mapuche icon: one code, display text ucfirst, subcat ucfirst and plural-s).
  • SMirC-smile.svg (with |sub:=sMirC icons|w=sMirC icon: two codes, w for display text and sub: for subcat).
    With different specifications, c/s/sd/w for cat, sub, subdif and display, full flexibility is available.
  • Girl silhouette hand up.svg (with |sd=): an example for the possibility to define in each individual file description a subcategory differentiation.

Specifying the topic in use

[edit]

This template has been invented to have the possibility to display the topic (flag, map, icon, ...) in the "Created with ..." line.
Because internationalization is needed (flag = bandera, Fahne, drapeau, ...) the only place where it can be carefully inserted is the language-specific national layout template, after pre-preparation in each national version of each "Created with ..." template system.

At the moment (end of 2016) it is inserted for demonstration only in the English, the French, the German and the Italian version of the {{Created with Other tool}} template system, which can handle SVG and non-SVG files with and without code. Not each possible topic can be treated because not all of them have translations in Igen/top; when translations are undefined the standard display occurs.

It would be quite a lot of work to adjust hundreds of other language-specific national version templates of all the "Created with ..." template systems. At the moment not yet all language-specific national version subtemplates of the SVG created with ... templates are actualized for the {{unified SVG created with}} templates, and most templates own but a few languages. Only {{Created with CorelDRAW}} with its almost 30 national version language subtemplates is maintained well and ready - without yet treating the topics.

The Created with:I18nTemplates for currently (2020) 55 languages can use the translations, when it exist; otherwise the English version will be used.

Passing of parameter

[edit]

Shown at the example e.g. Created with Other tool:
By the template the parameter topic= may define the short code.

When Image generation is used the short code is defined with the parameter s=,
it can also be defined, replaced or suppressed with the parameter what= (short alias w=), specifying either a short code or any text string
The s value, or any w value is also passed to other templates, e.g. {{Translate}} or {{TextSVG}}

The template passes the parameters via Autotranslate to the national version if it exists for that language, otherwise the English version is used.
topic is parameter 14. The national version invokes the national layout template and that invokes the common layout template.

Invocation sequence:
Created with Other tool templates, one for each tool
Created with Other tool/it
or Created with .../it
numerous (>1.000) national versions, one for each tool and each laguage
only one version for each language, independant of the tool
Created with/it national layout templates, one for each language
Created with one common layout template

(See also Category talk:Created with ... I18nTemplates)


Text composition in different languages

In English and some more languages the text can be generated gender-neutral. But other languages need more effort:
Languages like e.g. fr, es, pt use two grammatical genders and need different inflections for the verbs depending on the gender of the noun.
German knows three grammatical genders, e.g. m for arrow (dieser Pfeil), f for map (diese Karte), n for CoA (dieses Wappen), but the gender of the noun does not influence the inflection.
Polish has also three genders, they cause different inflections (conjugation and declension) of verbs and adjctives.
Some languages, par example française and Korean, need a special treatment when a word starts or ends with a vowel.

@Niridya: you saw with interest how I tried to get the Korean translation? I had my difficulties, in spite of my nickname "sarang♥사랑" I am neither Korean nor able to use that language; but I gave my best, hoping it's not too bad

Apostrophe

[edit]

The correct sign is

Geplanter Umbau

[edit]

Hallo Johannes, du bist mal vor 2½ Jahren über das gestolpert, was ich topics nannte. Seit längerem habe ich damit ein Problem: die zuständige Vorlage Igen/top ist inzwischen mehr als 500K mal transkludiert, so dass ich sehr zögere, eigentlich erforderliche Editierungen vorzunehmen. Ich suche nach einer Abhilfe, dass nicht bei jedem Edit die Server belastet werden. Ich glaube, Implementierung in Lua, json oder java ist keine Lösung; Perhelion hat was in json gemacht, das wohl so nicht verwendbar ist, und vor allem ohne ihn nur bedingt pflegbar. Vielleicht wäre eine Lösung mit einer Datenbank am besten, besser als die Codierung in einer Vorlagensprache, aber können wir so etwas? Ich habe eine andere Idee: Es wäre schon gut, wenn nicht jede kleine Editierung auf alles wirkt, weil nicht alle topics in allen Sprachen in dieser einen Vorlage eingetragen sind.

Die eine Möglichkeit, zu jeder Sprache eine Untervorlage mit jeweils allen topics zu erzeugen, scheint nicht so gut; jede Arbeit an der englischen Version schlägt wieder voll durch. Da scheint die andere Möglichkeit sinnvoller, in Untervorlagen nach topic (statt nach Sprache) zu verzweigen, in denen die einzelnen Sprachübersetzungen stehen; bei den meisten Änderungen (zusätzliche Übersetzungen) bleibt das ohne Auswirkungen. Nur wenn ein neuer topic-code eingeführt würde, belastet das die Hauptvorlage. Ich würde vielleicht auch die (recht stabile) englische Entschlüsselung in der Hauptvorlage lassen, und nur bei anderen Sprachen die jeweilige topic-Untervorlage ansteuern, in der alle Übersetzungen stehen.

Es könnte also im Prinzip so ähnlich aussehen:

{{#switch:{{lc:{{{1|}}}}}
|c={{#if:{{int:lang}}|en|{{W|coat of arms}}|{{Igen/top:c}}}}
|d={{#if:{{int:lang}}|en|{{W|diagram}}     |{{Igen/top:d}}}}
|e={{#if:{{int:lang}}|en|{{W|emblem}}      |{{Igen/top:e}}}}
....

(statt {{int:lang}} würde der Parameter {{{lang}}} verwendet, der von der aufrufenden Vorlage mitgegeben wird; es gibt auch noch einen zweiten Parameter, der den Fall des Nichtfindens regelt.)

In Igen/top_c etc. sind alle Übersetzungen, der default ist der nicht-verlinkte englische Begriff.

Es ist noch nicht alles fertig überlegt, und vielleicht hat wer bessere Ideen. Aber was hältst du davon? -- sarang사랑 15:26, 4 August 2020 (UTC)[reply]