Jump to content

Translate

AllAdding an entry to the Create New menu
Translate to Cebuano

Translation of the wiki page Adding an entry to the Create New menu from English (en).

This tool does not work without JavaScript. JavaScript is disabled, failed to work, or this browser is unsupported.
Adding an entry to the Create New menu
Translations:Adding an entry to the Create New menu/Page display title/ceb
Adding an entry to the Create New menu
You need translation rights to translate messages.Get permission
Loading...
Latest updatesAll changes
Suggestions
In other languages
{|class="tablecenter vertical-centered" |[[Image:CustomCreateNewMenuEntry.png|300px]] |Tutorial that describes how to add an entry to the <menuchoice>Create New</menuchoice> menu of file browsers such as [[Special:myLanguage/Dolphin|Dolphin]] or [[Special:myLanguage/Konqueror|Konqueror]] |}
Translations:Adding an entry to the Create New menu/1/ceb
{|class="tablecenter vertical-centered" |[[Image:CustomCreateNewMenuEntry.png|300px]] |Tutorial that describes how to add an entry to the <menuchoice>Create New</menuchoice> menu of file browsers such as [[Special:myLanguage/Dolphin|Dolphin]] or [[Special:myLanguage/Konqueror|Konqueror]] |}
You need translation rights to translate messages.Get permission
Loading...
Latest updatesAll changes
Suggestions
In other languages
The entries of the <menuchoice>Create New</menuchoice> menu are called ''templates''. They are defined either system-wide, in {{Path|/usr/share/templates}}, or only for the current user, in {{Path|~/.kde4/share/templates}}. In this tutorial we are going to add a new template to {{Path|~/.kde4/share/templates}}.
== Defining the metadata ==
Create a {{Path|templates}} folder in {{Path|~/.kde4/share}} if such a folder does not exist already, and enter the {{Path|templates}} folder.
In this folder, create a new file with {{Path|.desktop}} as file extension. For example: {{Path|custom-file.desktop}}.
Open this new file and paste the following content inside it:
<source lang="ini"> [Desktop Entry] Name= Comment= Type=Link URL= Icon= </source>
Fill these fields as follows: * '''Name''' is the text that appears in the <menuchoice>Create New</menuchoice> menu. *: [[Image:CustomCreateNewMenuEntry.png]] *: "Custom Entry" is the value of the '''Name''' field.
* '''Comment''' is the label for the new name of files of this type. When you select your custom entry in the <menuchoice>Create New</menuchoice> menu, a dialog shows up asking you for the name of your new file, and this text is the label of the field where you enter this new name. *: [[Image:CustomCreateNewMenuEntryComment.png]] *: "New custom entry:" is the value of the '''Comment''' field.
* '''URL''' is the path to a file containing the initial content that new files of this type have. These files with the initial content are usually located within the hidden {{Path|.source}} folder of the {{Path|templates}} folder, so use a relative path that starts with {{Path|.source/}}, such as {{Path|.source/custom-entry.txt}}.
* '''Icon''' is the code of the icon that appears in the <menuchoice>Create New</menuchoice> menu for your custom entry. The code is the filename of the icon to use. You can browse MIME type icon files at {{Path|/usr/share/icons/&lt;theme&gt;/&lt;size&gt;/mimetypes/}}. For example, to use {{Path|/usr/share/icons/&lt;theme&gt;/&lt;size&gt;/mimetypes/application-vnd.oasis.opendocument.text.png}}, fill '''Icon''' with "application-vnd.oasis.opendocument.text".
This is an example of a filled {{Path|.desktop}} file:
<source lang="ini"> [Desktop Entry] Name=Custom Entry Comment=New custom entry: Type=Link URL=.source/custom-entry.txt Icon=application-vnd.oasis.opendocument.text </source>
=== Translating the Name and Comment ===
The '''Name''' and '''Comment''' fields can be translated to any language. To provide a translation, include a new field in your {{Path|.desktop}} file with the form "Field[language code]=Value" for each language that you want to support. For example:
<source lang="ini"> [Desktop Entry] Name=Custom Entry Name[ca]=Entrada personalitzada Name[gl]=Entrada personalizada </source>
== Defining the content ==
Create a {{Path|.source}} folder in {{Path|~/.kde4/share/templates}} if such a folder does not exist already, and enter the hidden {{Path|.source}} folder.
Create a new file with the same filename that you defined in the '''URL''' field of the metadata of your new entry, and fill the file with the default content that you want for new files created with your new entry.
[[Category:Tutorials]]
Loading messages...
0% translated, 0% reviewed
All
Recent