Changes

From SME Server
Jump to navigationJump to search
2,340 bytes removed ,  11:38, 6 February 2008
m
Line 140: Line 140:  
== Pootle issues==
 
== Pootle issues==
 
=== UTF-8 ===
 
=== UTF-8 ===
Bug created, 'Use UTF-8 for console .po files'
+
Bug 'Use UTF-8 for console .po files'
 
http://bugs.contribs.org/show_bug.cgi?id=3858
 
http://bugs.contribs.org/show_bug.cgi?id=3858
 
:: SME Translation files currently use iso-8859-1
 
:: SME Translation files currently use iso-8859-1
 
:: we currently convert any file in pootle to UTF-8
 
:: we currently convert any file in pootle to UTF-8
:: we can convert back when returning to SME if necessary, by adding one line in a script.
     −
Testing Pootle I have found a few issues. I will try to describe.
+
WONTFIX we can convert back when returning to SME in a script so there is not need to make a change
 
  −
Pootle (and Translation Toolkit used by Pootle) use as default a charset UTF-8. Everytime I have create a new language translation, Pootle parse from templates encoding as UTF-8. Everytime I have "Update from templates" the target PO files are updated as UTF-8, and if target has set charset=iso-8859-1, it is then corrupted. I can't found a method to set Pootle to use ISO-8859-1 as default. Because this, and to avoid these issues I have decide to use UTF-8 as charset in Pootle. Please see http://translate.sourceforge.net/wiki/guide/locales/glibc?s=charset#editing
  −
 
  −
Not only Pootle. Every desktop translation tool set UTF-8 as default charset.
  −
 
  −
If you want to merged or override a PO file, convert to UTF-8 (if not yet). Then you can upload without corrupt the target file.
  −
 
  −
One note for admins when Pootle run at contribs.org: I suggest to use a tool for convert from UTF-8 to ISO-8859-1 before make a new language rpm update package (if gettext can't support utf-8 encoding).
  −
 
  −
I have use this great script to convert between any charset files in a directory:
  −
 
  −
#!/bin/bash
  −
  −
#./dir_iconv.sh dir cp1251 utf8 - converts all files from directory dir .. cp1251 (windows-1251) to utf8.
  −
  −
ICONVBIN='/usr/local/bin/iconv' # path to iconv binary
  −
  −
if [ $# -lt 3 ]
  −
then
  −
    echo "$0 dir from_charset to_charset"
  −
    exit
  −
fi
  −
  −
for f in $1/*
  −
do
  −
    if test -f $f
  −
    then
  −
        echo -e "\nConverting $f"
  −
        /bin/mv $f $f.old
  −
        $ICONVBIN -f $2 -t $3 $f.old > $f
  −
    else
  −
        echo -e "\nSkipping $f - not a regular file";
  −
    fi
  −
done
  −
 
  −
This apply also to panels (if formmagick can't support UTF-8 encoding)
  −
 
  −
There is an open posibility to modify Pootle or translation toolkit to make this automatically, but I don't know how to do.
  −
--[[User:PicsOne|Normando Hall]] 12:45, 2 February 2008 (MST)
  −
 
  −
:#. Formmagick supports UTF-8: http://search.cpan.org/~mitel/CGI-FormMagick-0.89/lib/CGI/FormMagick.pm
  −
:#. GetText does support UTF-8 as well: http://www.gnu.org/software/gettext/manual/gettext.html#Charset-conversion
  −
 
  −
:It is quite common for translations/lexicons to be in UTF8 as this is a well known locale independent character set, probably also the reason why Pootle is sticking to UTF-8. - [[User:Cactus|Cactus]] 15:01, 2 February 2008 (MST)
 

Navigation menu