~ubuntu-branches/ubuntu/vivid/fotoxx/vivid

« back to all changes in this revision

Viewing changes to doc/translations

  • Committer: Package Import Robot
  • Author(s): Santiago Torres Batan
  • Date: 2011-11-07 16:37:55 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20111107163755-2fdevt5hu7tcguhx
Tags: 11.11.1-1
* New upstream release
  
* debian/watch
  -Fix lintian warning: debian_watch_contains_dh_make_template

* debian/rules
  -Remove -XTRANLATIONS -XCHANGES params in dh_compress.
  -Fix lintian warning: debian_rules_missing_recommends_targets
  -Add symlink to avoid duplicate documentation at intalldocs rule.
  -Remove unnecessary files.
 
* debian/control
 -Bump Standars-Version to 3.9.2
 -Remov libfreeimage-dev, libimage-exiftool-perf from
   Build-Depends
 -Add xgd-utils and libimage-exiftool-perf to Recommends
 -Add brasero to Suggests

* debian/copyright
  -Update copyright to 2010, 2011
 
* debian/patches/ 
  -Fix lintian warning format-3.0-but-debian-changes-patch and
   (closes: #643119) by creating:
  -docs_dir.patch: changes upstream sources for the program to
   know where documentation is installed
  -makefile_changes.patch: edit makefile for installation
   Removes the depencies check by dependencies.sh. (closes: #622315)
   Fix FTBFS with binutils-gold. (closes: #610545)
   fotoxxfotoxx.desktop was created by mistake. (closes: #610544)
   Thanks to Mahyuddin Susanto.

* debian/doc-base
  -Register fotoxx user guide documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
TRANSLATIONS OF FOTOXX
 
2
 
 
3
The instructions here apply to the GUI interface (menus and dialogs).
 
4
For user guide translations, see below.
 
5
 
 
6
There are two GUI translation files (assuming a default installation):
 
7
   /usr/share/fotoxx/locales/lc/fotoxx.po
 
8
   /usr/share/fotoxx/locales/lc/zfuncs.po
 
9
 
 
10
"fotoxx" is the main application program. "zfuncs" is a collection 
 
11
of utility programs. "lc" is the standard 2-character language code: 
 
12
de, es, fr, zh, etc. These two .po files contain the English phrases 
 
13
used by fotoxx and zfuncs, with corresponding translations. They can 
 
14
be edited with any text editor or one of the special .po file editors.
 
15
 
 
16
In addition to these "lc" translation files, files for regional 
 
17
languages or dialects may also be installed. These file names 
 
18
include the region code as follows:
 
19
   /usr/share/fotoxx/locales/lc_RC/fotoxx.po
 
20
   /usr/share/fotoxx/locales/lc_RC/zfuncs.po
 
21
 
 
22
"lc_RC" is a combined language and region code, e.g. "de_AT" for 
 
23
Austrian German, or "zh_TW" for Taiwan Chinese. This is also the
 
24
locale of the target computer system, as shown by the following
 
25
command: $ echo $LANG
 
26
 
 
27
If both standard and regional translation files are present, BOTH
 
28
are read and processed. If the same English text is translated in
 
29
both files, the regional translation will be used. Thus you can make
 
30
a regional .po file that contains only the exceptions to standard 
 
31
translations.
 
32
 
 
33
REVISE AN EXISTING LANGUAGE AND TRANSLATION
 
34
 
 
35
   1. Edit fotoxx.po and zfuncs.po to add or update translations.
 
36
   2. Open a terminal window and go to the location of these files.
 
37
   3. Compile the .po files to check for errors:
 
38
      $ msgfmt -v --check-format  -o /dev/null  fotoxx.po
 
39
      $ msgfmt -v --check-format  -o /dev/null  zfuncs.po
 
40
   4. Run fotoxx and check how the translations look.
 
41
   5. Send the modified .po files to me (kornelix2@googlemail.com) 
 
42
      so they can be included in future releases.
 
43
 
 
44
NOTE: 
 
45
Steps 2 and 3 are optional. The usual binary translation files (.mo)
 
46
that are output by msgfmt are not needed by fotoxx. The translation 
 
47
source files (.po) are read directly by fotoxx, and changes made to
 
48
a .po file are immediately effective. Steps 2 and 3 are useful to 
 
49
find errors (e.g. format codes in a translated string do not match 
 
50
those in the English string).
 
51
 
 
52
ADD A NEW LANGUAGE AND TRANSLATION
 
53
 
 
54
1. Move the source program files fotoxx-N.N.cc and zfuncs.cc from 
 
55
   the release tarball into some convenient directory.
 
56
2. Create template files (.pot) from the source programs (.cc)
 
57
      $ xgettext -s --keyword=ZTX -o fotoxx.pot fotoxx-N.N.cc
 
58
      $ xgettext -s --keyword=ZTX -o zfuncs.pot zfuncs.cc
 
59
3. Create translation files (.po) from the template files (.pot)
 
60
      $ msginit -l lc -o fotoxx.po -i fotoxx.pot
 
61
      $ msginit -l lc -o zfuncs.po -i zfuncs.pot
 
62
   "lc" is the 2-character code for the new language.
 
63
   If asked for an e-mail address, reply with Enter to ignore this.
 
64
4. Edit the two .po files to insert translations for all text.
 
65
5. Create an installation directory for the translation files:
 
66
      /usr/share/fotoxx/locales/lc
 
67
6. Move the two .po files into the installation location:
 
68
       /usr/share/fotoxx/locales/lc/fotoxx.po
 
69
       /usr/share/fotoxx/locales/lc/zfuncs.po
 
70
7. Run fotoxx and check how the translations look.
 
71
8. Send the new .po files to me (kornelix2@googlemail.com) so they 
 
72
   can be included in future releases.
 
73
 
 
74
PROBLEMS WITH LONG TRANSLATIONS
 
75
 
 
76
English can be terse compared to other languages (e.g. "undo" becomes 
 
77
"Rückgängig machen" in German), and this can cause ugliness in the 
 
78
GUI layouts. Therefore try to make dialog labels and buttons short.
 
79
 
 
80
CONTEXT DEPENDENT TRANSLATIONS
 
81
 
 
82
Sometimes the same English text will need multiple translations that
 
83
depend on context. A simple example is "save file" when used on a
 
84
toolbar button or in a menu. On the button the translation should be
 
85
short, but there is no limit for the menu. In German, this could be
 
86
"speichern" for the button and "in Datei speichern" for the menu.
 
87
The standard method to do this in Gnu gettext is fairly horrible, but
 
88
since fotoxx reads the source translations (.po files) instead of
 
89
the binaries (.mo files), a simpler method is available. The English
 
90
text may include an extra string to distinguish different contexts.
 
91
This context string is removed from the GUI output, so the user does 
 
92
not see it. The context string is any short string followed with the
 
93
special marker "::". To continue our example, the fotoxx.po file
 
94
might look like this:
 
95
   msgid "save file"
 
96
   msgstr "in Datei speichern"
 
97
   msgid "toolbar::save file"
 
98
   msgstr "speichern"
 
99
In English, fotoxx would show "save file" for both cases, and in 
 
100
German "in Datei speichern" or "speichern". Context strings may be
 
101
present in the .po files distributed with fotoxx, and also in a
 
102
newly created language .po file.
 
103
 
 
104
INTERACTIVE TRANSLATIONS
 
105
 
 
106
Use the fotoxx menu "Edit Translations" to start revising translations 
 
107
interactively as the application is being used. The advantage is that 
 
108
you can better understand the context, making translation easier and 
 
109
more accurate. The updated translations are also immediately seen in 
 
110
the application dialogs. The starting point is the two .po files as 
 
111
described above, which must be installed to start with. The translations 
 
112
may be partly or entirely missing at this point - it is only important 
 
113
that all the English strings are present in the .po files. This method
 
114
is best suited for updating the translations after a new release of
 
115
fotoxx, or to improve the translations. 
 
116
 
 
117
Use the menu to start the process. A popup text window is created and 
 
118
displays all english strings and their present translations as they are 
 
119
being used in the application. The format is like the .po files. Missing
 
120
translations will repeat the English phrase in place of the translation.
 
121
The translations may be edited in the window as soon as they appear. 
 
122
When the [apply] button is pressed, the original .po file(s) are copied 
 
123
and updated from the edit window. These edited versions are placed in 
 
124
/home/<user>/.fotoxx/locales/lc and .../lc_RC. Each time this process
 
125
is started, a new popup text window is created for new translations, 
 
126
and these are accumulated in the .po files. A choice can be made to show 
 
127
only missing translations or all translations. Normally only missing 
 
128
translations are needed, but revisions in existing translations can also 
 
129
be made. Once a translation is edited and the [apply] button is used, 
 
130
the translation is no longer missing and will not appear again in the 
 
131
edit window if 'only missing' was chosen. The function can be started 
 
132
again (using the application's menu) to change the mode to show no 
 
133
translations, all translations, or only missing translations.
 
134
 
 
135
When finished, replace the installation .po files in 
 
136
  /usr/share/fotoxx/locales/lc  and .../lc_RC
 
137
with the edited .po files in
 
138
  /home/<user>/.fotoxx/locales/lc  and .../lc_RC).
 
139
Delete the edited .po files to stop fotoxx from using them.
 
140
 
 
141
When fotoxx is started from a terminal window, any missing translations 
 
142
will be listed in the window. Be sure to send the finished .po files to 
 
143
me for inclusion in future releases (kornelix2@googlemail.com).
 
144
 
 
145
USER GUIDE TRANSLATION
 
146
 
 
147
The user guide is named as follows (assuming a default installation):
 
148
   /usr/share/doc/fotoxx/userguide-lc.html
 
149
   /usr/share/doc/fotoxx/userguide-lc_RC.html
 
150
 
 
151
The file is a text HTML file, which may be edited with any HTML editor.
 
152
"lc" is a standard language code, and "lc_RC" is a language and region 
 
153
code combination. The user locale in $LANG or $LANGUAGE is used to find 
 
154
"lc_RC". If a file with the region code is present, this file is used, 
 
155
otherwise the standard language version is used. If this is not found, 
 
156
the english file (userguide-en.html) is used.
 
157
 
 
158
If you make a new or revised translation, please send it to me so that
 
159
it can be included in future releases (kornelix2@googlemail.com).
 
160
 
 
161