[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: |
Tue, 30 Apr 2002 06:52:03 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 02/04/30 06:52:02
Modified files:
common/doc : i18n.txt
Log message:
Appended new information, more details on changes to .py files,
xgettext.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/doc/i18n.txt.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue/common/doc/i18n.txt
diff -c gnue/common/doc/i18n.txt:1.1 gnue/common/doc/i18n.txt:1.2
*** gnue/common/doc/i18n.txt:1.1 Wed Apr 10 14:37:58 2002
--- gnue/common/doc/i18n.txt Tue Apr 30 06:52:02 2002
***************
*** 16,22 ****
it and import back into program.
Font will be unicode, encoding - UTF-8.
! For .py files this can be achieved via pygettext.
(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:
--- 16,24 ----
it and import back into program.
Font will be unicode, encoding - UTF-8.
! 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:
***************
*** 25,36 ****
we change them into:
sstring1=_("translatable string")
sstring2="non-translatable string"
For .gfd files this probably can be done with the help of namespaces,
but this has not yet been checked.
- NOTE: error and debug messages probably will not be translated.
-
2. User data - everything that user stores/works with will be stored in
unicode (encoded in UTF-8).
--- 27,55 ----
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.py
+ 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.
+
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).
***************
*** 47,52 ****
and to load settings according to it.
Later it will be possible to take that data from operating system (?),
but for now i think this solution will go just fine.
!
! ---END---
\ No newline at end of file
--- 66,71 ----
and to load settings according to it.
Later it will be possible to take that data from operating system (?),
but for now i think this solution will go just fine.
!
! ---END---