[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/doc i18n.txt
From: |
Arturas Kriukovas |
Subject: |
gnue/common/doc i18n.txt |
Date: |
Fri, 05 Jul 2002 07:39:15 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 02/07/05 07:39:15
Modified files:
common/doc : i18n.txt
Log message:
Update.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/doc/i18n.txt.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gnue/common/doc/i18n.txt
diff -c gnue/common/doc/i18n.txt:1.5 gnue/common/doc/i18n.txt:1.6
*** gnue/common/doc/i18n.txt:1.5 Sat Jun 29 10:36:05 2002
--- gnue/common/doc/i18n.txt Fri Jul 5 07:39:15 2002
***************
*** 11,59 ****
i18n in this project takes care of following fields:
! 1. All messages, labels and etc. - it should be possible to take all the
! strings out of source into separate file, then for human to translate
! it and import back into program.
! Prefered font is unicode, encoding - UTF-8.
! But while wxPython does not support unicode, 8bit encoding will be used.
For .py files this can be achieved via pygettext, xpot (po-utils),
xgettext or any other program that can create .po files containing
translatable strings.
(see http://www.python.org/doc/current/lib/node206.html for details)
Main idea: to mark string for translation in special way:
! if we have one string to translate and other not:
sstring1="translatable string"
sstring2="non-translatable string"
we change them into:
sstring1=_("translatable string")
sstring2="non-translatable string"
That's how it works:
let's say we have file GBaseApp.py with translatable strings already
marked for translation - _('translatable string').
We run
xpot -d -o GBaseApp.po GBaseApp.py
result is GBaseApp.po file. In this file are only translatable stings
and place for their translation. Then someone does translate these
strings and returns us GBaseApp.po file with translations.
We run
msgfmt -o GBaseApp.mo GBaseApp.po
result is GBaseApp.mo file that is prepared for import into project.
All .mo files are stored in some translation directory, that has
! structure
$LC_ALL/LC_MESSAGES/files.mo
where $LC_ALL is your shell variable - something like en_US (you can
look at it running echo $LC_ALL).
In Linux default directory for this is /usr/share/locale. For GNUe, at
least for now, directory /gnue/common/translations is chosen.
Some example .po files are in translations folder.
!
! For .gfd files this probably can be done with the help of namespaces,
! but this has not yet been checked.
! 2. User data - everything that user stores/works with will be stored in
unicode (encoded in UTF-8).
--- 11,72 ----
i18n in this project takes care of following fields:
! 1. All messages, labels and etc. - is possible to take all the strings out of
! source into separate file, then translate it and import back into program.
! Prefered font is unicode, encoding - UTF-8, but while wxPython does not
! support unicode, 8bit encoding will be used.
!
For .py files this can be achieved via pygettext, xpot (po-utils),
xgettext or any other program that can create .po files containing
translatable strings.
(see http://www.python.org/doc/current/lib/node206.html for details)
Main idea: to mark string for translation in special way:
! if we have one string to translate and other not to:
!
sstring1="translatable string"
sstring2="non-translatable string"
+
we change them into:
+
sstring1=_("translatable string")
sstring2="non-translatable string"
+
That's how it works:
let's say we have file GBaseApp.py with translatable strings already
marked for translation - _('translatable string').
We run
+
xpot -d -o GBaseApp.po GBaseApp.py
+
result is GBaseApp.po file. In this file are only translatable stings
and place for their translation. Then someone does translate these
strings and returns us GBaseApp.po file with translations.
We run
+
msgfmt -o GBaseApp.mo GBaseApp.po
+
result is GBaseApp.mo file that is prepared for import into project.
All .mo files are stored in some translation directory, that has
! structure:
!
$LC_ALL/LC_MESSAGES/files.mo
+
where $LC_ALL is your shell variable - something like en_US (you can
look at it running echo $LC_ALL).
In Linux default directory for this is /usr/share/locale. For GNUe, at
least for now, directory /gnue/common/translations is chosen.
Some example .po files are in translations folder.
!
! .gfd files: user probably will have to create different .gfd files for
! different languages himself, some automated translation may be added
later.
!
!
! This is already finished.
! 2. User data - everything that user stores/works with will be stored in
unicode (encoded in UTF-8).
- gnue/common/doc i18n.txt,
Arturas Kriukovas <=