JDOC

Difference between revisions of "Translating Links/ca"

From Joomla! Documentation

(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
 
<noinclude><languages /></noinclude>
 
<noinclude><languages /></noinclude>
 +
== Introducció ==
 +
 
Linking translated pages together is an important part of page navigation for our users. It is a quick way to send a user to another page for more information on relevant topics. Translating these links must be done a specific way to keep a user in their language of choice. If a person is browsing our documentation in their language, they would probably prefer to stay in their language if possible. Providing a link to a page in its English form will work, however, the user must click the link to their language to read it in their language.
 
Linking translated pages together is an important part of page navigation for our users. It is a quick way to send a user to another page for more information on relevant topics. Translating these links must be done a specific way to keep a user in their language of choice. If a person is browsing our documentation in their language, they would probably prefer to stay in their language if possible. Providing a link to a page in its English form will work, however, the user must click the link to their language to read it in their language.
  
== Introducció ==
+
== Link Translation ==
  
 
Translating page links must be done a certain way to send the reader to another page in the same language. English writers can help by following this format too. It makes it easier on the translators when they start translating pages if the correct link for localisation is already used.  
 
Translating page links must be done a certain way to send the reader to another page in the same language. English writers can help by following this format too. It makes it easier on the translators when they start translating pages if the correct link for localisation is already used.  
Line 10: Line 12:
 
So what if the page for '''Component/fr''' has not been created yet? The user would see a 'red-link' (page doesn't exist) compared to a blue link (the page exists). Perhaps the page Component will be translated, but it has not been translated yet. This is why '''Special:MyLanguage/''' should always be used as a prefix to the linked page.  
 
So what if the page for '''Component/fr''' has not been created yet? The user would see a 'red-link' (page doesn't exist) compared to a blue link (the page exists). Perhaps the page Component will be translated, but it has not been translated yet. This is why '''Special:MyLanguage/''' should always be used as a prefix to the linked page.  
  
<pre>
+
<syntaxHighlight>
 
[[Component]] should be written as [[S:MyLanguage/Component|Component]]
 
[[Component]] should be written as [[S:MyLanguage/Component|Component]]
 
  or
 
  or
 
[[Component]] should be written as [[Special:MyLanguage/Component|Component]]
 
[[Component]] should be written as [[Special:MyLanguage/Component|Component]]
</pre>
+
</syntaxHighlight>
  
 
== Com funciona "Special:MyLanguage" en enllaços ==
 
== Com funciona "Special:MyLanguage" en enllaços ==
Line 25: Line 27:
 
** No, Component/fr does not exist and user is sent to the default source language version;
 
** No, Component/fr does not exist and user is sent to the default source language version;
  
 +
== Links in Help Pages ==
 +
 +
In Help pages the Special:MyLanguage part of a link is removed. You can test that by opening this page as a normal document or a help document and comparing the sources of the links:
 +
 +
* Normal: https://docs.joomla.org/Special:MyLanguage/JDOC:Translating_Links
 +
* Help: https://help.joomla.org/proxy?keyref=JDOC:Translating_Links&lang=en
 +
 +
If you invoke the Help page version you will see that the Special:MyLanguage/ part has disappeared from the first link abovr. This has implications for links within Help pages.
 +
 +
To link to another internal wiki document from a Help page the page language suffix must be included in the source like this:
 +
 +
<syntaxhighlight>
 +
[[Special:MyLanguage/JDOC:Translating_Links/en|Translating Links]]
 +
</syntaxhighlight>
 +
 +
That gives a translator the option to translate just the text of the link or both the language and the text. The language is best left as <q>en</q> until the translator is ready to translate the linked page. If the link text is changed before a translation has been created there will be no link in the Help page, just the link text, and the translated source page will have red text giving anyone the option to create the page in the normal way. It is better for the translator to go to the source page and select the <q>Translate this page</q> link. For similar reasons, authors should avoid the use of <nowiki>{{#translation:}}</nowiki> to insert the language code of the current translation.
 +
 +
== Link Format Precedence ==
 +
 +
If both Special:MyLanguage and the language suffix (/en) are including in a link then Special:MyLanguage takes precedence. You can confirm that by trying the following links:
 +
 +
* Special only: https://docs.joomla.org/Special:MyLanguage/Chunk4x:Add_Banners_Category_Permissions - Result in English
 +
* Both: https://docs.joomla.org/Special:MyLanguage/Chunk4x:Add_Banners_Category_Permissions/nl - Result in English (unless Dutch is your default)
 +
* Suffix only: https://docs.joomla.org/Chunk4x:Add_Banners_Category_Permissions/nl - Result in Dutch
 +
 +
<div class="mw-translate-fuzzy">
 
== Aplicacions d'ús ==
 
== Aplicacions d'ús ==
 +
</div>
  
 
=== Traductors ===
 
=== Traductors ===
Line 32: Line 61:
  
 
Regular page links
 
Regular page links
<pre>
+
<syntaxHighlight>
 
[[Component]] should be written as [[S:MyLanguage/Component|<{translate this only}>]]
 
[[Component]] should be written as [[S:MyLanguage/Component|<{translate this only}>]]
 
  or
 
  or
 
[[Component]] should be written as [[Special:MyLanguage/Component|<{translate this only}>]]
 
[[Component]] should be written as [[Special:MyLanguage/Component|<{translate this only}>]]
</pre>
+
</syntaxHighlight>
  
 
Namespaced page links
 
Namespaced page links
<pre>
+
<syntaxHighlight>
 
[[JDOC:Translating Links]] should be written as [[S:MyLanguage/JDOC:Translating Links|<{translate this only}>]]
 
[[JDOC:Translating Links]] should be written as [[S:MyLanguage/JDOC:Translating Links|<{translate this only}>]]
 
  or
 
  or
 
[[JDOC:Translating Links]] should be written as [[Special:MyLanguage/JDOC:Translating Links|<{translate this only}>]]
 
[[JDOC:Translating Links]] should be written as [[Special:MyLanguage/JDOC:Translating Links|<{translate this only}>]]
</pre>
+
</syntaxHighlight>
  
 
Category page links:
 
Category page links:
<pre>
+
<syntaxHighlight>
 
[[:Category:Glossary_definitions]] should be written as [[S:MyLanguage/:Category:Glossary_definitions|<{translate this only}>]]
 
[[:Category:Glossary_definitions]] should be written as [[S:MyLanguage/:Category:Glossary_definitions|<{translate this only}>]]
 
  or
 
  or
 
[[:Category:Glossary_definitions]] should be written as [[Special:MyLanguage/:Category:Glossary_definitions|<{translate this only}>]]
 
[[:Category:Glossary_definitions]] should be written as [[Special:MyLanguage/:Category:Glossary_definitions|<{translate this only}>]]
</pre>
+
</syntaxHighlight>
  
 
=== Escriptors i editors de pàgines en anglès ===
 
=== Escriptors i editors de pàgines en anglès ===

Revision as of 08:12, 12 September 2022

Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Kiswahili • ‎Nederlands • ‎català • ‎eesti • ‎español • ‎français • ‎italiano • ‎português do Brasil • ‎български • ‎русский • ‎українська • ‎日本語

Introducció

Linking translated pages together is an important part of page navigation for our users. It is a quick way to send a user to another page for more information on relevant topics. Translating these links must be done a specific way to keep a user in their language of choice. If a person is browsing our documentation in their language, they would probably prefer to stay in their language if possible. Providing a link to a page in its English form will work, however, the user must click the link to their language to read it in their language.

Link Translation

Translating page links must be done a certain way to send the reader to another page in the same language. English writers can help by following this format too. It makes it easier on the translators when they start translating pages if the correct link for localisation is already used.

In a normal links [[Component]] a user is taken to the Component page when they click the link. If there is a translated version of the page, for example, French, the French page would be located at [[Component/fr]].

So what if the page for Component/fr has not been created yet? The user would see a 'red-link' (page doesn't exist) compared to a blue link (the page exists). Perhaps the page Component will be translated, but it has not been translated yet. This is why Special:MyLanguage/ should always be used as a prefix to the linked page.

[[Component]] should be written as [[S:MyLanguage/Component|Component]]
 or
[[Component]] should be written as [[Special:MyLanguage/Component|Component]]

Com funciona "Special:MyLanguage" en enllaços

What does Special:MyLanguage/ do? It does a few things when processing a clicked link on a page before sending the user to the page. Using the page Component as an example:

  • Gets the language the page is being viewed in.
  • Checks if the link for Component exists in French, by adding /fr to it.
    • Yes, Component/fr exists and user is sent to the page version in French;
    • No, Component/fr does not exist and user is sent to the default source language version;

Links in Help Pages

In Help pages the Special:MyLanguage part of a link is removed. You can test that by opening this page as a normal document or a help document and comparing the sources of the links:

If you invoke the Help page version you will see that the Special:MyLanguage/ part has disappeared from the first link abovr. This has implications for links within Help pages.

To link to another internal wiki document from a Help page the page language suffix must be included in the source like this:

[[Special:MyLanguage/JDOC:Translating_Links/en|Translating Links]]

That gives a translator the option to translate just the text of the link or both the language and the text. The language is best left as en until the translator is ready to translate the linked page. If the link text is changed before a translation has been created there will be no link in the Help page, just the link text, and the translated source page will have red text giving anyone the option to create the page in the normal way. It is better for the translator to go to the source page and select the Translate this page link. For similar reasons, authors should avoid the use of {{#translation:}} to insert the language code of the current translation.

Link Format Precedence

If both Special:MyLanguage and the language suffix (/en) are including in a link then Special:MyLanguage takes precedence. You can confirm that by trying the following links:

Aplicacions d'ús

Traductors

La configuració a la documentació s'ha fet fàcil amb una drecera cap a l'Àlies "Special:" als enllaços. Fes servir "S:" en comptes de "Special:" [[S:ElMeuIdioma/...]].

Regular page links

[[Component]] should be written as [[S:MyLanguage/Component|<{translate this only}>]]
 or
[[Component]] should be written as [[Special:MyLanguage/Component|<{translate this only}>]]

Namespaced page links

[[JDOC:Translating Links]] should be written as [[S:MyLanguage/JDOC:Translating Links|<{translate this only}>]]
 or
[[JDOC:Translating Links]] should be written as [[Special:MyLanguage/JDOC:Translating Links|<{translate this only}>]]

Category page links:

[[:Category:Glossary_definitions]] should be written as [[S:MyLanguage/:Category:Glossary_definitions|<{translate this only}>]]
 or
[[:Category:Glossary_definitions]] should be written as [[Special:MyLanguage/:Category:Glossary_definitions|<{translate this only}>]]

Escriptors i editors de pàgines en anglès

All the above in the Translators section applies to English version page writers and copy editors. You can help with translations by creating page links in English version pages using Special:MyLanguage/ or S:MyLanguage/ too! A page doesn't need to be marked for translation or even in the process of being translated. As pages are added to the translation queue, translators will have an easier time translating the links on a page.