Template:GuiCommand: Difference between revisions

From FreeCAD Documentation
Line 1: Line 1:
{|class="fcinfobox wikitable ct" width=100% height=100% style="float: right; width: 230px; margin-left: 1em" |
{|class="fcinfobox wikitable ct" width=100% height=100% style="float: right; width: 230px; margin-left: 1em" |
| class="ctTitle"|
| class="ctTitle"|
=== {{#if:{{{Icon|}}}|[[Image:{{{Icon}}}|32px]]| {{#ifexist: Image:{{{Name}}}.png | [[Image:{{{Name}}}.png|32px]] | }} }} {{{Name/de}}} ===
=== {{#if:{{{Icon|}}}|[[Image:{{{Icon}}}|32px]]| {{#ifexist: Image:{{{Name}}}.png | [[Image:{{{Name}}}.png|32px]] | }} }} {{{Name}}} ===
|-
|-
! class="ctOdd"|Menüeintrag
! class="ctOdd"|Menu location
|-
|-
| class="ctEven"|{{{MenuLocation}}}
| class="ctEven"|{{{MenuLocation}}}
|-
|-
! class="ctOdd"|Arbeitsbereich
! class="ctOdd"|Workbenches
|-
|-
| class="ctEven"|{{{Workbenches}}}
| class="ctEven"|{{{Workbenches}}}
|-
|-
! class="ctOdd"|Standardtastenkürzel
! class="ctOdd"|Default shortcut
|-
|-
| class="ctEven"|{{{Shortcut|None}}}
| class="ctEven"|{{{Shortcut|None}}}
|-
|-
! class="ctOdd"|Siehe auch
! class="ctOdd"|See also
|-
|-
| class="ctEven"|{{{SeeAlso|None}}}
| class="ctEven"|{{{SeeAlso|None}}}
Line 21: Line 21:
| class="ctToc"|<br/>__TOC__
| class="ctToc"|<br/>__TOC__
|}
|}
[[Category:User Documentation/de|!]]
[[Category:User Documentation|!]]




[[Category:Command Reference/de]]
[[Category:Command Reference]]


<noinclude> <!-- Hinweis an Editoren: Diese Zeile nicht entfernen. -->
<noinclude> <!-- Note to editors: Do Not Remove This Line. -->


==Anwendung==
==Usage==
This Template is the main anchor on documenting GuiCommands. It should be inserted as the first line in new documents.
Dieses Template ist die Standardvorlage um GuiCommands zu dokumentieren. Es sollte als erste Zeile in neue Dokumente eingefügt werden.


The minimum code required for this template usage is: (sample result to right)
Der minimale Code zur Verwendung dieses Templates ist (Beispiel siehe rechts):
<pre>{{GuiCommand/de|Name=SampleCommand|Name/de=Testkommando|
<pre>{{GuiCommand|Name=SampleCommand|MenuLocation=Sample → Command...|Workbenches=Wb1,Wb2}}</pre>
MenuLocation=Test -> Kommando...|Workbenches=Wb1,Wb2}}</pre>
{{GuiCommand|Name=SampleCommand|MenuLocation=Sample Command...|Workbenches=Wb1,Wb2|Shortcut=DefaultShortcut|SeeAlso=OtherTopic}}
{{GuiCommand/de|Name=SampleCommand|Name/de=Testkommando|MenuLocation=Test -> Kommando...|Workbenches=Wb1,Wb2}}


===Minimaler Parametersatz===
===Minimum Parameters===
The following parameters are used in the format [parameter]=[value], with each parameter in the list separated by a pipe symbol (|):
Die folgenden Parameter werden im Format [Parameter]=[Wert] verwendet, wobei die Parameter getrennt durch das Pipesymbol (|) zu einer Liste zusammengefasst werden.:
;Name : The properly capitalized name of the command to be documented.
;Name : der korrekte, großgeschriebene Name des dokumentierten Kommandos
: The name is also used to retrieve the Icon graphic in .PNG format from the WIKI repository. The template works properly, if the Icon graphic does not exist. In this case no icon is shown.
: Der Name wird ebenfalls verwendet, um die Icon-Grafik im .PNG-Format aus dem Wiki-Repository zu wählen.
;MenuLocation : der Ort des Kommandos in der FreeCAD-Menüstruktur
;MenuLocation : The location of the command in the FreeCAD menu structure.
;Workbenches : ein oder mehrere Arbeitsumgebungen in FreeCAD, die das Kommando oder Icon zur Verfügung stellen
;Workbenches : One or more workbenches in FreeCAD that the command and icon can be found on.


===Optionale Parameter===
===Optional Parameters===
The following parameters are optional. If they are not included in the template code, they will default to a value of "None".
Die folgenden Parameter sind optional. Falls sie im Templatecode nicht enthalten sind, wird der voreingestellte Wert "None" verwendet:
;Shortcut : das voreingestellte Tastenkürzel in FreeCAD
;Shortcut : The default Keyboard shortcut as found in FreeCAD.
;SeeAlso : optionaler Link zu ähnlichem Thema
;SeeAlso : Optional link to other related topics.


The optional parameter
==Übersetzung==
;Icon : an icon with a different name as pagename.png can be used by defining the variable Icon


==Localization==
Der für dieses Template nötige Code unterscheidet sich in übersetzten Versionen vom Original. Mehr Informationen zum Thema sind auf der [[Localisation#Translating_the_wiki|Localization]]-Seite zu finden.


The code required for this template is different if you are using a localized version. For more information see the [[Localisation#Translating_the_wiki|Localization]] page.
* Als erstes muss eine übersetzte Version des Templates erzeugt werden.

* Das übersetzte Template muss <pre>Template:GuiCommand/AA</pre> benannt werden, wobei '''''/AA''''' der 2-buchstabige Sprachcode, wie z.B. '''''/fr''''' = Französisch, ist.
* First, a localized version of this template must exist or be created.
* Folgende Syntax wird verwendet, um das übersetzte GuiCommand-Template in einem GuiCommand-Dokument aufzurufen:
<pre>{{GuiCommand/AA|Name=SampleCommand|Name/AA=SampleCommand/AA|MenuLocation=Beispiel -> Kommando...|Workbenches=Wb1,Wb2}}</pre> Hierbei ist '''''/AA''''' wieder der 2-buchstabige Sprachcode, z.B. '''''/fr''''' = Fanzösisch.
* The localized template must be named: <pre>Template:GuiCommand/AA</pre> where '''''/AA''''' is the 2 letter code for the desired language, for example '''''/fr''''' = French localization.
* The method for calling the localized GuiCommand template in a GuiCommand document is: <pre>{{GuiCommand/AA|Name=SampleCommand|Name/AA=SampleCommand/AA|MenuLocation=Sample → Commande...|Workbenches=Wb1,Wb2}}</pre> where '''''/AA''''' is the 2 letter code for the desired language, for example '''''/fr''''' = French localization.
** In obigem Beispielcode ist der Parameter ''Name'' entscheidend. Die Anweisung ''Name=SampleCommand'' erlaubt die automatische Auswahl des korrekten Icons und wird normalerweise nicht übersetzt. Die anschließende Anweisung ''Name/AA=SampleCommand/AA'' zeigt die korrekte Übersetzung aus der GUI-Kommando-Dokumentation.
** In the sample code above, the ''Name'' parameter format is critical. The ''Name=SampleCommand'' allows the correct icon file to be displayed, which is not normally localized. The ''Name/AA=SampleCommand/AA'' displays the correct localized version of the GUI command documentation.
* Als letztes muss sichergestellt werden, dass die übersetzte Version dieses Templates in der unten stehenden Sprachliste aufgenommen wurde:
* Make sure you add the localized version of this template to the Languages list below.
{{clear}}
{{languages | {{en|Template:GuiCommand}} {{de|Template:GuiCommand/de}} {{es|Template:GuiCommand/es}} {{fr|Template:GuiCommand/fr}} {{it|Template:GuiCommand/it}} {{jp|Template:GuiCommand/jp}}}}
[[Category:Administration/de]] [[Category:Template/de]]
</noinclude> <!-- Hinweis an Editoren: Dies muss die letzte Zeile des Templates sein. Diese Zeile nicht entfernen. -->

Revision as of 11:46, 16 April 2018

{{{Name}}}

Menu location
{{{MenuLocation}}}
Workbenches
{{{Workbenches}}}
Default shortcut
None
See also
None


Usage

This Template is the main anchor on documenting GuiCommands. It should be inserted as the first line in new documents.

The minimum code required for this template usage is: (sample result to right)

{{GuiCommand|Name=SampleCommand|MenuLocation=Sample → Command...|Workbenches=Wb1,Wb2}}

SampleCommand

Menu location
Sample → Command...
Workbenches
Wb1,Wb2
Default shortcut
DefaultShortcut
See also
OtherTopic


Minimum Parameters

The following parameters are used in the format [parameter]=[value], with each parameter in the list separated by a pipe symbol (|):

Name
The properly capitalized name of the command to be documented.
The name is also used to retrieve the Icon graphic in .PNG format from the WIKI repository. The template works properly, if the Icon graphic does not exist. In this case no icon is shown.
MenuLocation
The location of the command in the FreeCAD menu structure.
Workbenches
One or more workbenches in FreeCAD that the command and icon can be found on.

Optional Parameters

The following parameters are optional. If they are not included in the template code, they will default to a value of "None".

Shortcut
The default Keyboard shortcut as found in FreeCAD.
SeeAlso
Optional link to other related topics.

The optional parameter

Icon
an icon with a different name as pagename.png can be used by defining the variable Icon

Localization

The code required for this template is different if you are using a localized version. For more information see the Localization page.

  • First, a localized version of this template must exist or be created.
  • The localized template must be named:
    Template:GuiCommand/AA
    where /AA is the 2 letter code for the desired language, for example /fr = French localization.
  • The method for calling the localized GuiCommand template in a GuiCommand document is:
    {{GuiCommand/AA|Name=SampleCommand|Name/AA=SampleCommand/AA|MenuLocation=Sample → Commande...|Workbenches=Wb1,Wb2}}
    where /AA is the 2 letter code for the desired language, for example /fr = French localization.
    • In the sample code above, the Name parameter format is critical. The Name=SampleCommand allows the correct icon file to be displayed, which is not normally localized. The Name/AA=SampleCommand/AA displays the correct localized version of the GUI command documentation.
  • Make sure you add the localized version of this template to the Languages list below.