Difference between revisions of "Test"

Jump to: navigation, search
(Updating to match new version of source page)
 
(47 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages />  
+
This page is only for testing page translation feature.
 +
<languages/>
 +
<translate>
 +
<!--T:61-->
 +
{{Note|1=After each heading, an empty line should be used.  Translators prefer headings to be in a separate message.  As I insert those lines you will see that extra message numbers are created.}}
  
__NOTOC__
+
== Documentation == <!--T:1-->
于是,你头一次安装好了Linux并选择了KDE工作空间。或许可能你是在其他地方长期漂泊后重返KDE软件。或许可能你正计划使用KDE工作空间和应用程序但是想先知道更多关于他的信息。那这个从你电脑里凝视你的耀眼东西 '''是''' 什么哪?
 
  
==一个国际社区==
+
<!--T:62-->
[[Image:KDE-is-ours.png|left|256px|KDE is ours, courtesy of Wade Olson]] KDE已经不单单是个软件. 它是一个由全世界的编程人员,翻译人员,贡献人员,艺术家,作者,经销商和使用者所组成的'''社区'''。我们的国际化技术团队致力于创造最好的桌面自由软件。同时不但是贡献人员,KDE软件的使用者和fans们同样遍布全球,他们帮助其他使用者,传播新闻消息,或仅仅只是享受体验。
+
Page translation feature allows controlled translation of wiki pages into other languages. In other words the content of each translation should be about equal to the source page. The source page is split into sections or paragraphs, each of which are translated individually. Also changes are tracked in the paragraph level. These paragraphs are translated using [[Special:Translate]], which provides the common features known from message translation: display of translations in other languages, message documentation. This page is also accessible from [[Special:PageTranslation]] or [[Special:LanguageStats]]. A new feature currently unique to the page translation is a difference display of changed messages.
 
''(Image courtesy of [http://wadejolson.wordpress.com/ Wade Olson])''
 
  
==一个崭新,耀眼的工作空间==
+
<!--T:2-->
 +
A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.
  
[[Image:Plasma-kickoff.jpg|right|160px]]
+
=== Something else === <!--T:3-->
  
'''KDE''', 最初是作为一款桌面环境面世。但随着活动发展,KDE 现在是 '''一个开发自由和开源软件的国际化团队'''。 
+
<!--T:63-->
 +
A cat walks. How to use #-links with the translation system: [[Special:mylanguage/Glossary#Get Hot New Stuff|Get Hot New Stuff]]
  
实际上那意味着许多来自KDE社区的程序协同工作给你最棒的电脑体验。那是否意味者如果你没有KDE桌面就没法使用KDE程序了哪?完全不是这样。只要有一个或二个额外的函数库(libraries)的帮助,程序几乎能在任何桌面上使用。而且,其中有些程序不仅能在Linux上运行 - 某些新的微型设备,智能手机和平板网络浏览器(internet tablets),也一样有KDE应用程序!
+
==Images in paragraphs == <!--T:5-->
  
KDE 提供各种各样的程序满足任何使用者的需求,从简单但强大的文本编辑器,到震撼的音频和视频播放器,到 最尖端的集成开发环境。加上KDE程序遵循整个桌面一致的观感,当你使用任何KDE程序时都给于你舒适和熟悉的体验。每六个月,会发布一个包含大量应用程序的新的升级版本 - 那被称作 '''软件集(Software Compilation,SC)'''。但某些其他程序不会同时更新,它们单独发布新版本。
+
<!--T:6-->
 +
I want to investigate how images can be places in the middle of paragraphs without causing the imfamous shortening of the first line after the image:
 +
[[Image:Kde440-desktop.jpg|400px|center]]
 +
Here we just have the image code between two lines of text with no blank lines in between. This should keep the whole paragraph in one translation unit but look exceedingly ugly! The code for this image was <nowiki>[[Image:Kde440-desktop.jpg|400px|center]]</nowiki>.  In fact the rule is that the placement parameter must be first, so <nowiki>[[Image:Kde440-desktop.jpg|center|400px]]</nowiki> gives a different result: [[Image:Kde440-desktop.jpg|400px|center]].  In fact the rule is that the placement parameter must be first, so <nowiki>[[Image:Kde440-desktop.jpg|center|400px]] should be centered.  It seems the stylesheet is breaking it in some way.
  
KDE软件有几个其他的特性使得它成为一流的工作环境,比如:
+
<!--T:7-->
 +
It doesn't look ugly, though. Can anyone explain why? Perhaps it has to do with the options used.
 +
[[Image:Kde440-desktop.jpg|thumb|400px]]
 +
This time I used the 'thumb' option. How does that look? Is the line shortened now? Yes it is, so it would appear, that the problem is caused by the 'thumb' option. The code for this image was <nowiki>[[Image:Kde440-desktop.jpg|thumb|400px]]</nowiki>.
  
:* 一个漂亮,现代的桌面
+
<!--T:64-->
:* 一个灵活的,可配置的系统,让你不需要太多文本配置文件就可定制应用程序
+
No, the problem is caused by the lack of vertical space.
:* 网络透明度允许你轻易的访问其他网站和电脑的文件,仿佛那些文件是在你自己的电脑上一样。
 
:* 一个囊括了成百,甚至上千个程序的软件生态系统
 
:* 支持逾60种语言
 
  
==自由软件==
+
<!--T:8-->
 +
I'll just make one more paragraph to see what happens if no options at all are given (other than size):
 +
[[Image:Kde440-desktop.jpg|400px]]
 +
This doesn't look right, either. Even if the image is wide enough to fill the whole line (and so avoid text aligned with the bottom of the image) there is still the problem with to little vertical spacing between text and image. The code for this image was <nowiki>[[Image:Kde440-desktop.jpg|400px]]</nowiki>.
  
KDE软件 不只是一款软件,它是 '''自由软件'''. 作为使用者, 即使是没有技术层面或是法律层面上深入的考虑,这依然是一个重要的事实。为什么? 因为作为自由软件,你可以在任何你想要的地方,以任何你想要的方式自由的使用KDE,没有激活码,没有安装限制。同时你也可以自由的与其他人共享!所以不但你拥有伟大和强大的软件,你也可以给你的家人和朋友享受它的机会。
+
<!--T:9-->
 +
Can we conclude, that future guidlines for writers should specify, that images appearing in between text sections should never have the 'thumb' option selected? It seems that this would be a good idea. It also seems, that if the image appears in the middle of a paragraph it should have the 'center' option selected.
  
{{Info_(zh_CN)|
+
<!--T:65-->
好奇[http://www.fsf.org/about/what-is-free-software 自由软件]? 在自由软件基金会的[http://www.fsf.org 网站]能了解到更多。}}
+
No, definitely not. There are a number of pages where a screenshot showing an overview is 300px or so wide, but the reader needs to consult the full-size image when studying a new concept.  The spacing problems need to be resolved in other ways.  Pages linked from User:Pipesmoker#Test_and_Debug_Pages may be helpful here.
  
<span class="mw-translate-fuzzy">
+
== Smileys == <!--T:10-->
==组成部分==
 
[[Image:Zhcn_KDE brand map.png|right|300px|
 
展示 KDE 社区各层关系的图表]]
 
</span>
 
KDE 是一个由软件开发人员所组成的庞大社区。因此,[[KDE Platform|KDE 平台]]有诸多组成部分。该平台的基础部分主要有:
 
  
:* [[Plasma/Introduction_to_Plasma_(zh_CN)|Plasma]] 工作空间 - 用户界面元素,根据不同的设备定制的,例如普通 PC、上网本或移动设备
+
<!--T:11-->
:* KDE [[Platform|平台]]组件 - 为应用程序提供常规的平台功能特性
+
The standard smiley image is too large. It pushes lines apart, which doesn't look good. It should be made smaller. I'll try to find the proper size [[Image:Face-smile.png]]. This it how it looks when nothing is done. On my display it is far too big. If I specify a size of 11px, this is how it looks: [[Image:Face-smile.png|11px]]. Much better, now the size of the smiley is about the same as a capital letter (it would look even better if it could be lowered 1 or 2px). It could be larger without pushing lines apart - here is a 15px sized smiley [[Image:Face-smile.png|15px]] (actually I believe this line has been lowered just a bit, but maybe not too much?  We did try using this image, but lack of consistency did cause some problems.
:* KDE [[Applications (zh CN)|应用程序]] - 编写出的发挥平台特性的软件程序
 
  
==更多!==
 
  
并不止于此! KDE社区还有更多提供的!
+
<!--T:12-->
 +
Of course it would be better to use a template so that writers would not need to worry about these details {{Smiley}}. The template [[Template:Smiley]] is just a simple code snippet. Perhaps it can be expanded to allow for different browser settings of font size, if that information could be captured inside a template.  The template is the preferred option, and scaling it would be very nice.
  
:* 其他平台 - 有些KDE程序也能运行在[http://windows.kde.org/ Windows],[http://mac.kde.org/ Mac OS X]和Nokia N810之类的移动设备。
+
<!--T:66-->
:* [[Applications/Office|办公]]和生产力套件 - KDE 不只是娱乐,它也能帮助你生产工作和组织生活。
+
Above all, we ''must'' avoid using text smileys, as translators then meet "unmatched pairs of brackets" problems.
:* 应用程序开发框架 - 梦想写出下一个杀手级的程序?KDE软件和社区支持能帮你做到。
 
  
{|style="text-align:right"
+
== Splitting bulleted lists in two translation units == <!--T:13-->
|'''返回 [[An_introduction_to_KDE|KDE 介绍]]'''
 
|}
 
  
[[Category:入门 (zh CN)]]
+
</translate>
 +
<translate><!--T:14-->
 +
* first
 +
* second
 +
</translate>
 +
<translate><!--T:15-->
 +
* third
 +
* fourth
 +
</translate>
 +
<translate>
 +
<!--T:16-->
 +
Apparently it is possible to split a bulleted list in two translation units. [[Special:myLanguage/Tasks_and_Tools]]
 +
 
 +
<!--T:25-->
 +
Nested lists: Numbered:
 +
 
 +
<!--T:26-->
 +
# First main item
 +
## First sub item
 +
## Second sub item
 +
# Second main item
 +
# Third main item
 +
## Third sub item
 +
 
 +
=== And now - items with two sections === <!--T:57-->
 +
 
 +
<!--T:58-->
 +
* A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.</translate><br /><br /><translate><!--T:59-->
 +
A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.
 +
 
 +
<!--T:60-->
 +
* A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.<br /><br />A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.
 +
 
 +
== A Table == <!--T:17-->
 +
 
 +
</translate>
 +
{| border="1" cellspacing="0"
 +
!colspan="2"  style="background-color:#ffff99;" |<translate> <!--T:18-->
 +
Jumping around in code
 +
|-
 +
 
 +
<!--T:19-->
 +
|      <keycap>Ctrl+Alt+O</keycap>
 +
| Quick open file: enter part of a filename and select among all the files in the current session's projects' directory trees that match the string; the file will then be opened
 +
|-
 +
 
 +
<!--T:20-->
 +
|      <keycap>Ctrl+Alt+C</keycap>
 +
| Quick open class: enter part of a class name and select among all class names that match; the cursor will then jump to the class declaration
 +
|-
 +
 
 +
<!--T:21-->
 +
|      <keycap>Ctrl+Alt+M</keycap>
 +
| Quick open function: enter part of a (member) function name and select among all names that match; note that the list shows both declarations and definitions and the cursor will then jump to the selected item
 +
|-
 +
 
 +
</translate>
 +
!colspan="2"  style="background-color:#ffff99;" |<translate> <!--T:22-->
 +
Other things
 +
|-
 +
 
 +
<!--T:23-->
 +
| <keycap>Ctrl+_</keycap>
 +
|Collapse one level: remove this block from view, for example if you want to focus on the bigger picture within a function
 +
|-
 +
 
 +
<!--T:24-->
 +
| <keycap>Ctrl++</keycap>
 +
|Expand one level: undo the collapsing
 +
<!--{-->|}
 +
 
 +
== Variables == <!--T:4-->
 +
 
 +
<!--T:27-->
 +
[http://translatewiki.net/wiki/Page_translation#Markup The translate extension page] describes the use of variables. They could be be used for version numbers and the like. You write <br /><nowiki>< tvar|</nowiki>'''''variable'''''>'''''value'''''<nowiki></></nowiki> (without the space character after the opening <, off course) inside a translatable section. To translators it will appear as $'''''variable'''''.
 +
 
 +
<!--T:28-->
 +
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.  It is almost guaranteed that this will be forgotten.
 +
 
 +
<!--T:29-->
 +
Example: Writing {{Input|1=<nowiki>The current version of eKsampleApp is < tvar|version>0.0.1</>.</nowiki>}}
 +
 
 +
<!--T:30-->
 +
displays this
 +
 
 +
<!--T:31-->
 +
{{Output|1=The current version of eKsampleApp is <tvar|version>0.0.1</>.}}
 +
 
 +
<!--T:32-->
 +
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.
 +
 
 +
<!--T:33-->
 +
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 === <!--T:34-->
 +
 
 +
<!--T:35-->
 +
''This might go to [[Special:myLanguage/Translate a Page|Translate a Page]], fx immediately after Info-boxes.''
 +
 
 +
<!--T:36-->
 +
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 === <!--T:37-->
 +
 
 +
<!--T:38-->
 +
''This might go somewhere on [[Special:myLanguage/Toolbox|Toolbox]]''
 +
 
 +
<!--T:39-->
 +
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):
 +
 
 +
<!--T:40-->
 +
{{Input|1=<nowiki>The current version of eKsampleApp is < tvar|version>0.0.1</>.</nowiki>}}
 +
 
 +
<!--T:41-->
 +
(without the space character after the <, off course). This will display
 +
 
 +
<!--T:42-->
 +
{{Output|1=The current version of eKsampleApp is <tvar|version>0.0.1</>.}}
 +
 
 +
<!--T:43-->
 +
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 == <!--T:44-->
 +
 
 +
<!--T:45-->
 +
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]
 +
 
 +
<!--T:46-->
 +
{{Info|1=Link to {{UB}}}}
 +
 
 +
<!--T:47-->
 +
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]].
 +
 
 +
<!--T:48-->
 +
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 == <!--T:49-->
 +
 
 +
=== A Headline === <!--T:50-->
 +
 
 +
</translate>
 +
:{|<translate>
 +
<!--T:51-->
 +
{{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.
 +
 
 +
</translate>
 +
|-<translate>
 +
<!--T:52-->
 +
{{AppItem|Plasma|Preferences-desktop-keyboard.png|Gestures}}
 +
Same icon, different link. This is just for testing purposes.
 +
</translate>
 +
|}<translate>
 +
 
 +
=== Another Headline === <!--T:53-->
 +
 
 +
</translate>
 +
:{|<translate>
 +
<!--T:54-->
 +
{{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.
 +
 
 +
</translate>
 +
|-<translate>
 +
<!--T:55-->
 +
{{AppItem|Plasma|Preferences-desktop-keyboard.png|Gestures}}
 +
Same icon, different link. This is just for testing purposes.
 +
</translate>
 +
|}<translate>
 +
 
 +
<!--T:56-->
 +
That's all, folks!
 +
</translate>
 +
 
 +
[[Category:Admin]]

Latest revision as of 18:10, 17 August 2012

This page is only for testing page translation feature.

Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Lëtzebuergesch • ‎català • ‎dansk • ‎suomi • ‎svenska • ‎हिन्दी
Note-box-icon.png
Note
After each heading, an empty line should be used. Translators prefer headings to be in a separate message. As I insert those lines you will see that extra message numbers are created.


Documentation

Page translation feature allows controlled translation of wiki pages into other languages. In other words the content of each translation should be about equal to the source page. The source page is split into sections or paragraphs, each of which are translated individually. Also changes are tracked in the paragraph level. These paragraphs are translated using Special:Translate, which provides the common features known from message translation: display of translations in other languages, message documentation. This page is also accessible from Special:PageTranslation or Special:LanguageStats. A new feature currently unique to the page translation is a difference display of changed messages.

A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.

Something else

A cat walks. How to use #-links with the translation system: Get Hot New Stuff

Images in paragraphs

I want to investigate how images can be places in the middle of paragraphs without causing the imfamous shortening of the first line after the image:

Kde440-desktop.jpg

Here we just have the image code between two lines of text with no blank lines in between. This should keep the whole paragraph in one translation unit but look exceedingly ugly! The code for this image was [[Image:Kde440-desktop.jpg|400px|center]]. In fact the rule is that the placement parameter must be first, so [[Image:Kde440-desktop.jpg|center|400px]] gives a different result:

Kde440-desktop.jpg

. In fact the rule is that the placement parameter must be first, so [[Image:Kde440-desktop.jpg|center|400px]] should be centered. It seems the stylesheet is breaking it in some way. It doesn't look ugly, though. Can anyone explain why? Perhaps it has to do with the options used. [[Image:Kde440-desktop.jpg|thumb|400px]] This time I used the 'thumb' option. How does that look? Is the line shortened now? Yes it is, so it would appear, that the problem is caused by the 'thumb' option. The code for this image was <nowiki>[[Image:Kde440-desktop.jpg|thumb|400px]].

No, the problem is caused by the lack of vertical space.

I'll just make one more paragraph to see what happens if no options at all are given (other than size): Kde440-desktop.jpg This doesn't look right, either. Even if the image is wide enough to fill the whole line (and so avoid text aligned with the bottom of the image) there is still the problem with to little vertical spacing between text and image. The code for this image was [[Image:Kde440-desktop.jpg|400px]].

Can we conclude, that future guidlines for writers should specify, that images appearing in between text sections should never have the 'thumb' option selected? It seems that this would be a good idea. It also seems, that if the image appears in the middle of a paragraph it should have the 'center' option selected.

No, definitely not. There are a number of pages where a screenshot showing an overview is 300px or so wide, but the reader needs to consult the full-size image when studying a new concept. The spacing problems need to be resolved in other ways. Pages linked from User:Pipesmoker#Test_and_Debug_Pages may be helpful here.

Smileys

The standard smiley image is too large. It pushes lines apart, which doesn't look good. It should be made smaller. I'll try to find the proper size Face-smile.png. This it how it looks when nothing is done. On my display it is far too big. If I specify a size of 11px, this is how it looks: Face-smile.png. Much better, now the size of the smiley is about the same as a capital letter (it would look even better if it could be lowered 1 or 2px). It could be larger without pushing lines apart - here is a 15px sized smiley Face-smile.png (actually I believe this line has been lowered just a bit, but maybe not too much? We did try using this image, but lack of consistency did cause some problems.


Of course it would be better to use a template so that writers would not need to worry about these details Face-smile.png. The template Template:Smiley is just a simple code snippet. Perhaps it can be expanded to allow for different browser settings of font size, if that information could be captured inside a template. The template is the preferred option, and scaling it would be very nice.

Above all, we must avoid using text smileys, as translators then meet "unmatched pairs of brackets" problems.

Splitting bulleted lists in two translation units

  • first
  • second
  • third
  • fourth

Apparently it is possible to split a bulleted list in two translation units. Special:myLanguage/Tasks_and_Tools

Nested lists: Numbered:

  1. First main item
    1. First sub item
    2. Second sub item
  2. Second main item
  3. Third main item
    1. Third sub item

And now - items with two sections

  • A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.

    A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.
  • A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.

    A translation page is constructed automatically form translated paragraphs, using the source page as model. Each translation page is assigned a completion percentage, which is calculated from the translated paragraphs, and decreased if those translations are out of date. Outdated translations are also highlighted.

A Table

Jumping around in code
Ctrl+Alt+O Quick open file: enter part of a filename and select among all the files in the current session's projects' directory trees that match the string; the file will then be opened
Ctrl+Alt+C Quick open class: enter part of a class name and select among all class names that match; the cursor will then jump to the class declaration
Ctrl+Alt+M Quick open function: enter part of a (member) function name and select among all names that match; note that the list shows both declarations and definitions and the cursor will then jump to the selected item
Other things
Ctrl+_ Collapse one level: remove this block from view, for example if you want to focus on the bigger picture within a function
Ctrl++ Expand one level: undo the collapsing

Variables

The translate extension page describes the use of variables. They could be be used for version numbers and the like. You write
< tvar|variable>value</> (without the space character after the opening <, off course) inside a translatable section. To translators it will appear as $variable.

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. It is almost guaranteed that this will be forgotten.

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]

Dialog-information.png
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

Preferences-desktop-keyboard.png

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

Preferences-desktop-keyboard.png

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

Another Headline

Preferences-desktop-keyboard.png

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

Preferences-desktop-keyboard.png

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

That's all, folks!


This page was last edited on 17 August 2012, at 18:10. Content is available under Creative Commons License SA 4.0 unless otherwise noted.