Difference between revisions of "Template:Concept translation"
From Meta-Omics Data of Collection Objects
(Import basic concepts, templates, terms, forms from http://terms.tdwg.org) |
m (Import subtemplates of template: Concept translation) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | # | + | <includeonly><!-- |
+ | -->{{#set: skos:prefLabel={{{language|?language-code?}}}:{{{label|missing label}}}}}<!-- | ||
+ | -->{{#if: {{{definition|}}}<!-- no empty definition -->| {{#set: skos:definition={{{language|?language-code?}}}:{{{definition|}}}}} }}<!-- | ||
+ | -->{{#if: {{{example|}}} | {{#set:skos:example={{{language|?language-code?}}}:{{{example}}}}} }}<!-- | ||
+ | -->{{#if: {{{notes|}}} | {{#set:skos:note={{{language|?language-code?}}}:{{{notes}}}}} }}<!-- | ||
+ | -->{{#if: {{{language|}}} | {{#set:dc:language={{{language|??}}}}} }}<!-- | ||
+ | -->{{#if: {{{alternative labels|}}} | {{#arraymap: {{{alternative labels|}}} |;|§|{{#set: skos:altLabel={{{language|?language-code?}}}:§}}|}} }}<!-- | ||
+ | |||
+ | set a section only once | ||
+ | -->{{#if:{{#varexists: hasTranslations}}||<nowiki></nowiki> | ||
+ | === Translations === | ||
+ | <nowiki></nowiki>}}<!-- | ||
+ | |||
+ | --><div style="font-weight:bold" lang="{{{language|}}}" >{{ucfirst:{{language| {{{language|}}} | {{{language|}}} }} }} (<span lang="en">{{ucfirst:{{language| {{{language|}}} | en}} }}</span>)</div><!-- | ||
+ | |||
+ | --><table style="max-width:800px;"><!-- | ||
+ | --><tr><td lang="{{{language|}}}" style="vertical-align:top;padding-left:2em;"><!-- | ||
+ | |||
+ | <b>Label:</b> Definition | ||
+ | |||
+ | -->'''<span class="hover-explain" title="skos:prefLabel = {{Concept translation/label|{{{language|en}}} }}, followed by skos:definition"><!-- | ||
+ | -->{{{label|''label is missing''}}}<!-- | ||
+ | --></span>{{ | ||
+ | #if: {{{alternative labels|}}}<!-- | ||
+ | then --> |  (<span class="hover-explain" title="skos:altLabel" >{{Concept translation/also|{{{language|en}}}}} {{#arraymap: {{{alternative labels|}}} |;|§|[[skos:altLabel::§]]|, }}</span>)<!-- | ||
+ | end if altlabel: -->}}''': {{{definition|<span style="font-color:red">(“Definition” is missing, please add it.)<span>}}}<!-- | ||
+ | --></td></tr><!-- | ||
+ | |||
+ | example | ||
+ | |||
+ | -->{{#if: {{{example|}}}<!-- | ||
+ | then-->|<tr><td lang="{{{language|}}}" style="vertical-align:top;padding-left:2em;">''<span class="hover-explain" title="skos:example" >{{Concept translation/example|{{{language|en}}} }}</span>'': {{{example}}}</td></tr><!-- | ||
+ | -->}}<!-- if end | ||
+ | |||
+ | notes | ||
+ | |||
+ | -->{{#if: {{{notes|}}}<!-- | ||
+ | then-->|<tr><td lang="{{{language|}}}" style="vertical-align:top;padding-left:2em;">''<span class="hover-explain" title="skos:note" >{{Concept translation/notes|{{{language|en}}} }}</span>'': {{{notes}}}</td></tr><!-- | ||
+ | -->}}<!-- if end | ||
+ | -->{{#if: {{{is released|}}}|<tr><td lang="en">''Released:'' {{{is released}}}</td></tr>}}<!-- | ||
+ | |||
+ | --></table><!-- | ||
+ | |||
+ | -->{{#vardefine: hasTranslations|1}}<!-- | ||
+ | --></includeonly><noinclude> | ||
+ | {{Documentation}} | ||
+ | </noinclude> |
Latest revision as of 13:19, 14 September 2016
[edit] [ ]
Template documentation
Usage
This is the "Concept translation" template and holds the translation of a concept per language (see template: concept). It has the following parameter:
{{concept translation |language = ISO 639 code, eg: fr or de etc. <!-- property: dc:language --> |label = translated label (mandatory) <!-- property: skos:prefLabel --> |alternative labels= (optional) <!-- property: skos:altLabel --> |definition = translated definition (mandatory) <!-- property: skos:definition --> |example = optional a translated example <!-- property: skos:example --> |notes = optional <!-- property: skos:note --> |is released = is it released? (yes/no) <!-- for external reference --> |issued = date of issue <!-- ?add to property: dcterms:issued values en:issue-date, de:issue-date etc. ?? --> |modified = date of modification <!-- ?add to property: dcterms:modified values en:modified-date, de:modified-date etc. ?? --> |uri = external uri <!-- ?add to property: rdfs:isDefinedBy values en:uri, de:uri etc. ?? --> |status = status of this translation <!-- ?add to property: vs:term status values only english ??--> }}
Technical documentation
Used subpages/subtemplates:
Template:Concept translation ├─ Template: Concept translation/doc documentation ├─ Template: Concept translation/definition translated label of definition (add translation in template code) ├─ Template: Concept translation/example translated label of example (add translation in template code) ├─ Template: Concept translation/notes translated label of notes (add translation in template code) ├─ Template: Concept translation/also translated label of also (add translation in template code) └─ Template: Concept translation/label translation of label itself (add translation in template code) Some parameters were added for external references ·─ Template: Concept translation/issued translated label of issued (add translation in template code) ├─ Template: Concept translation/modified translated label of modified (add translation in template code) ├─ Template: Concept translation/uri translation of label of uri (add translation in template code) ├─ Template: Concept translation/status translation of label of status (add translation in template code) ·…
Add supported translation for languages in above listed subtemplates …/definition, …/example, …/notes, …/also, …/issued, …/modified, …/uri , …/status and …/label. Translated languages so far are:
- de (Deutsch, German)
- en (English, English)
- es (Español, Spanish)
- fr (Français, French)
Forms
TODO
Check if it is appropriate to generate hash IDs by #subobject SMW-parser-function like: #skos:prefLabel@en. This shows up then in RDF as rdf:resource="http://…/Special:URIResolver/wikiPageName#skos:prefLabel@en"