This adds a field in plugininfo.xml.
For french language, it will be :
<description_fr>the description in french</description_fr>
Plugins with that field won't be compatible with amsn 0.94, but will
be with 0.95.
I've added this to plugininfo.xml, first, because it was easy :), then
because it can useful if we want to use plugininfo.xml for a "Plugin
Installer/Downloader".
Of course, such files must be written using utf-8. (sxml already opens
it with that encoding).

> Update of /cvsroot/amsn/msn
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28924
>
> Modified Files:
>         plugins.tcl
> Log Message:
> add a descrition_$langcode field to plugininfo.xml so as to have
> translated descriptions for plugins
> + fix a bug when unloading
>
>
> Index: plugins.tcl
> ===================================================================
> RCS file: /cvsroot/amsn/msn/plugins.tcl,v
> retrieving revision 1.131
> retrieving revision 1.132
> diff -C2 -d -r1.131 -r1.132
> *** plugins.tcl 28 Mar 2006 04:09:23 -0000      1.131
> --- plugins.tcl 5 Apr 2006 15:51:26 -0000       1.132
> ***************
> *** 237,252 ****
>
>         ###############################################################
> !         # getInfo (plugin,param)
> !         #
> !         # Checks the plugins array and return the parameter in the
> !       # pluginsinfo.xml file that is symbolized by param
> !         #
> !         # Arguments
> !         # plugin - name of plugin
>         # param - name of parameter to check for
> !         #
> !         # Return
> !         # string - the value of the parameter, empty if not found
> !         #
>
>         proc getInfo {plugin param} {
> --- 237,252 ----
>
>         ###############################################################
> !       # getInfo (plugin,param)
> !       #
> !       # Checks the plugins array and return the parameter in the
> !       # plugininfo.xml file that is symbolized by param
> !       #
> !       # Arguments
> !       # plugin - name of plugin
>         # param - name of parameter to check for
> !       #
> !       # Return
> !       # string - the value of the parameter, empty if not found
> !       #
>
>         proc getInfo {plugin param} {
> ***************
> *** 375,379 ****
>                 set name $sdata(${cstack}:name)
>                 set author $sdata(${cstack}:author)
> !               set desc $sdata(${cstack}:description)
>                 set amsn_version $sdata(${cstack}:amsn_version)
>                 set plugin_version $sdata(${cstack}:plugin_version)
> --- 375,391 ----
>                 set name $sdata(${cstack}:name)
>                 set author $sdata(${cstack}:author)
> !
> !               #Now plugins have an other field in plugininfo.xml in which 
> the description can be translated.
> !               #It should be used as
> !               #<description_fr>the description in french</description_fr>
> !               #The defaut description must be written in english
> !               #The file should be encoded in utf-8
> !               set langcode [::config::getGlobalKey language]
> !               if { ($langcode != "en") && [info exists 
> sdata(${cstack}:description_${langcode}) ] } {
> !                       set desc $sdata(${cstack}:description_${langcode})
> !               } else {
> !                       set desc $sdata(${cstack}:description)
> !               }
> !
>                 set amsn_version $sdata(${cstack}:amsn_version)
>                 set plugin_version $sdata(${cstack}:plugin_version)
> ***************
> *** 906,910 ****
>
>                 #get the namespace and deinit proc and if it exists, call it
> !               set namespace [::plugins::getInfo $plugin namespace]
>                 set deinit [::plugins::getInfo $plugin deinit_proc]
>                 if {[info procs "::${namespace}::${deinit}"] == 
> "::${namespace}::${deinit}"} {
> --- 918,922 ----
>
>                 #get the namespace and deinit proc and if it exists, call it
> !               set namespace [::plugins::getInfo $plugin plugin_namespace]
>                 set deinit [::plugins::getInfo $plugin deinit_proc]
>                 if {[info procs "::${namespace}::${deinit}"] == 
> "::${namespace}::${deinit}"} {

--
Boris FAURE (aka billiob)
mail, msn : [EMAIL PROTECTED]
No trees were killed in the sending of this message.
However, a large number of electrons were terribly
agitated.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to