Zeile 26: |
Zeile 26: |
| -->{{#arraydefine:$lang_produces | Produziert }}<!-- | | -->{{#arraydefine:$lang_produces | Produziert }}<!-- |
| -->{{#arraydefine:$engl_artisangoods | Artisan Goods }}<!-- | | -->{{#arraydefine:$engl_artisangoods | Artisan Goods }}<!-- |
− |
| |
− | // TODO: finalize how to handle test "does {{{source}}} contain artisan good"?
| |
− | // Primarily need to check whether it's OK that the english test now looks at plural (artisan goods) -- because that's
| |
− | // a term that's already being translated. If necessary, switch some pages to explicitly set is_artisan flag
| |
− | -->{{#arraydefine:$is_artisan|{{#if:{{{is_artisan|}}}
| |
− | | {{#ifeq:{{{is_artisan|}}}|0|{{{is_artisan}}}}}
| |
− | | {{#ifexpr: {{#pos:{{lc:{{{source|}}}}}|{{lc:{{#arrayprint:$lang_artisangoods}}}}|1}} or {{#pos:{{lc:{{{source|}}}}}|{{lc:{{#arrayprint:$engl_artisangoods}}}}|1}} |1}}
| |
− | }}}}<!--
| |
| | | |
| // END of translations | | // END of translations |
− | // Initialize array variables | + | // Initialize variables |
− | -->{{#arraydefine:$image_list|{{{image|}}}, {{{image2|}}}, {{{image3|}}}, {{{image4|}}}|,|unique}}<!--
| |
− | // If no images provided, fill in default names -- but default is different on english wiki than other wikis
| |
− | -->{{#ifexpr:{{#arraysize:$image_list}}<1|{{#arraydefine:$image_list|{{#ifeq:{{CONTENTLANG}}|en|{{PAGENAME}}|{{{eng|}}}}}}}}}<!--
| |
| -->{{#arraydefine:$quality|{{ParseInputQuality|quality={{{quality|}}}|iridium={{{iridium|}}}|hide={{{hide|}}}}}}}<!-- | | -->{{#arraydefine:$quality|{{ParseInputQuality|quality={{{quality|}}}|iridium={{{iridium|}}}|hide={{{hide|}}}}}}}<!-- |
− | -->{{#switch: {{NAMESPACE}} | + | -->{{#arraydefine:$is_artisan|{{#if:{{{is_artisan|}}} |
| + | | {{#ifeq:{{{is_artisan|}}}|0||{{{is_artisan}}}}} |
| + | | {{#ifexpr: {{#if:{{#pos:{{lc:{{{source|}}}}}|{{lc:{{#arrayprint:$lang_artisangoods}}}}}}|1|0}} |
| + | or {{#if:{{#pos:{{lc:{{{source|}}}}}|{{lc:{{#arrayprint:$engl_artisangoods}}}}}}|1|0}} |
| + | |1}} |
| + | }}}}{{#switch: {{NAMESPACE}} |
| |{{ns:User}}|{{ns:User talk}}= | | |{{ns:User}}|{{ns:User talk}}= |
| |#default=<div id="infoboxborder"> | | |#default=<div id="infoboxborder"> |
Zeile 48: |
Zeile 42: |
| {{!}}- | | {{!}}- |
| {{!}}colspan="2" style="padding-bottom:5px; text-align: center;"{{!}}<!-- | | {{!}}colspan="2" style="padding-bottom:5px; text-align: center;"{{!}}<!-- |
− | | + | // Display images, using default name if necessary |
− | // Print all images by looping through all entries in $image_list array | + | -->{{Autoimage |
− | -->{{#arrayprint:$image_list||@image@|<!-- | + | |{{{image|}}}, {{{image2|}}}, {{{image3|}}}, {{{image4|}}} |
− | // Add spacing after first image if requested
| + | |eng={{{eng|}}}|separator={{#ifeq:{{{image2spacing|}}}|true|   |{{{image2spacing|}}}}}}}<nowiki/> |
− | -->{{#ifexpr:{{#iferror:{{#expr:{{#arraysearch:@image@}}>0}}|0}} and {{#if:{{{image2spacing|}}}|1|0}} |   }}<!--
| |
− | // If image appears to already have a .png/.gif/.jpg/etc extension (i.e., if 4th-last character is .), don't want to add .png extension
| |
− | -->{{#ifeq:{{#sub:@image@|-4|1}}|.
| |
− | | {{#ifexist:Media:@image@|[[File:@image@]]}} | |
− | | {{#ifexist:Media:@image@_{{uc:{{CONTENTLANG}}}}.png
| |
− | | [[File:@image@_{{uc:{{CONTENTLANG}}}}.png]]
| |
− | | |
− | }}}}}}<nowiki/> | |
| {{!}}- | | {{!}}- |
| {{!}}colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic;" {{!}} {{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}} | | {{!}}colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic;" {{!}} {{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}} |