transmision: upgrade 2.22 -> 2.31
[tomato.git] / release / src / router / gettext / gettext-tools / doc / gettext_11.html
blob5c057651ae74a399648f51e96000ce435ec7f0db
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.52a
4 from gettext.texi on 23 May 2005 -->
6 <TITLE>GNU gettext utilities - 11 The Translator's View</TITLE>
7 </HEAD>
8 <BODY>
9 Go to the <A HREF="gettext_1.html">first</A>, <A HREF="gettext_10.html">previous</A>, <A HREF="gettext_12.html">next</A>, <A HREF="gettext_22.html">last</A> section, <A HREF="gettext_toc.html">table of contents</A>.
10 <P><HR><P>
13 <H1><A NAME="SEC180" HREF="gettext_toc.html#TOC180">11 The Translator's View</A></H1>
17 <H2><A NAME="SEC181" HREF="gettext_toc.html#TOC181">11.1 Introduction 0</A></H2>
19 <P>
20 Free software is going international! The Translation Project is a way
21 to get maintainers, translators and users all together, so free software
22 will gradually become able to speak many native languages.
24 </P>
25 <P>
26 The GNU <CODE>gettext</CODE> tool set contains <EM>everything</EM> maintainers
27 need for internationalizing their packages for messages. It also
28 contains quite useful tools for helping translators at localizing
29 messages to their native language, once a package has already been
30 internationalized.
32 </P>
33 <P>
34 To achieve the Translation Project, we need many interested
35 people who like their own language and write it well, and who are also
36 able to synergize with other translators speaking the same language.
37 If you'd like to volunteer to <EM>work</EM> at translating messages,
38 please send mail to your translating team.
40 </P>
41 <P>
42 Each team has its own mailing list, courtesy of Linux
43 International. You may reach your translating team at the address
44 <TT>`<VAR>ll</VAR>@li.org&acute;</TT>, replacing <VAR>ll</VAR> by the two-letter ISO 639
45 code for your language. Language codes are <EM>not</EM> the same as
46 country codes given in ISO 3166. The following translating teams
47 exist:
49 </P>
51 <BLOCKQUOTE>
52 <P>
53 Chinese <CODE>zh</CODE>, Czech <CODE>cs</CODE>, Danish <CODE>da</CODE>, Dutch <CODE>nl</CODE>,
54 Esperanto <CODE>eo</CODE>, Finnish <CODE>fi</CODE>, French <CODE>fr</CODE>, Irish
55 <CODE>ga</CODE>, German <CODE>de</CODE>, Greek <CODE>el</CODE>, Italian <CODE>it</CODE>,
56 Japanese <CODE>ja</CODE>, Indonesian <CODE>in</CODE>, Norwegian <CODE>no</CODE>, Polish
57 <CODE>pl</CODE>, Portuguese <CODE>pt</CODE>, Russian <CODE>ru</CODE>, Spanish <CODE>es</CODE>,
58 Swedish <CODE>sv</CODE> and Turkish <CODE>tr</CODE>.
59 </BLOCKQUOTE>
61 <P>
62 For example, you may reach the Chinese translating team by writing to
63 <TT>`zh@li.org&acute;</TT>. When you become a member of the translating team
64 for your own language, you may subscribe to its list. For example,
65 Swedish people can send a message to <TT>`sv-request@li.org&acute;</TT>,
66 having this message body:
68 </P>
70 <PRE>
71 subscribe
72 </PRE>
74 <P>
75 Keep in mind that team members should be interested in <EM>working</EM>
76 at translations, or at solving translational difficulties, rather than
77 merely lurking around. If your team does not exist yet and you want to
78 start one, please write to <TT>`translation@iro.umontreal.ca&acute;</TT>;
79 you will then reach the coordinator for all translator teams.
81 </P>
82 <P>
83 A handful of GNU packages have already been adapted and provided
84 with message translations for several languages. Translation
85 teams have begun to organize, using these packages as a starting
86 point. But there are many more packages and many languages for
87 which we have no volunteer translators. If you would like to
88 volunteer to work at translating messages, please send mail to
89 <TT>`translation@iro.umontreal.ca&acute;</TT> indicating what language(s)
90 you can work on.
92 </P>
95 <H2><A NAME="SEC182" HREF="gettext_toc.html#TOC182">11.2 Introduction 1</A></H2>
97 <P>
98 This is now official, GNU is going international! Here is the
99 announcement submitted for the January 1995 GNU Bulletin:
101 </P>
103 <BLOCKQUOTE>
105 A handful of GNU packages have already been adapted and provided
106 with message translations for several languages. Translation
107 teams have begun to organize, using these packages as a starting
108 point. But there are many more packages and many languages
109 for which we have no volunteer translators. If you'd like to
110 volunteer to work at translating messages, please send mail to
111 <SAMP>`translation@iro.umontreal.ca&acute;</SAMP> indicating what language(s)
112 you can work on.
113 </BLOCKQUOTE>
116 This document should answer many questions for those who are curious about
117 the process or would like to contribute. Please at least skim over it,
118 hoping to cut down a little of the high volume of e-mail generated by this
119 collective effort towards internationalization of free software.
121 </P>
123 Most free programming which is widely shared is done in English, and
124 currently, English is used as the main communicating language between
125 national communities collaborating to free software. This very document
126 is written in English. This will not change in the foreseeable future.
128 </P>
130 However, there is a strong appetite from national communities for
131 having more software able to write using national language and habits,
132 and there is an on-going effort to modify free software in such a way
133 that it becomes able to do so. The experiments driven so far raised
134 an enthusiastic response from pretesters, so we believe that
135 internationalization of free software is dedicated to succeed.
137 </P>
139 For suggestion clarifications, additions or corrections to this
140 document, please e-mail to <TT>`translation@iro.umontreal.ca&acute;</TT>.
142 </P>
145 <H2><A NAME="SEC183" HREF="gettext_toc.html#TOC183">11.3 Discussions</A></H2>
148 Facing this internationalization effort, a few users expressed their
149 concerns. Some of these doubts are presented and discussed, here.
151 </P>
153 <UL>
154 <LI>Smaller groups
156 Some languages are not spoken by a very large number of people, so people
157 speaking them sometimes consider that there may not be all that much
158 demand such versions of free software packages. Moreover, many people
159 being <EM>into computers</EM>, in some countries, generally seem to prefer
160 English versions of their software.
162 On the other end, people might enjoy their own language a lot, and be
163 very motivated at providing to themselves the pleasure of having their
164 beloved free software speaking their mother tongue. They do themselves
165 a personal favor, and do not pay that much attention to the number of
166 people benefiting of their work.
168 <LI>Misinterpretation
170 Other users are shy to push forward their own language, seeing in this
171 some kind of misplaced propaganda. Someone thought there must be some
172 users of the language over the networks pestering other people with it.
174 But any spoken language is worth localization, because there are
175 people behind the language for whom the language is important and
176 dear to their hearts.
178 <LI>Odd translations
180 The biggest problem is to find the right translations so that
181 everybody can understand the messages. Translations are usually a
182 little odd. Some people get used to English, to the extent they may
183 find translations into their own language "rather pushy, obnoxious
184 and sometimes even hilarious." As a French speaking man, I have
185 the experience of those instruction manuals for goods, so poorly
186 translated in French in Korea or Taiwan...
188 The fact is that we sometimes have to create a kind of national
189 computer culture, and this is not easy without the collaboration of
190 many people liking their mother tongue. This is why translations are
191 better achieved by people knowing and loving their own language, and
192 ready to work together at improving the results they obtain.
194 <LI>Dependencies over the GPL or LGPL
196 Some people wonder if using GNU <CODE>gettext</CODE> necessarily brings their
197 package under the protective wing of the GNU General Public License or
198 the GNU Library General Public License, when they do not want to make
199 their program free, or want other kinds of freedom. The simplest
200 answer is "normally not".
202 The <CODE>gettext-runtime</CODE> part of GNU <CODE>gettext</CODE>, i.e. the
203 contents of <CODE>libintl</CODE>, is covered by the GNU Library General Public
204 License. The <CODE>gettext-tools</CODE> part of GNU <CODE>gettext</CODE>, i.e. the
205 rest of the GNU <CODE>gettext</CODE> package, is covered by the GNU General
206 Public License.
208 The mere marking of localizable strings in a package, or conditional
209 inclusion of a few lines for initialization, is not really including
210 GPL'ed or LGPL'ed code. However, since the localization routines in
211 <CODE>libintl</CODE> are under the LGPL, the LGPL needs to be considered.
212 It gives the right to distribute the complete unmodified source of
213 <CODE>libintl</CODE> even with non-free programs. It also gives the right
214 to use <CODE>libintl</CODE> as a shared library, even for non-free programs.
215 But it gives the right to use <CODE>libintl</CODE> as a static library or
216 to incorporate <CODE>libintl</CODE> into another library only to free
217 software.
219 </UL>
223 <H2><A NAME="SEC184" HREF="gettext_toc.html#TOC184">11.4 Organization</A></H2>
226 On a larger scale, the true solution would be to organize some kind of
227 fairly precise set up in which volunteers could participate. I gave
228 some thought to this idea lately, and realize there will be some
229 touchy points. I thought of writing to Richard Stallman to launch
230 such a project, but feel it might be good to shake out the ideas
231 between ourselves first. Most probably that Linux International has
232 some experience in the field already, or would like to orchestrate
233 the volunteer work, maybe. Food for thought, in any case!
235 </P>
237 I guess we have to setup something early, somehow, that will help
238 many possible contributors of the same language to interlock and avoid
239 work duplication, and further be put in contact for solving together
240 problems particular to their tongue (in most languages, there are many
241 difficulties peculiar to translating technical English). My Swedish
242 contributor acknowledged these difficulties, and I'm well aware of
243 them for French.
245 </P>
247 This is surely not a technical issue, but we should manage so the
248 effort of locale contributors be maximally useful, despite the national
249 team layer interface between contributors and maintainers.
251 </P>
253 The Translation Project needs some setup for coordinating language
254 coordinators. Localizing evolving programs will surely
255 become a permanent and continuous activity in the free software community,
256 once well started.
257 The setup should be minimally completed and tested before GNU
258 <CODE>gettext</CODE> becomes an official reality. The e-mail address
259 <TT>`translation@iro.umontreal.ca&acute;</TT> has been setup for receiving
260 offers from volunteers and general e-mail on these topics. This address
261 reaches the Translation Project coordinator.
263 </P>
267 <H3><A NAME="SEC185" HREF="gettext_toc.html#TOC185">11.4.1 Central Coordination</A></H3>
270 I also think GNU will need sooner than it thinks, that someone setup
271 a way to organize and coordinate these groups. Some kind of group
272 of groups. My opinion is that it would be good that GNU delegates
273 this task to a small group of collaborating volunteers, shortly.
274 Perhaps in <TT>`gnu.announce&acute;</TT> a list of this national committee's
275 can be published.
277 </P>
279 My role as coordinator would simply be to refer to Ulrich any German
280 speaking volunteer interested to localization of free software packages, and
281 maybe helping national groups to initially organize, while maintaining
282 national registries for until national groups are ready to take over.
283 In fact, the coordinator should ease volunteers to get in contact with
284 one another for creating national teams, which should then select
285 one coordinator per language, or country (regionalized language).
286 If well done, the coordination should be useful without being an
287 overwhelming task, the time to put delegations in place.
289 </P>
292 <H3><A NAME="SEC186" HREF="gettext_toc.html#TOC186">11.4.2 National Teams</A></H3>
295 I suggest we look for volunteer coordinators/editors for individual
296 languages. These people will scan contributions of translation files
297 for various programs, for their own languages, and will ensure high
298 and uniform standards of diction.
300 </P>
302 From my current experience with other people in these days, those who
303 provide localizations are very enthusiastic about the process, and are
304 more interested in the localization process than in the program they
305 localize, and want to do many programs, not just one. This seems
306 to confirm that having a coordinator/editor for each language is a
307 good idea.
309 </P>
311 We need to choose someone who is good at writing clear and concise
312 prose in the language in question. That is hard--we can't check
313 it ourselves. So we need to ask a few people to judge each others'
314 writing and select the one who is best.
316 </P>
318 I announce my prerelease to a few dozen people, and you would not
319 believe all the discussions it generated already. I shudder to think
320 what will happen when this will be launched, for true, officially,
321 world wide. Who am I to arbitrate between two Czekolsovak users
322 contradicting each other, for example?
324 </P>
326 I assume that your German is not much better than my French so that
327 I would not be able to judge about these formulations. What I would
328 suggest is that for each language there is a group for people who
329 maintain the PO files and judge about changes. I suspect there will
330 be cultural differences between how such groups of people will behave.
331 Some will have relaxed ways, reach consensus easily, and have anyone
332 of the group relate to the maintainers, while others will fight to
333 death, organize heavy administrations up to national standards, and
334 use strict channels.
336 </P>
338 The German team is putting out a good example. Right now, they are
339 maybe half a dozen people revising translations of each other and
340 discussing the linguistic issues. I do not even have all the names.
341 Ulrich Drepper is taking care of coordinating the German team.
342 He subscribed to all my pretest lists, so I do not even have to warn
343 him specifically of incoming releases.
345 </P>
347 I'm sure, that is a good idea to get teams for each language working
348 on translations. That will make the translations better and more
349 consistent.
351 </P>
355 <H4><A NAME="SEC187" HREF="gettext_toc.html#TOC187">11.4.2.1 Sub-Cultures</A></H4>
358 Taking French for example, there are a few sub-cultures around computers
359 which developed diverging vocabularies. Picking volunteers here and
360 there without addressing this problem in an organized way, soon in the
361 project, might produce a distasteful mix of internationalized programs,
362 and possibly trigger endless quarrels among those who really care.
364 </P>
366 Keeping some kind of unity in the way French localization of
367 internationalized programs is achieved is a difficult (and delicate) job.
368 Knowing the latin character of French people (:-), if we take this
369 the wrong way, we could end up nowhere, or spoil a lot of energies.
370 Maybe we should begin to address this problem seriously <EM>before</EM>
371 GNU <CODE>gettext</CODE> become officially published. And I suspect that this
372 means soon!
374 </P>
377 <H4><A NAME="SEC188" HREF="gettext_toc.html#TOC188">11.4.2.2 Organizational Ideas</A></H4>
380 I expect the next big changes after the official release. Please note
381 that I use the German translation of the short GPL message. We need
382 to set a few good examples before the localization goes out for true
383 in the free software community. Here are a few points to discuss:
385 </P>
387 <UL>
388 <LI>
390 Each group should have one FTP server (at least one master).
392 <LI>
394 The files on the server should reflect the latest version (of
395 course!) and it should also contain a RCS directory with the
396 corresponding archives (I don't have this now).
398 <LI>
400 There should also be a ChangeLog file (this is more useful than the
401 RCS archive but can be generated automatically from the later by
402 Emacs).
404 <LI>
406 A <EM>core group</EM> should judge about questionable changes (for now
407 this group consists solely by me but I ask some others occasionally;
408 this also seems to work).
410 </UL>
414 <H3><A NAME="SEC189" HREF="gettext_toc.html#TOC189">11.4.3 Mailing Lists</A></H3>
417 If we get any inquiries about GNU <CODE>gettext</CODE>, send them on to:
419 </P>
421 <PRE>
422 <TT>`translation@iro.umontreal.ca&acute;</TT>
423 </PRE>
426 The <TT>`*-pretest&acute;</TT> lists are quite useful to me, maybe the idea could
427 be generalized to many GNU, and non-GNU packages. But each maintainer
428 his/her way!
430 </P>
432 Fran&ccedil;ois, we have a mechanism in place here at
433 <TT>`gnu.ai.mit.edu&acute;</TT> to track teams, support mailing lists for
434 them and log members. We have a slight preference that you use it.
435 If this is OK with you, I can get you clued in.
437 </P>
439 Things are changing! A few years ago, when Daniel Fekete and I
440 asked for a mailing list for GNU localization, nested at the FSF, we
441 were politely invited to organize it anywhere else, and so did we.
442 For communicating with my pretesters, I later made a handful of
443 mailing lists located at iro.umontreal.ca and administrated by
444 <CODE>majordomo</CODE>. These lists have been <EM>very</EM> dependable
445 so far...
447 </P>
449 I suspect that the German team will organize itself a mailing list
450 located in Germany, and so forth for other countries. But before they
451 organize for true, it could surely be useful to offer mailing lists
452 located at the FSF to each national team. So yes, please explain me
453 how I should proceed to create and handle them.
455 </P>
457 We should create temporary mailing lists, one per country, to help
458 people organize. Temporary, because once regrouped and structured, it
459 would be fair the volunteers from country bring back <EM>their</EM> list
460 in there and manage it as they want. My feeling is that, in the long
461 run, each team should run its own list, from within their country.
462 There also should be some central list to which all teams could
463 subscribe as they see fit, as long as each team is represented in it.
465 </P>
468 <H2><A NAME="SEC190" HREF="gettext_toc.html#TOC190">11.5 Information Flow</A></H2>
471 There will surely be some discussion about this messages after the
472 packages are finally released. If people now send you some proposals
473 for better messages, how do you proceed? Jim, please note that
474 right now, as I put forward nearly a dozen of localizable programs, I
475 receive both the translations and the coordination concerns about them.
477 </P>
479 If I put one of my things to pretest, Ulrich receives the announcement
480 and passes it on to the German team, who make last minute revisions.
481 Then he submits the translation files to me <EM>as the maintainer</EM>.
482 For free packages I do not maintain, I would not even hear about it.
483 This scheme could be made to work for the whole Translation Project,
484 I think. For security reasons, maybe Ulrich (national coordinators,
485 in fact) should update central registry kept at the Translation Project
486 (Jim, me, or Len's recruits) once in a while.
488 </P>
490 In December/January, I was aggressively ready to internationalize
491 all of GNU, giving myself the duty of one small GNU package per week
492 or so, taking many weeks or months for bigger packages. But it does
493 not work this way. I first did all the things I'm responsible for.
494 I've nothing against some missionary work on other maintainers, but
495 I'm also loosing a lot of energy over it--same debates over again.
497 </P>
499 And when the first localized packages are released we'll get a lot of
500 responses about ugly translations :-). Surely, and we need to have
501 beforehand a fairly good idea about how to handle the information
502 flow between the national teams and the package maintainers.
504 </P>
506 Please start saving somewhere a quick history of each PO file. I know
507 for sure that the file format will change, allowing for comments.
508 It would be nice that each file has a kind of log, and references for
509 those who want to submit comments or gripes, or otherwise contribute.
510 I sent a proposal for a fast and flexible format, but it is not
511 receiving acceptance yet by the GNU deciders. I'll tell you when I
512 have more information about this.
514 </P>
517 <H2><A NAME="SEC191" HREF="gettext_toc.html#TOC191">11.6 Prioritizing messages: How to determine which messages to translate first</A></H2>
520 A translator sometimes has only a limited amount of time per week to
521 spend on a package, and some packages have quite large message catalogs
522 (over 1000 messages). Therefore she wishes to translate the messages
523 first that are the most visible to the user, or that occur most frequently.
524 This section describes how to determine these "most urgent" messages.
525 It also applies to determine the "next most urgent" messages after the
526 message catalog has already been partially translated.
528 </P>
530 In a first step, she uses the programs like a user would do. While she
531 does this, the GNU <CODE>gettext</CODE> library logs into a file the not yet
532 translated messages for which a translation was requested from the program.
534 </P>
536 In a second step, she uses the PO mode to translate precisely this set
537 of messages.
539 </P>
541 <A NAME="IDX1023"></A>
542 Here a more details. The GNU <CODE>libintl</CODE> library (but not the
543 corresponding functions in GNU <CODE>libc</CODE>) supports an environment variable
544 <CODE>GETTEXT_LOG_UNTRANSLATED</CODE>. The GNU <CODE>libintl</CODE> library will
545 log into this file the messages for which <CODE>gettext()</CODE> and related
546 functions couldn't find the translation. If the file doesn't exist, it
547 will be created as needed. On systems with GNU <CODE>libc</CODE> a shared library
548 <SAMP>`preloadable_libintl.so&acute;</SAMP> is provided that can be used with the ELF
549 <SAMP>`LD_PRELOAD&acute;</SAMP> mechanism.
551 </P>
553 So, in the first step, the translator uses these commands on systems with
554 GNU <CODE>libc</CODE>:
556 </P>
558 <PRE>
559 $ LD_PRELOAD=/usr/local/lib/preloadable_libintl.so
560 $ export LD_PRELOAD
561 $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused
562 $ export GETTEXT_LOG_UNTRANSLATED
563 </PRE>
566 and these commands on other systems:
568 </P>
570 <PRE>
571 $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused
572 $ export GETTEXT_LOG_UNTRANSLATED
573 </PRE>
576 Then she uses and peruses the programs. (It is a good and recommended
577 practice to use the programs for which you provide translations: it
578 gives you the needed context.) When done, she removes the environment
579 variables:
581 </P>
583 <PRE>
584 $ unset LD_PRELOAD
585 $ unset GETTEXT_LOG_UNTRANSLATED
586 </PRE>
589 The second step starts with removing duplicates:
591 </P>
593 <PRE>
594 $ msguniq $HOME/gettextlogused &#62; missing.po
595 </PRE>
598 The result is a PO file, but needs some preprocessing before the Emacs PO
599 mode can be used with it. First, it is a multi-domain PO file, containing
600 messages from many translation domains. Second, it lacks all translator
601 comments and source references. Here is how to get a list of the affected
602 translation domains:
604 </P>
606 <PRE>
607 $ sed -n -e 's,^domain "\(.*\)"$,\1,p' &#60; missing.po | sort | uniq
608 </PRE>
611 Then the translator can handle the domains one by one. For simplicity,
612 let's use environment variables to denote the language, domain and source
613 package.
615 </P>
617 <PRE>
618 $ lang=nl # your language
619 $ domain=coreutils # the name of the domain to be handled
620 $ package=/usr/src/gnu/coreutils-4.5.4 # the package where it comes from
621 </PRE>
624 She takes the latest copy of <TT>`$lang.po&acute;</TT> from the Translation Project,
625 or from the package (in most cases, <TT>`$package/po/$lang.po&acute;</TT>), or
626 creates a fresh one if she's the first translator (see section <A HREF="gettext_5.html#SEC32">5 Creating a New PO File</A>).
627 She then uses the following commands to mark the not urgent messages as
628 "obsolete". (This doesn't mean that these messages - translated and
629 untranslated ones - will go away. It simply means that Emacs PO mode
630 will ignore them in the following editing session.)
632 </P>
634 <PRE>
635 $ msggrep --domain=$domain missing.po | grep -v '^domain' \
636 &#62; $domain-missing.po
637 $ msgattrib --set-obsolete --ignore-file $domain-missing.po $domain.$lang.po \
638 &#62; $domain.$lang-urgent.po
639 </PRE>
642 The she translates <TT>`$domain.$lang-urgent.po&acute;</TT> by use of Emacs PO mode.
643 (FIXME: I don't know whether <CODE>KBabel</CODE> and <CODE>gtranslator</CODE> also
644 preserve obsolete messages, as they should.)
645 Finally she restores the not urgent messages (with their earlier
646 translations, for those which were already translated) through this command:
648 </P>
650 <PRE>
651 $ msgmerge --no-fuzzy-matching $domain.$lang-urgent.po $package/po/$domain.pot \
652 &#62; $domain.$lang.po
653 </PRE>
656 Then she can submit <TT>`$domain.$lang.po&acute;</TT> and proceed to the next domain.
658 </P>
659 <P><HR><P>
660 Go to the <A HREF="gettext_1.html">first</A>, <A HREF="gettext_10.html">previous</A>, <A HREF="gettext_12.html">next</A>, <A HREF="gettext_22.html">last</A> section, <A HREF="gettext_toc.html">table of contents</A>.
661 </BODY>
662 </HTML>