Ignore:
Timestamp:
07/21/09 16:08:35 (3 years ago)
Author:
AntonioTerceiro
Message:

Item5692: new release of TopicTranslationsPlugin

  • New %CURRENTLANGUAGESUFFIX% macro.
  • Porting to Foswiki
  • Removed references to TWiki were applicable.
  • updated copyright notice
  • Adding a proper build system
  • Using regular regular expression delimiter in the SCRIPT_ENV test
Location:
trunk/TopicTranslationsPlugin/data/System
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/TopicTranslationsPlugin/data/System/TopicTranslationsPlugin.txt

    r2847 r4517  
    1 %META:TOPICINFO{author="AntonioTerceiro" date="1128026733" format="1.0" version="1.1"}% 
     1%META:TOPICINFO{author="ProjectContributor" date="1128026733" format="1.0" version="1.1"}% 
    22---+!! !TopicTranslationsPlugin 
    33 
     
    1616Each web that is going to use !TopicTranslationsPlugin must define a variable named 
    1717=%<nop/>TOPICTRANSLATIONS%=, which must contains a comma-delimited list of language 
    18 code. =%<nop/>TOPICTRANSLATIONS%= can be defined TWiki-wide, which means that those 
    19 languages will be used for the entire TWiki installation. It can also be defined 
     18code. =%<nop/>TOPICTRANSLATIONS%= can be defined system-wide, which means that those 
     19languages will be used for the entire site. It can also be defined 
    2020per user. If none of th above is set, the plugin setting for !TopicTranslationsPlugin 
    2121with the same name (=%<nop/>TOPICTRANSLATIONS%=) will be used as a default. 
     
    7070The language detected for the current topic (based on the current topic's name suffix). 
    7171 
     72---+++ =%<nop/>CURRENTLANGUAGESUFFIX%= 
     73 
     74The language suffix of the current topic (empty if the current topic is in the 
     75default language, since the default language has not suffix). This is useful 
     76in menus to create links to fixed topics in the current language. Example: 
     77 
     78<verbatim> 
     79  <a href="%SCRIPTURL{view}%/%WEB%/SomeTopic%CURRENTLANGUAGESUFFIX%"></a> 
     80</verbatim> 
     81 
    7282---+++=%<nop/>DEFAULTLANGUAGE%=  
    7383 
     
    109119 
    110120It's useful when used in conjuntcion with a view VIEW_TEMPLATE setting or some 
    111 similar way of making TWiki-editable custom layouts (like the obsolete 
    112 TWiki:Main/FreeSkin), or even site-specific custom skins. 
     121similar way of making user-editable custom layouts (like the obsolete 
     122[[TWiki:Main/FreeSkin][FreeSkin]]), or even site-specific custom skins. 
    113123 
    114124%RED% __Warnings:__ %ENDCOLOR% 
     
    116126   * This tag is a workaround for sites that want to display user-written 
    117127     different translations of some text based on the current topic's language, 
    118      while TWiki does not provide a standard way to do that in its core (what 
    119      is mainly [[TWiki:Main/AntonioTerceiro][my]] fault). 
     128     while Foswiki does not provide a standard way to do that in its core. 
    120129   * This tag is also somewhat conflicting with core's %<nop/>MAKETEXT{}%. The 
    121      difference is that MAKETEXT uses TWiki-detected language and 
    122      TRANSLATEMESSAGE uses !TopicTranslationsPlugin-detected language, which 
    123      may be different in some casse. 
     130     difference is that MAKETEXT uses system-detected language (e.g. detected 
     131     from the browser, or set explicitly by the user) and TRANSLATEMESSAGE uses 
     132     !TopicTranslationsPlugin-detected language (detected from the topic name), 
     133     which may be different in some casse. 
    124134 
    125135---++ Automatic Redirection 
     
    144154from =no=, =off= and =0=). 
    145155 
    146 __Note:__ in TWiki:Codev/CairoRelease, to make this work you'll have to apply the 
    147 following patch to =TWiki/Func.pm= module (got from TWiki's Subversion repository):  
     156<blockquote> 
     157__Note:__ in older TWiki releases, such as TWiki:Codev/CairoRelease, to make 
     158this work you'll have to apply the following patch to =TWiki/Func.pm= module 
     159(got from TWiki's Subversion repository):  
    148160 
    149161<verbatim> 
    150 --- /var/lib/twiki/lib/TWiki/Func.pm    2005-07-02 13:33:46.893777128 -0300 
     162--- /var/lib/twiki/lib/Foswiki/Func.pm    2005-07-02 13:33:46.893777128 -0300 
    151163+++ Func.pm     2005-07-02 13:37:22.187047576 -0300 
    152164@@ -407,8 +407,9 @@ 
     
    163175 # ========================= 
    164176</verbatim> 
     177</blockquote> 
    165178 
    166179---++ Examples 
     
    193206---++ Plugin Installation Instructions 
    194207 
    195 __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.  
     208__Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where Foswiki is running.  
    196209 
    197210   * Download the ZIP file from the Plugin web (see below) 
     
    201214     | ==data/System/%TOPIC%.txt,v== | Plugin topic repository | 
    202215     | ==lib/Foswiki/Plugins/%TOPIC%.pm== | Plugin Perl module | 
    203    * (Dakar) Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section. 
     216   * Visit =configure= in your Foswiki installation, and enable the plugin in the {Plugins} section. 
    204217   * Test if the installation was successful: 
    205218      * see the examples [[#Examples][above]] 
     
    207220---++ Plugin Info 
    208221 
    209 |  Plugin Author: | TWiki:Main.AntonioTerceiro | 
    210 |  Copyright: | &copy; 2006, TWiki:Main.AntonioTerceiro | 
     222|  Plugin Author: | Foswiki:Main.AntonioTerceiro | 
     223|  Copyright: | Copyright &copy; 2005-2009, Foswiki:Main.AntonioTerceiro | 
    211224|  License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | 
    212225|  Plugin Version: | 03 Jul 2005 (V1.003) | 
     
    220233|  02 Jul 2005 | Version =1.002=: major rewrite; documented all (or almost all :)) the code; added selection of available/missing translations; added =missingformat=; added support for custom topics (and webs) in <code>%<nop/>TRANSLATIONS%</code>; added automatic redirection for the "best" translation (detection via =I18N::AcceptLanguage=).  | 
    221234|  19 Jun 2005: | Initial version: =1.001= | 
    222 TWiki Dependency: | $TWiki::Plugins::VERSION 1.024 | 
     235Foswiki Dependency: | $Foswiki::Plugins::VERSION 1.024 | 
    223236|  CPAN Dependencies: | =I18N::AcceptLanguage= | 
    224237|  Other Dependencies: | none | 
     
    229242__Related Topics:__ %SYSTEMWEB%.DefaultPreferences, %USERSWEB%.SitePreferences, [[%SYSTEMWEB%.Plugins][Plugins]] 
    230243 
    231 -- TWiki:Main.AntonioTerceiro - 03 Jul 2005 
    232  
     244-- Foswiki:Main.AntonioTerceiro - 21 Jul 2009 
     245 
Note: See TracChangeset for help on using the changeset viewer.