Test/ca: Difference between revisions

From KDE UserBase Wiki
(Created page with "[http://translatewiki.net/wiki/Page_translation#Markup Aquesta descripció] de les variables sembla prometedor. Permet crear una variable $version i veure com es tradueix.")
(Updating to match new version of source page)
Line 79: Line 79:
== Variables ==
== Variables ==


[http://translatewiki.net/wiki/Page_translation#Markup Aquesta descripció] de les variables sembla prometedor. Permet crear una variable 10.5.0 i veure com es tradueix.
<span class="mw-translate-fuzzy">
[http://translatewiki.net/wiki/Page_translation#Markup Aquesta descripció] de les variables sembla prometedor. Permet crear una variable $version i veure com es tradueix.
</span>
 
The nice thing about this is, that when the values changes, the changed value propagates to all translations automatically. Translators don't have to do anything, and the translations ar not marked as fuzzy. To make this happen, the page still has to be marked for translation, and affected units ''must'' be ticked to not affect translations.
 
Example: Writing {{Input|1=<nowiki>The current version of eKsampleApp is < tvar|version>0.0.1</>.</nowiki>}}
 
displays this
 
{{Output|1=The current version of eKsampleApp is 0.0.1.}}
 
Unfortunately, currently the $'''''variable''''' is only availlable in the translated pages. If extended, this feature might be really useful, fx when an application changes name.
 
Note: The tvar tag seems to be processed quite early in the parsing, so it is OK to use it in templates and even between nowiki tags.
 
=== Translating variables ===
 
''This might go to [[Special:myLanguage/Translate a Page|Translate a Page]], fx immediately after Info-boxes.''
 
A variable is a of the form $'''''name'''''. It is defined in the original page as <nowiki>< tvar|</nowiki>'''''name'''''>'''''value'''''<nowiki></></nowiki> (without the space character after the opening <, off course). Whenever you write $'''''name''''' in your translation, the value given in the original page will be inserted. If the value in the original page changes at a later time, that change will automatically be applied to your translation as well without the need for you to do anything.
 
=== Using variables ===
 
''This might go somewhere on [[Special:myLanguage/Toolbox|Toolbox]]''
 
If you have something in your page that doesn't need to be translated, you can use a variable; this can be useful for things like version numbers. Lets say you are writing the page for the application eKsampleApp and want to include information on the current version number. You can then write something like this in an ordinary paragraph (ie. inside a translation unit):
 
{{Input|1=<nowiki>The current version of eKsampleApp is < tvar|version>0.0.1</>.</nowiki>}}
 
(without the space character after the <, off course). This will display
 
{{Output|1=The current version of eKsampleApp is 0.0.1.}}
 
Instead of the current version number, translators will see the variable <tt>$version</tt>, which displays the version number. Then, when the version number is changed, the change automatically appears on the translated pages. The change still needs to be marked for translation, but if the affected section is ticked to not affect translations the translators won't need to do anything.
 
== Linking with templates ==
 
Lets define a template <nowiki>{{UB}}</nowiki>, which produces {{UB}}. Now lets try <nowiki>{{UB}}/Quick Start</nowiki>, which gives {{UB}}/Quick_Start. Now lets try <nowiki>[{{UB}}]</nowiki>: [{{UB}}] and <nowiki>[{{UB}}/Quick_Start Quick Start]</nowiki>: [{{UB}}/Quick_Start Quick Start]
 
{{Info|1=Link to {{UB}}}}
 
Testing Special:myLanguage links. <nowiki>[[{{Plasma}}|A nice page]]</nowiki> gives [[{{Plasma}}|A nice page]] and <nowiki>[[{{Plasma}}/Panels|An other page]]</nowiki> gives [[{{Plasma}}/Panels|An other page]].
 
Note on trailing slashes: For external links like {{UB}} it is OK to have a trailing slash in the template, but for internal links it only works, if the template is only going to be used as a path prefix: Links of the form <nowiki>[[Plasma/]]</nowiki> do not work.
 
== Template for Application Lists ==
 
=== A Headline ===
 
:{|{{AppItem|Plasma/Panels|Preferences-desktop-keyboard.png|Keyboard settings}}
This is a short line of description. It should normally not be more than one or two sentences.
 
|-{{AppItem|Plasma|Preferences-desktop-keyboard.png|Gestures}}
Same icon, different link. This is just for testing purposes.
|}
=== Another Headline ===
 
:{|{{AppItem|Plasma/Panels|Preferences-desktop-keyboard.png|Keyboard settings}}
This is a short line of description. It should normally not be more than one or two sentences.
 
|-{{AppItem|Plasma|Preferences-desktop-keyboard.png|Gestures}}
Same icon, different link. This is just for testing purposes.
|}
That's all, folks!

Revision as of 10:17, 9 July 2011

This page is only for testing page translation feature.

Documentació

La funció de traducció de la pàgina us permet controlar la traducció de pàgines wiki en altres idiomes. En altres paraules, el contingut de cada traducció ha de ser aproximadament igual que la pàgina d'origen. La pàgina d'origen es divideix en seccions o paràgrafs, cadascun dels quals es tradueix de forma individual. Tan mateix, els canvis es segueixen en el nivell de paràgraf. Aquests paràgrafs es converteixen utilitzant Special:Translate, ja que proporciona característiques comunes conegudes de la traducció de missatges: presenta les traduccions en altres idiomes, documenta el missatge. Aquesta pàgina també és accessible des de Special:PageTranslation o Special:LanguageStats. Una nova característica actualment única per a la traducció de pàgines és el mostrar les diferències del que ha canviat als missatges.

Una pàgina de traducció és construïda automàticament des dels paràgrafs traduïts, utilitzant la pàgina d'origen com a model. A cada pàgina de traducció se li assigna un percentatge de completa, que es calcula a partir dels paràgrafs traduïts, i la disminució si aquestes traduccions estan desfasades. Les traduccions desfasades també són ressaltades.

Una mica més

Un gat camina. Com usar #-enllaços amb el sistema de traducció: Obtén novetats candents

Imatges en els paràgrafs

Vull investigar com les imatges poden ser enmig dels paràgrafs sense causar l'escurçament infame de la primera línia després de la imatge:

Aquí només teniu el codi de la imatge entre dues línies de text sense línies en blanc enmig. Això ha de mantenir tot el paràgraf en la unitat de traducció però queda excessivament lleig. El codi per a aquesta imatge és: [[Image:Kde440-desktop.jpg|400px|center]].

No es veu lleig, però. Algú pot explicar per què? Potser té a veure amb les opcions utilitzades.

Aquesta vegada he fet servir l'opció «thumb». Com es veu? S'escurça ara la línia? Sí, pel que sembla, el problema és causat per l'opció «thumb». El codi per a aquesta imatge és: [[Image:Kde440-desktop.jpg|thumb|400px]].

Vaig a fer un paràgraf més a veure què passa si no hi ha opcions (que no siguin de mida): Això no es veu bé, tampoc. Fins i tot si la imatge és prou àmplia com per cobrir tota la línia (i així evitar el text alineat amb la part inferior de la imatge) encara hi ha el problema de la poca distància vertical entre el text i la imatge. El codi per a aquesta imatge és: [[Image:Kde440-desktop.jpg|400px]].

Podem concloure, que les futures directrius per als escriptors han d'especificar, que les imatges que apareixen en el text entre les seccions no han de contenir l'opció de «thumb»? Sembla que aquesta seria una bona idea. També sembla, que si la imatge apareix enmig d'un paràgraf ha de tenir seleccionada l'opció «center».

Emoticones

La imatge de l'emoticona estàndard és massa gran. Empeny les línies, i no es veu bé. Cal fer-la més petita. Miraré de trobar la mida adequada . Així és com es veu quan no es fa res. En la meva pantalla és massa gran. Si especifiqueu una mida de 11px (11 píxels), així és com es veu: . Molt millor, ara la mida de l'emoticona gairebé és la mateixa que una lletra majúscula (seria encara millor si es pogués baixar 1 o 2 píxels). Podria ser més gran sense forçar la separació de les línies - aquesta és una emoticona a la mida de 15 píxels (en realitat crec que aquesta línia s'ha escurçat una mica, però potser no massa).


Per descomptat seria millor utilitzar una plantilla perquè els escriptors no s'haurien de preocupar d'aquests detalls . La plantilla Template:Smiley és només un fragment de codi simple. Potser es pot ampliar per a permetre diferents configuracions de navegador segons la mida del tipus de lletra, si aquesta informació es pot capturar dins d'una plantilla.

Divisió de llistes amb vinyetes en dues unitats de traducció

  • Primer.
  • Segon.
  • Tercer.
  • Quart.

Pel que sembla, és possible dividir una llista amb vinyetes en dues unitats de traducció. Tasques i eines.

Llistes niuades: Numerada:

  1. Primer element principal
    1. Primer subelement
    2. Segon subelement
  2. Segon element principal
  3. Tercer element principal
    1. Tercer subelement

Una taula

Saltant en el codi
Ctrl+Alt+O Obre ràpidament un fitxer: Introduïu una part del nom de fitxer i trieu-ne un entre tots els fitxers en l'arbre de directoris de projectes de sessions actual (aquests coincideixen amb la cadena) i el fitxer serà obert.
Ctrl+Alt+C Obre ràpidament una classe: Introduïu una part del nom de la classe i trieu-ne una entre tots els noms de les classes que coincideixen, a continuació, el cursor saltarà a la declaració de la classe.
Ctrl+Alt+M Obre ràpidament una funció: Introduïu una part del nom de la funció (membre) i trieu-ne una entre tots els noms que coincideixen, tingueu en compte que la llista mostra les declaracions i definicions, el cursor saltarà a l'element seleccionat.
Altres coses
Ctrl+_ Plega un nivell: Elimina aquest bloc de la vista, per exemple, si voleu el focus en la imatge més gran dins d'una funció.
Ctrl++ Desplegar un nivell: Desfà el plegat

Variables

Aquesta descripció de les variables sembla prometedor. Permet crear una variable $version i veure com es tradueix.

The nice thing about this is, that when the values changes, the changed value propagates to all translations automatically. Translators don't have to do anything, and the translations ar not marked as fuzzy. To make this happen, the page still has to be marked for translation, and affected units must be ticked to not affect translations.

Example: Writing

The current version of eKsampleApp is < tvar|version>0.0.1</>.

displays this

The current version of eKsampleApp is 0.0.1.

Unfortunately, currently the $variable is only availlable in the translated pages. If extended, this feature might be really useful, fx when an application changes name.

Note: The tvar tag seems to be processed quite early in the parsing, so it is OK to use it in templates and even between nowiki tags.

Translating variables

This might go to Translate a Page, fx immediately after Info-boxes.

A variable is a of the form $name. It is defined in the original page as < tvar|name>value</> (without the space character after the opening <, off course). Whenever you write $name in your translation, the value given in the original page will be inserted. If the value in the original page changes at a later time, that change will automatically be applied to your translation as well without the need for you to do anything.

Using variables

This might go somewhere on Toolbox

If you have something in your page that doesn't need to be translated, you can use a variable; this can be useful for things like version numbers. Lets say you are writing the page for the application eKsampleApp and want to include information on the current version number. You can then write something like this in an ordinary paragraph (ie. inside a translation unit):

The current version of eKsampleApp is < tvar|version>0.0.1</>.

(without the space character after the <, off course). This will display

The current version of eKsampleApp is 0.0.1.

Instead of the current version number, translators will see the variable $version, which displays the version number. Then, when the version number is changed, the change automatically appears on the translated pages. The change still needs to be marked for translation, but if the affected section is ticked to not affect translations the translators won't need to do anything.

Linking with templates

Lets define a template {{UB}}, which produces http://userbase.kde.org . Now lets try {{UB}}/Quick Start, which gives http://userbase.kde.org /Quick_Start. Now lets try [{{UB}}]: [http://userbase.kde.org ] and [{{UB}}/Quick_Start Quick Start]: [http://userbase.kde.org /Quick_Start Quick Start]

Information


Testing Special:myLanguage links. [[{{Plasma}}|A nice page]] gives [[Special:myLanguage/Plasma |A nice page]] and [[{{Plasma}}/Panels|An other page]] gives [[Special:myLanguage/Plasma /Panels|An other page]].

Note on trailing slashes: For external links like http://userbase.kde.org

it is OK to have a trailing slash in the template, but for internal links it only works, if the template is only going to be used as a path prefix: Links of the form [[Plasma/]] do not work.

Template for Application Lists

A Headline

This is a short line of description. It should normally not be more than one or two sentences.

Same icon, different link. This is just for testing purposes.

Another Headline

This is a short line of description. It should normally not be more than one or two sentences.

Same icon, different link. This is just for testing purposes.

That's all, folks!