Edit Markup: Difference between revisions

From KDE UserBase Wiki
m (fix "the the")
m (Removed protection from "Edit Markup")
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Available Tools==
<languages />
<translate>


* [[Typographical_Guidelines]] standardizes markup for use in translation, either to official manuals (DocBook) or to other languages. Please refer to this frequently, as markup will be refined to match translators' needs.
== Available Tools == <!--T:1-->


==Workflow Stage 1==
<!--T:2-->
* [[Special:myLanguage/Typographical_Guidelines|Typographical Guidelines]] standardizes markup for use in translation, either to official manuals (DocBook) or to other languages. Please refer to this frequently, as markup will be refined to match translators' needs.


===Correcting old markup===
== Workflow Stage 1 == <!--T:3-->


=== Correcting old markup === <!--T:4-->
<!--T:5-->
* Check that every heading for sections and subsections has an empty line following it.
* Check that every heading for sections and subsections has an empty line following it.


<!--T:6-->
* Many pages have multiple indents set.  This was included in earlier mediawiki documentation, but is not longer acceptable as it causes problems for exporting to other formats, so please re-arrange, using single indents only.  Bullets can continue to be used nested.
* Many pages have multiple indents set.  This was included in earlier mediawiki documentation, but is not longer acceptable as it causes problems for exporting to other formats, so please re-arrange, using single indents only.  Bullets can continue to be used nested.


* ASCII smilies cause problems and must be removed.  They can be replaced by oxygen icons in a small size (11px?).  Many more are available from Wikimedia Commons - details to be added here.
<!--T:7-->
* ASCII smilies cause problems and must be removed.  They can be replaced by oxygen icons in a small size (11px?) &mdash; you can use the <code><nowiki>{{Smiley}}</nowiki></code> template {{Smiley}}.  Many more are available from [https://commons.wikimedia.org/wiki/Smiley Wikimedia Commons] .


<!--T:8-->
* Internal links in the form <nowiki>[[Translation Workflow]]</nowiki> should be edited to the complete form, showing link, then visible text such as <nowiki>[[Special:myLanguage/Translation_Workflow|Translation Workflow]]</nowiki>
* Internal links in the form <nowiki>[[Translation Workflow]]</nowiki> should be edited to the complete form, showing link, then visible text such as <nowiki>[[Special:myLanguage/Translation_Workflow|Translation Workflow]]</nowiki>


<!--T:9-->
* Many styles have been used to display input text, including <nowiki><code>, <pre></nowiki> and tables and boxes. Text intended to be input by the user should use the Input template, <nowiki>{{Input|1=input text (can be multi-line or single)}}</nowiki>. You can still use <nowiki><code></nowiki> for very short input, if you don't want the text to appear on a separate line.  
* Many styles have been used to display input text, including <nowiki><code>, <pre></nowiki> and tables and boxes. Text intended to be input by the user should use the Input template, <nowiki>{{Input|1=input text (can be multi-line or single)}}</nowiki>. You can still use <nowiki><code></nowiki> for very short input, if you don't want the text to appear on a separate line.  


<!--T:10-->
* Output from terminal and error messages have been similarly marked with a variety of methods.  These should be replaced with the Output template, <nowiki>{{Output|1=terminal output}}</nowiki>
* Output from terminal and error messages have been similarly marked with a variety of methods.  These should be replaced with the Output template, <nowiki>{{Output|1=terminal output}}</nowiki>


<!--T:11-->
* Every page should end with a Category statement.  These must be standardized categories.  A current list of categories can be found on any of the translators' pages linked from [[Translation_Help_Needed|this language page]]
* Every page should end with a Category statement.  These must be standardized categories.  A current list of categories can be found on any of the translators' pages linked from [[Translation_Help_Needed|this language page]]


<!--T:12-->
* Make sure that there are no unbalanced brackets in any section. If you find unbalanced brackets then add the missing bracket(s) &mdash; possibly in a comment like this: {{Input|1=<nowiki><!--(--> a)</nowiki>}}
* Make sure that there are no unbalanced brackets in any section. If you find unbalanced brackets then add the missing bracket(s) &mdash; possibly in a comment like this: {{Input|1=<nowiki><!--(--> a)</nowiki>}}


<!--T:13-->
* There should be a blank line between bullets in lists. See the sections on lists beginning with  [[Special:myLanguage/Toolbox#Bulleted Lists|Bulleted Lists]].
* There should be a blank line between bullets in lists. See the sections on lists beginning with  [[Special:myLanguage/Toolbox#Bulleted Lists|Bulleted Lists]].


<!--T:14-->
* Tables should be split in a similar manner, so that there is a blank line between each row. The first and last items will need to have curly braces balanced.
* Tables should be split in a similar manner, so that there is a blank line between each row. The first and last items will need to have curly braces balanced.


==Stage 2 - Guide to new markup==
<!--T:15-->
* The old method of beginning a line with a colon (":") to denote an indent causes some serious display problems, not least the navigation panel disappearing to beneath the rest of the content.  If you find any such lines, please remove the colon.
 
<!--T:44-->
{{Info|1=This last point may no longer apply. Colons are often used in connection with definition lists and do not seem to cause problems. If you do come across a case where colon-indentation causes the display to be messed up, please notify us via the Talk page.}}
 
== Stage 2 - Guide to new markup == <!--T:16-->


===Marking Links for Translation===
=== Marking Links for Translation === <!--T:17-->


* A stand-alone link, such as the application-names in Applications/Internet, should use the form <nowiki>[[Special:myLanguage/Ark|<translate>Ark</translate>]]</nowiki>
<!--T:18-->
* A stand-alone link, such as the application-names in Applications/Internet, should use the form <nowiki>[[Special:myLanguage/Ark|&lt;translate>Ark&lt;/translate>]]</nowiki>


<!--T:19-->
* Where the link is within a sentence the whole of the link should be kept within the translatable message.
* Where the link is within a sentence the whole of the link should be kept within the translatable message.


=== Marking sections for subpage linking ===
=== Marking sections for subpage linking === <!--T:20-->


<!--T:21-->
Links of the form <nowiki>[[OtherPage#Section|...]]</nowiki> do not work well with the translation system. Whenever you come across this kind of links there are a few things, that must be done:
Links of the form <nowiki>[[OtherPage#Section|...]]</nowiki> do not work well with the translation system. Whenever you come across this kind of links there are a few things, that must be done:


<!--T:22-->
* The links itself should be changed in the usual way to <nowiki>[[Special:myLanguage/OtherPage#Section|...]]</nowiki>  
* The links itself should be changed in the usual way to <nowiki>[[Special:myLanguage/OtherPage#Section|...]]</nowiki>  


* In the page 'OtherPage' you should check that there is an anchor right before the section 'Section'. It should have the form {{Input|1=<nowiki></translate><span id="Section"></span><translate></nowiki>}}(where of course the string "Section" should be the actual title of the section). There should be a blank line between the anchor and the section header.
<!--T:23-->
* In the page 'OtherPage' you should check that there is an anchor right before the section 'Section'. It should have the form {{Input|1=<nowiki>&lt;/translate><span id="Section"></span>&lt;translate></nowiki>}}(where of course the string "Section" should be the actual title of the section). There should be a blank line between the anchor and the section header.
 
<!--T:24-->
* Some pages have links to their own sections - often of the form <nowiki>[[#Section|...]]</nowiki>. These links should be changed just like all other subpage links to <nowiki>[[Special:myLanguage/ThisPage#Section|...]]</nowiki> (assuming the name of the page is 'ThisPage'); and do remember to check, that the corresponding anchor exists!


* If the page 'OtherPage' is not marked up for translation yet then you should omit the <nowiki><translate> and </translate></nowiki> tags.
<!--T:25-->
* If the page 'OtherPage' is not marked up for translation yet then you should omit the <nowiki>&lt;translate> and &lt;/translate></nowiki> tags.


* Some pages have links to their own sections - often of the form <nowiki>[[#Section|...]]</nowiki>. These links should be changed just like all other subpage links to <nowiki>[[Special:myLanguage/ThisPage#Section|...]]</nowiki> (assuming the name of the page is 'ThisPage'); and do remember to check, that the corresponding anchor exists!
<!--T:26-->
* If a paragraph is moved or removed, take the corresponding tags with it.


===Special Tags===
=== Special Tags === <!--T:27-->


<!--T:28-->
* Identify all keyboard key-names, and tag, e.g. <nowiki><keycap>Enter</keycap></nowiki>
* Identify all keyboard key-names, and tag, e.g. <nowiki><keycap>Enter</keycap></nowiki>
* Include concurrent keypresses in the <nowiki><keycap></nowiki> tag, e.g. <keycap>Ctrl + Alt + F1</keycap>. Note that the separator is (space)+(space)
* Include concurrent keypresses in the <nowiki><keycap></nowiki> tag, e.g. <keycap>Ctrl + Alt + F1</keycap>. Note that the separator is (space)+(space)
* Treat menu sequences in a similar manner, using the <nowiki><menuchoice></nowiki> tag, e.g.<menuchoice>System Settings -> Account Details -> Social Desktop</menuchoice>.  Note that the separator is (space)->(space)
* Treat menu sequences in a similar manner, using the <nowiki><menuchoice></nowiki> tag, e.g.<menuchoice>System Settings -> Account Details -> Social Desktop</menuchoice>.  Note that the separator is (space)->(space)


{{Warning|1=<span style="color:red">NEVER</span> add translate section tags (the ones that look like <nowiki><!--T:18--></nowiki>).  The software will do any handling of tags that is required, and manually changing them will break the system.}}
<!--T:29-->
{{Warning|1=<span style="color:red">NEVER</span> add translate section tags (the ones that look like <nowiki>&lt;!--T:18--></nowiki>).  The software will do any handling of tags that is required, and manually changing them will break the system.}}


===Bold type===
=== Bold type === <!--T:30-->


<!--T:31-->
* Identify program names and mark them as bold type, e.g. '''Klipper'''
* Identify program names and mark them as bold type, e.g. '''Klipper'''
* Identify labels and names that cannot be changed by the user, and mark them as bold type.
* Identify labels and names that cannot be changed by the user, and mark them as bold type.
Line 62: Line 95:
* Window captions and Icon labels are also marked as bold type.
* Window captions and Icon labels are also marked as bold type.


===Italics===
===Italics=== <!--T:32-->


<!--T:33-->
* Italics can be used to give emphasis as you might in non-technical writing
* Italics can be used to give emphasis as you might in non-technical writing
* Use italics on the first appearance of an unfamiliar word or phrase, and if possible link it to #Glossary or a dictionary entry.
* Use italics on the first appearance of an unfamiliar word or phrase, and if possible link it to #Glossary or a dictionary entry.
* When referencing other (external) works, titles are italicized.
* When referencing other (external) works, titles are italicized.


===Combined Bold and Italics===
=== Combined Bold and Italics === <!--T:34-->


<!--T:35-->
* This should only be used in the context of an example where the user has to substitute text, e.g. "Your new addressbook records are in <tt>/home/</tt>'''''user'''''<tt>/share/contacts</tt>"
* This should only be used in the context of an example where the user has to substitute text, e.g. "Your new addressbook records are in <tt>/home/</tt>'''''user'''''<tt>/share/contacts</tt>"


<!--T:36-->
{{Tip|1=Simplified definitions - ''Programs'' are launched by users, ''components'' are used by programs}}
{{Tip|1=Simplified definitions - ''Programs'' are launched by users, ''components'' are used by programs}}


==Issues that cause Translate problems==
== Issues that cause Translate problems == <!--T:37-->


<!--T:38-->
Several issues have been identified and discussed, and solutions proposed in the following sections:
Several issues have been identified and discussed, and solutions proposed in the following sections:


* [[Typographical_Guidelines#Lists|Splitting lists for readability]]
<!--T:39-->
* [[Typographical_Guidelines#Keeping_things_together|Other "readability" breaks]]
* [[Special:myLanguage/Typographical_Guidelines#Lists|Splitting lists for readability]]
* [[Typographical_Guidelines#Unbalanced_brackets|Brackets split across sections]]
* [[Special:myLanguage/Typographical_Guidelines#Keeping_things_together|Other "readability" breaks]]
* [[Special:myLanguage/Typographical_Guidelines#Unbalanced_brackets|Brackets split across sections]]


<!--T:40-->
These are usually noticed after the first markup, and it may be necessary to re-arrange spacing and/or structure to avoid the problems.
These are usually noticed after the first markup, and it may be necessary to re-arrange spacing and/or structure to avoid the problems.


==Almost finished==
== Almost finished == <!--T:41-->


<!--T:42-->
* In the summary field at the bottom, enter that you are doing a markup edit.
* In the summary field at the bottom, enter that you are doing a markup edit.
* Use <menuchoice>Preview</menuchoice> and read through the whole of your work.  If you are satisfied, save the page.
* Use <menuchoice>Preview</menuchoice> and read through the whole of your work.  If you are satisfied, save the page.
* Use the link in the sidebar to request release - it takes you to a page where you can add the URL of the page you have edited.  Pasting your link there tells us that you believe the page to be ready for translators to work with.  We will scan it, and if satisfied we will enable it for translation.
* Use the link in the sidebar to request release - it takes you to a page where you can add the URL of the page you have edited.  Pasting your link there tells us that you believe the page to be ready for translators to work with.  We will scan it, and if satisfied we will enable it for translation.


<!--T:43-->
[[Category:Contributing]]
[[Category:Contributing]]
</translate>

Latest revision as of 10:38, 20 July 2023

Available Tools

  • Typographical Guidelines standardizes markup for use in translation, either to official manuals (DocBook) or to other languages. Please refer to this frequently, as markup will be refined to match translators' needs.

Workflow Stage 1

Correcting old markup

  • Check that every heading for sections and subsections has an empty line following it.
  • Many pages have multiple indents set. This was included in earlier mediawiki documentation, but is not longer acceptable as it causes problems for exporting to other formats, so please re-arrange, using single indents only. Bullets can continue to be used nested.
  • ASCII smilies cause problems and must be removed. They can be replaced by oxygen icons in a small size (11px?) — you can use the {{Smiley}} template . Many more are available from Wikimedia Commons .
  • Internal links in the form [[Translation Workflow]] should be edited to the complete form, showing link, then visible text such as [[Special:myLanguage/Translation_Workflow|Translation Workflow]]
  • Many styles have been used to display input text, including <code>, <pre> and tables and boxes. Text intended to be input by the user should use the Input template, {{Input|1=input text (can be multi-line or single)}}. You can still use <code> for very short input, if you don't want the text to appear on a separate line.
  • Output from terminal and error messages have been similarly marked with a variety of methods. These should be replaced with the Output template, {{Output|1=terminal output}}
  • Every page should end with a Category statement. These must be standardized categories. A current list of categories can be found on any of the translators' pages linked from this language page
  • Make sure that there are no unbalanced brackets in any section. If you find unbalanced brackets then add the missing bracket(s) — possibly in a comment like this:
    <!--(--> a)
  • There should be a blank line between bullets in lists. See the sections on lists beginning with Bulleted Lists.
  • Tables should be split in a similar manner, so that there is a blank line between each row. The first and last items will need to have curly braces balanced.
  • The old method of beginning a line with a colon (":") to denote an indent causes some serious display problems, not least the navigation panel disappearing to beneath the rest of the content. If you find any such lines, please remove the colon.

Information

This last point may no longer apply. Colons are often used in connection with definition lists and do not seem to cause problems. If you do come across a case where colon-indentation causes the display to be messed up, please notify us via the Talk page.


Stage 2 - Guide to new markup

Marking Links for Translation

  • A stand-alone link, such as the application-names in Applications/Internet, should use the form [[Special:myLanguage/Ark|<translate>Ark</translate>]]
  • Where the link is within a sentence the whole of the link should be kept within the translatable message.

Marking sections for subpage linking

Links of the form [[OtherPage#Section|...]] do not work well with the translation system. Whenever you come across this kind of links there are a few things, that must be done:

  • The links itself should be changed in the usual way to [[Special:myLanguage/OtherPage#Section|...]]
  • In the page 'OtherPage' you should check that there is an anchor right before the section 'Section'. It should have the form
    </translate><span id="Section"></span><translate>
    (where of course the string "Section" should be the actual title of the section). There should be a blank line between the anchor and the section header.
  • Some pages have links to their own sections - often of the form [[#Section|...]]. These links should be changed just like all other subpage links to [[Special:myLanguage/ThisPage#Section|...]] (assuming the name of the page is 'ThisPage'); and do remember to check, that the corresponding anchor exists!
  • If the page 'OtherPage' is not marked up for translation yet then you should omit the <translate> and </translate> tags.
  • If a paragraph is moved or removed, take the corresponding tags with it.

Special Tags

  • Identify all keyboard key-names, and tag, e.g. <keycap>Enter</keycap>
  • Include concurrent keypresses in the <keycap> tag, e.g. Ctrl + Alt + F1. Note that the separator is (space)+(space)
  • Treat menu sequences in a similar manner, using the <menuchoice> tag, e.g.System Settings -> Account Details -> Social Desktop. Note that the separator is (space)->(space)

Warning

NEVER add translate section tags (the ones that look like <!--T:18-->). The software will do any handling of tags that is required, and manually changing them will break the system.


Bold type

  • Identify program names and mark them as bold type, e.g. Klipper
  • Identify labels and names that cannot be changed by the user, and mark them as bold type.
  • Remove any bold type marking that were previously entered, but do not match this guideline. (See below for emphasizing a word or phrase.)
  • Window captions and Icon labels are also marked as bold type.

Italics

  • Italics can be used to give emphasis as you might in non-technical writing
  • Use italics on the first appearance of an unfamiliar word or phrase, and if possible link it to #Glossary or a dictionary entry.
  • When referencing other (external) works, titles are italicized.

Combined Bold and Italics

  • This should only be used in the context of an example where the user has to substitute text, e.g. "Your new addressbook records are in /home/user/share/contacts"

Tip

Simplified definitions - Programs are launched by users, components are used by programs


Issues that cause Translate problems

Several issues have been identified and discussed, and solutions proposed in the following sections:

These are usually noticed after the first markup, and it may be necessary to re-arrange spacing and/or structure to avoid the problems.

Almost finished

  • In the summary field at the bottom, enter that you are doing a markup edit.
  • Use Preview and read through the whole of your work. If you are satisfied, save the page.
  • Use the link in the sidebar to request release - it takes you to a page where you can add the URL of the page you have edited. Pasting your link there tells us that you believe the page to be ready for translators to work with. We will scan it, and if satisfied we will enable it for translation.