Changes between Version 34 and Version 35 of TranslatedPagesMacro


Ignore:
Timestamp:
Feb 21, 2018, 8:28:08 PM (6 years ago)
Author:
Dirk Stöcker
Comment:

Update

Legend:

Unmodified
Added
Removed
Modified
  • TranslatedPagesMacro

    v34 v35  
    3838There is also this [/svn/translatedpagesmacro/0.11/#egg=TranslatedPages-dev link for setuptools to find the SVN download].
    3939
    40 === Upgrading from plugin version 0.3
    41 
    42 The macro has been enhanced since version 0.3. A major change is the layout of the pages. Version 0.3 hardcoded the format {{{page/<lang>}}}. The new version has {{{<lang>:page}}} as default which is more often used for wikis.
    43 
    44 For existing installations that use the old schema, the following settings must be used in `trac.ini`:
    45 {{{#!ini
    46 [translatedpages]
    47 template = {page}/{lang}
    48 regexp = ([a-z]{2})
    49 }}}
    50 
    51 Also the layout of the language specification page changed (more entries required tables style design).
    52 
    5340== Example
    5441
    55 An example of the required language specification page can be found at [TranslatedPagesMacro/TracLanguages].
     42An 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!).
    5643
    5744For 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:
     
    7360Following chapter contains the help text found at [WikiMacros#TranslatedPages-macro] on systems with the macro installed.
    7461
    75 Macro to show the translated pages list. 
     62Macro to show the translated pages list.
    7663
    7764Simply calling that macro in a page adds a menu linking to all available translations of a page.
    7865
    79 A language page (usually [TranslatedPagesMacro/TracLanguages TracLanguages]) (location is wiki/TracLanguages in installed system) must provide the language codes as a table with the following entries:
    80 {{{
    81 ||<language code>||<language name>||<english name>||<description>||
     66A language page (usually [wiki:TracLanguages]) must provide the language codes as a table
     67with following entries:
     68{{{
     69||<language code>||<language name>||<english name>||<description>||<base language link indication>||
    8270}}}
     71The description contains the text displayed above language links in that language
     72(usually a variant of 'Other languages').
     73A table title line starting with {{{||=}}} is not parsed.
    8374
    84 The description contains the text displayed above language links in that language, usually a variant of 'Other languages'. A table title line starting with {{{||=}}} is not parsed.
     75The 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
     76one {t} which is replaced by the label (e.g. **{t} (en)** to append a note in brackets).
    8577
    86 The Macro accepts arguments as well: 
    87  * '''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 
    88  * '''outdated=<text>'''  !mark the page as outdated with given comment
    89  * '''silent'''           don't output empty chapter for show options when nothing is shown 
     78The 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
    9082
    91  * '''showoutdated'''     to show all pages, where revision does not match base revision
    92  * '''showmissing'''      to show all pages, where translation is missing
    93  * '''showproblems'''     to show all pages which have problems
    94  * '''showuntranslated''' to show all untranslated pages
    95  * '''showstatus'''       to show one big status table
     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)
    9689 * '''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 
     93Use 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
     94is 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.
     95Using this macro on the base langue pages does no harm, but may help in translation when doing copy and paste.
     96
    9797
    9898== Additional descriptions and comments