Changes between Version 34 and Version 35 of TranslatedPagesMacro
- Timestamp:
- Feb 21, 2018, 8:28:08 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TranslatedPagesMacro
v34 v35 38 38 There is also this [/svn/translatedpagesmacro/0.11/#egg=TranslatedPages-dev link for setuptools to find the SVN download]. 39 39 40 === Upgrading from plugin version 0.341 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 {{{#!ini46 [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 53 40 == Example 54 41 55 An example of the required language specification page can be found at [TranslatedPagesMacro/TracLanguages].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!). 56 43 57 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: … … 73 60 Following chapter contains the help text found at [WikiMacros#TranslatedPages-macro] on systems with the macro installed. 74 61 75 Macro to show the translated pages list. 62 Macro to show the translated pages list. 76 63 77 64 Simply calling that macro in a page adds a menu linking to all available translations of a page. 78 65 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>|| 66 A language page (usually [wiki: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>|| 82 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. 83 74 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. 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). 85 77 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 comment89 * '''silent''' don't output empty chapter for show options when nothing is shown 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 90 82 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) 96 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 97 98 98 == Additional descriptions and comments