| 12 | |
| 13 | === Examples |
| 14 | |
| 15 | Examples of the required language specification page can be found in the directory [/svn/translatedpagesmacro/0.11/default-pages/TracLanguages default-pages/TracLanguages]. Note that it will not be installed automatically. |
| 16 | |
| 17 | For example, the page WikiStart was translated to Chinese version Zh_CN:WikiStart, Russian version Ru:WikiStart and Spanish version Es:WikiStart. Insert `[[TranslatedPages]]` to WikiStart will generate the following list: |
| 18 | |
| 19 | [[Image(translated_pages_1.0_sample_english.png)]] |
| 20 | |
| 21 | And in Zh_CN:WikiStart will generate: |
| 22 | |
| 23 | [[Image(translated_pages_1.0_sample_chinese.png)]] |
| 24 | |
| 25 | When translated page is outdated, Es:WikiStart will generate: |
| 26 | |
| 27 | [[Image(translated_pages_1.0_sample_espanol_update.png)]] |
| 28 | |
| 29 | An example of an actively used installation can be found at [http://josm.openstreetmap.de/wiki/Translations]. |
| 30 | |
| 31 | === Macro help text |
| 32 | |
| 33 | The following chapter contains the help text found at [WikiMacros#TranslatedPages-macro] on systems with the macro installed. |
| 34 | |
| 35 | Macro to show the translated pages list. |
| 36 | |
| 37 | Simply calling that macro in a page adds a menu linking to all available translations of a page. |
| 38 | |
| 39 | A language page (usually [wiki:TranslatedPagesMacro/TracLanguages TracLanguages]) must provide the language codes as a table with the following entries: |
| 40 | {{{ |
| 41 | ||<language code>||<language name>||<english name>||<description>||<base language link indication>|| |
| 42 | }}} |
| 43 | |
| 44 | The description contains the text displayed above language links in that language (usually a variant of 'Other languages'). |
| 45 | A table title line starting with {{{||=}}} is not parsed. |
| 46 | |
| 47 | The base language link indication is the default value for wikitr: links (see below) and describes how links to base language should be formatted. It must contain one {t} which is replaced by the label, for example **{t} (en)** to append a note in brackets. Other parameters are {b} for the base language code, {c} for the base language code in lowercase letters and {n} for the base language name. |
| 48 | |
| 49 | The Macro accepts arguments as well: |
| 50 | * '''revision=<num>''' to specify the version of the base page when last translated, a negative revision indicates that a page needs updating in the status overview table |
| 51 | * '''outdated=<text>''' !mark the page as outdated with given comment |
| 52 | * '''silent''' don't output empty chapter for show options when nothing is shown |
| 53 | |
| 54 | * '''showoutdated''' to show all pages, where revision does not match base revision |
| 55 | * '''showmissing''' to show all pages, where translation is missing |
| 56 | * '''showproblems''' to show all pages which have problems |
| 57 | * '''showuntranslated''' to show all untranslated pages |
| 58 | * '''showstatus''' to show one big status table |
| 59 | * '''skipmissing''' skip links to missing pages in status table (speed up display a lot) |
| 60 | * '''lang=<code>''' to restrict output of show outdated, status or missing to a specific language |
| 61 | |
| 62 | * '''label_outdated''' label to display when using the showoutdated option |
| 63 | |
| 64 | Use wikitr:[basetext:] in links to reference the translated form of a page when it exists, the original otherwise. In case the optional part **basetext**: is used this text is used to indicate links to the base language (see above for format). When using these links translators do not need to update links when they step by step add translated pages. |
| 65 | Using this macro on the base langue pages does no harm, but may help in translation when doing copy and paste. |
| 66 | |
| 67 | Links can look like {{{[[wikitr:Link|Label]]}}}, {{{[wikitr::{t} ({n}):Link|Label]]}}}, {{{[[wikitr::Link|Label]]}}}, {{{[wikitr:Link]}}}, {{{[wikitr:Link Label]}}} and so on (see TracLinks). |
| 68 | |
| 69 | === Additional descriptions and comments |
| 70 | |
| 71 | * The status table uses following colors (note status table may require a lot of calculation time depending on number of pages and languages). |
| 72 | * Red: There is an error with this page (shown in error list) |
| 73 | * Yellow: Page needs update |
| 74 | * Green: Everything up-to-date |
| 75 | * Grey: Page is missing |
| 76 | |
| 77 | * The {{{outdated}}} parameter is useful when a page is known to be outdated, but there is no time to fix it immediately. The page is marked yellow in the status table and the text argument is displayed on the page itself. |
| 78 | * The macro also works without the {{{revision}}} parameter on the translated pages, but it is a very helpful tool to keep original and translations in sync. |
| 79 | * When using the '''show...''' parameters, no translation message link box is created. You need to add another instance of the macro if you want to have these texts and the page links. |
40 | | == Example |
41 | | |
42 | | An example of the required language specification page can be found in the directory [/svn/translatedpagesmacro/0.11/default-pages/TracLanguages default-pages/TracLanguages] (it will not be installed automatically!). |
43 | | |
44 | | For example, the page WikiStart was translated to Chinese version Zh_CN:WikiStart, Russian version Ru:WikiStart and Spanish version Es:WikiStart. Insert `[[TranslatedPages]]` to WikiStart will generate the following list: |
45 | | |
46 | | [[Image(translated_pages_1.0_sample_english.png)]] |
47 | | |
48 | | And in Zh_CN:WikiStart will generate: |
49 | | |
50 | | [[Image(translated_pages_1.0_sample_chinese.png)]] |
51 | | |
52 | | When translated page is outdated, Es:WikiStart will generate: |
53 | | |
54 | | [[Image(translated_pages_1.0_sample_espanol_update.png)]] |
55 | | |
56 | | An example of an actively used installation can be found at [http://josm.openstreetmap.de/wiki/Translations]. |
57 | | |
58 | | == Macro help text |
59 | | |
60 | | Following chapter contains the help text found at [WikiMacros#TranslatedPages-macro] on systems with the macro installed. |
61 | | |
62 | | Macro to show the translated pages list. |
63 | | |
64 | | Simply calling that macro in a page adds a menu linking to all available translations of a page. |
65 | | |
66 | | A language page (usually [wiki:TranslatedPagesMacro/TracLanguages TracLanguages]) must provide the language codes as a table |
67 | | with following entries: |
68 | | {{{ |
69 | | ||<language code>||<language name>||<english name>||<description>||<base language link indication>|| |
70 | | }}} |
71 | | The description contains the text displayed above language links in that language |
72 | | (usually a variant of 'Other languages'). |
73 | | A table title line starting with {{{||=}}} is not parsed. |
74 | | |
75 | | The base language link indication is the default value for wikitr: links (see below) and describes how links to base language should be formatted. It must contain |
76 | | one {t} which is replaced by the label (e.g. **{t} (en)** to append a note in brackets). Other parameters are {b} for the base language code, {c} for the base language code in lowercase letters and {n} for the base language name. |
77 | | |
78 | | The Macro accepts arguments as well: |
79 | | * '''revision=<num>''' to specify the version of the base page when last translated, a negative revision indicates that a page needs updating in the status overview table |
80 | | * '''outdated=<text>''' !mark the page as outdated with given comment |
81 | | * '''silent''' don't output empty chapter for show options when nothing is shown |
82 | | |
83 | | * '''showoutdated''' to show all pages, where revision does not match base revision |
84 | | * '''showmissing''' to show all pages, where translation is missing |
85 | | * '''showproblems''' to show all pages which have problems |
86 | | * '''showuntranslated''' to show all untranslated pages |
87 | | * '''showstatus''' to show one big status table |
88 | | * '''skipmissing''' skip links to missing pages in status table (speed up display a lot) |
89 | | * '''lang=<code>''' to restrict output of show outdated, status or missing to a specific language |
90 | | |
91 | | * '''label_outdated''' label to display when using the showoutdated option |
92 | | |
93 | | Use wikitr:[basetext:] in links to reference the translated form of a page when it exists, the original otherwise. In case the optional part **basetext**: is used this text |
94 | | is used to indicate links to the base language (see above for format). When using these links translators do not need to update links when they step by step add translated pages. |
95 | | Using this macro on the base langue pages does no harm, but may help in translation when doing copy and paste. |
96 | | |
97 | | Links can look like {{{[[wikitr:Link|Label]]}}}, {{{[wikitr::{t} ({n}):Link|Label]]}}}, {{{[[wikitr::Link|Label]]}}}, {{{[wikitr:Link]}}}, {{{[wikitr:Link Label]}}} and so on (see TracLinks). |
98 | | |
99 | | == Additional descriptions and comments |
100 | | |
101 | | * The status table uses following colors (note status table may require a lot of calculation time depending on number of pages and languages). |
102 | | * Red: There is an error with this page (shown in error list) |
103 | | * Yellow: Page needs update |
104 | | * Green: Everything up-to-date |
105 | | * Grey: Page is missing |
106 | | |
107 | | * The {{{outdated}}} parameter is useful when a page is known to be outdated, but there is no time to fix it immediately. The page is marked yellow in the status table and the text argument is displayed on the page itself. |
108 | | * The macro also works without the {{{revision}}} parameter on the translated pages, but it is a very helpful tool to keep original and translations in sync. |
109 | | * When using the '''show...''' parameters, no translation message link box is created. You need to add another instance of the macro if you want to have these texts and the page links. |
110 | | |