Template:GuiCommand/pt: Difference between revisions

From FreeCAD Documentation
mNo edit summary
m (upgrade)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{|class="wikitable ct" width=100% height=100% style="float: right; width: 230px; margin-left: 1em" |
{|class="wikitable ct" width=100% height=100% style="float: right; width: 230px; margin-left: 1em" |
| class="ctTitle"|
| class="ctTitle" style="font-weight: bold; font-size: 125%;" |
{{#if:{{{Empty|}}}||
=== [[Image:{{{Name}}}.png|32px]] {{{Name/pt}}} ===
{{#if:{{{Icon|}}}
|[[Image:{{{Icon}}}|32px]]<span> </span>
|{{#ifexist: Image:{{{Name}}}.svg
|[[Image:{{{Name}}}.svg|32px]]<span> </span>
|{{#ifexist: Image:{{{Name}}}.png
|[[Image:{{{Name}}}.png|32px]]<span> </span>
|[[Image:NoIconFound.png|32px|Official icon not found]]<span> </span>}}}}}}}}{{{Name/pt}}}
|-
|-
! class="ctOdd"|Localização do menu
! class="ctOdd"|Localização do menu
Line 32: Line 39:


The minimum code required for this template usage is: (sample result to right)
The minimum code required for this template usage is: (sample result to right)
<pre>{{GuiCommand/pt|Name=SampleCommand|Name/pt=SampleCommand|MenuLocation=Sample -> Command...|Workbenches=Wb1,Wb2}}</pre>
<pre>{{GuiCommand/pt|Name=SampleCommand|Name/pt=SampleCommand|MenuLocation=Sample Command...|Workbenches=Wb1,Wb2}}</pre>
{{GuiCommand/pt|Name=SampleCommand|Name/pt=SampleCommand|MenuLocation=Sample -> Command...|Workbenches=Wb1,Wb2|Shortcut=DefaultShortcut|SeeAlso=OtherTopic}}
{{GuiCommand/pt|Name=SampleCommand|Name/pt=SampleCommand|MenuLocation=Sample Command...|Workbenches=Wb1,Wb2|Shortcut=DefaultShortcut|SeeAlso=OtherTopic}}


===Minimum Parameters===
===Minimum Parameters===
Line 46: Line 53:
;Shortcut : The default Keyboard shortcut as found in FreeCAD.
;Shortcut : The default Keyboard shortcut as found in FreeCAD.
;SeeAlso : Optional link to other related topics.
;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 (other format can be used eg: myIcon.svg)
;Empty : if '''Empty=1''' no icon is displayed


==Localization==
==Localization==


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.
The code required for this template is different if you are using a localized version. For more information see the [[Localisation/pt|Localization]] page.


* First, a localized version of this template must exist or be created.
* First, a localized version of this template must exist or be created.
* 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 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.
* 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 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.
** 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.
* Make sure you add the localized version of this template to the Languages list below.


==GuiCommand Model==
==GuiCommand Model==
For a complete model of a GuiCommand, see [[GuiCommand model]].
For a complete model of a GuiCommand, see [[GuiCommand model/pt|GuiCommand model]].


</noinclude> <!-- Note to editors: This must be the last line of the Template. Do Not Remove This Line. -->
</noinclude> <!-- Note to editors: This must be the last line of the Template. Do Not Remove This Line. -->

Revision as of 19:06, 15 February 2019

Official icon not found {{{Name/pt}}}

Localização do menu
{{{MenuLocation}}}
Workbenches
{{{Workbenches}}}
Atalho padrão
Nenhum
Veja também
Nenhum


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/pt|Name=SampleCommand|Name/pt=SampleCommand|MenuLocation=Sample → Command...|Workbenches=Wb1,Wb2}}

SampleCommand

Localização do menu
Sample → Command...
Workbenches
Wb1,Wb2
Atalho padrão
DefaultShortcut
Veja também
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.
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 (other format can be used eg: myIcon.svg)
Empty
if Empty=1 no icon is displayed

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.

GuiCommand Model

For a complete model of a GuiCommand, see GuiCommand model.