Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/doc/gettext/gettext_12.html @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> | |
2 <html> | |
3 <!-- Created on February, 21 2024 by texi2html 1.78a --> | |
4 <!-- | |
5 Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) | |
6 Karl Berry <karl@freefriends.org> | |
7 Olaf Bachmann <obachman@mathematik.uni-kl.de> | |
8 and many others. | |
9 Maintained by: Many creative people. | |
10 Send bugs and suggestions to <texi2html-bug@nongnu.org> | |
11 | |
12 --> | |
13 <head> | |
14 <title>GNU gettext utilities: 12. The Translator's View</title> | |
15 | |
16 <meta name="description" content="GNU gettext utilities: 12. The Translator's View"> | |
17 <meta name="keywords" content="GNU gettext utilities: 12. The Translator's View"> | |
18 <meta name="resource-type" content="document"> | |
19 <meta name="distribution" content="global"> | |
20 <meta name="Generator" content="texi2html 1.78a"> | |
21 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
22 <style type="text/css"> | |
23 <!-- | |
24 a.summary-letter {text-decoration: none} | |
25 pre.display {font-family: serif} | |
26 pre.format {font-family: serif} | |
27 pre.menu-comment {font-family: serif} | |
28 pre.menu-preformatted {font-family: serif} | |
29 pre.smalldisplay {font-family: serif; font-size: smaller} | |
30 pre.smallexample {font-size: smaller} | |
31 pre.smallformat {font-family: serif; font-size: smaller} | |
32 pre.smalllisp {font-size: smaller} | |
33 span.roman {font-family:serif; font-weight:normal;} | |
34 span.sansserif {font-family:sans-serif; font-weight:normal;} | |
35 ul.toc {list-style: none} | |
36 --> | |
37 </style> | |
38 | |
39 | |
40 </head> | |
41 | |
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> | |
43 | |
44 <table cellpadding="1" cellspacing="1" border="0"> | |
45 <tr><td valign="middle" align="left">[<a href="gettext_11.html#SEC197" title="Beginning of this chapter or previous chapter"> << </a>]</td> | |
46 <td valign="middle" align="left">[<a href="gettext_13.html#SEC230" title="Next chapter"> >> </a>]</td> | |
47 <td valign="middle" align="left"> </td> | |
48 <td valign="middle" align="left"> </td> | |
49 <td valign="middle" align="left"> </td> | |
50 <td valign="middle" align="left"> </td> | |
51 <td valign="middle" align="left"> </td> | |
52 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td> | |
53 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td> | |
54 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td> | |
55 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td> | |
56 </tr></table> | |
57 | |
58 <hr size="2"> | |
59 <a name="Translators"></a> | |
60 <a name="SEC217"></a> | |
61 <h1 class="chapter"> <a href="gettext_toc.html#TOC210">12. The Translator's View</a> </h1> | |
62 | |
63 | |
64 | |
65 | |
66 <a name="Trans-Intro-0"></a> | |
67 <a name="SEC218"></a> | |
68 <h2 class="section"> <a href="gettext_toc.html#TOC211">12.1 Introduction 0</a> </h2> | |
69 | |
70 <p><strong> NOTE: </strong> This documentation section is outdated and needs to be | |
71 revised. | |
72 </p> | |
73 <p>Free software is going international! The Translation Project is a way | |
74 to get maintainers, translators and users all together, so free software | |
75 will gradually become able to speak many native languages. | |
76 </p> | |
77 <p>The GNU <code>gettext</code> tool set contains <em>everything</em> maintainers | |
78 need for internationalizing their packages for messages. It also | |
79 contains quite useful tools for helping translators at localizing | |
80 messages to their native language, once a package has already been | |
81 internationalized. | |
82 </p> | |
83 <p>To achieve the Translation Project, we need many interested | |
84 people who like their own language and write it well, and who are also | |
85 able to synergize with other translators speaking the same language. | |
86 If you'd like to volunteer to <em>work</em> at translating messages, | |
87 please send mail to your translating team. | |
88 </p> | |
89 <p>Each team has its own mailing list, courtesy of Linux | |
90 International. You may reach your translating team at the address | |
91 ‘<tt><var>ll</var>@li.org</tt>’, replacing <var>ll</var> by the two-letter ISO 639 | |
92 code for your language. Language codes are <em>not</em> the same as | |
93 country codes given in ISO 3166. The following translating teams | |
94 exist: | |
95 </p> | |
96 <blockquote><p>Chinese <code>zh</code>, Czech <code>cs</code>, Danish <code>da</code>, Dutch <code>nl</code>, | |
97 Esperanto <code>eo</code>, Finnish <code>fi</code>, French <code>fr</code>, Irish | |
98 <code>ga</code>, German <code>de</code>, Greek <code>el</code>, Italian <code>it</code>, | |
99 Japanese <code>ja</code>, Indonesian <code>in</code>, Norwegian <code>no</code>, Polish | |
100 <code>pl</code>, Portuguese <code>pt</code>, Russian <code>ru</code>, Spanish <code>es</code>, | |
101 Swedish <code>sv</code> and Turkish <code>tr</code>. | |
102 </p></blockquote> | |
103 | |
104 <p>For example, you may reach the Chinese translating team by writing to | |
105 ‘<tt>zh@li.org</tt>’. When you become a member of the translating team | |
106 for your own language, you may subscribe to its list. For example, | |
107 Swedish people can send a message to ‘<tt>sv-request@li.org</tt>’, | |
108 having this message body: | |
109 </p> | |
110 <table><tr><td> </td><td><pre class="example">subscribe | |
111 </pre></td></tr></table> | |
112 | |
113 <p>Keep in mind that team members should be interested in <em>working</em> | |
114 at translations, or at solving translational difficulties, rather than | |
115 merely lurking around. If your team does not exist yet and you want to | |
116 start one, please write to ‘<tt>coordinator@translationproject.org</tt>’; | |
117 you will then reach the coordinator for all translator teams. | |
118 </p> | |
119 <p>A handful of GNU packages have already been adapted and provided | |
120 with message translations for several languages. Translation | |
121 teams have begun to organize, using these packages as a starting | |
122 point. But there are many more packages and many languages for | |
123 which we have no volunteer translators. If you would like to | |
124 volunteer to work at translating messages, please send mail to | |
125 ‘<tt>coordinator@translationproject.org</tt>’ indicating what language(s) | |
126 you can work on. | |
127 </p> | |
128 | |
129 <a name="Trans-Intro-1"></a> | |
130 <a name="SEC219"></a> | |
131 <h2 class="section"> <a href="gettext_toc.html#TOC212">12.2 Introduction 1</a> </h2> | |
132 | |
133 <p><strong> NOTE: </strong> This documentation section is outdated and needs to be | |
134 revised. | |
135 </p> | |
136 <p>This is now official, GNU is going international! Here is the | |
137 announcement submitted for the January 1995 GNU Bulletin: | |
138 </p> | |
139 <blockquote><p>A handful of GNU packages have already been adapted and provided | |
140 with message translations for several languages. Translation | |
141 teams have begun to organize, using these packages as a starting | |
142 point. But there are many more packages and many languages | |
143 for which we have no volunteer translators. If you'd like to | |
144 volunteer to work at translating messages, please send mail to | |
145 ‘<samp>coordinator@translationproject.org</samp>’ indicating what language(s) | |
146 you can work on. | |
147 </p></blockquote> | |
148 | |
149 <p>This document should answer many questions for those who are curious about | |
150 the process or would like to contribute. Please at least skim over it, | |
151 hoping to cut down a little of the high volume of e-mail generated by this | |
152 collective effort towards internationalization of free software. | |
153 </p> | |
154 <p>Most free programming which is widely shared is done in English, and | |
155 currently, English is used as the main communicating language between | |
156 national communities collaborating to free software. This very document | |
157 is written in English. This will not change in the foreseeable future. | |
158 </p> | |
159 <p>However, there is a strong appetite from national communities for | |
160 having more software able to write using national language and habits, | |
161 and there is an on-going effort to modify free software in such a way | |
162 that it becomes able to do so. The experiments driven so far raised | |
163 an enthusiastic response from pretesters, so we believe that | |
164 internationalization of free software is dedicated to succeed. | |
165 </p> | |
166 <p>For suggestion clarifications, additions or corrections to this | |
167 document, please e-mail to ‘<tt>coordinator@translationproject.org</tt>’. | |
168 </p> | |
169 | |
170 <a name="Discussions"></a> | |
171 <a name="SEC220"></a> | |
172 <h2 class="section"> <a href="gettext_toc.html#TOC213">12.3 Discussions</a> </h2> | |
173 | |
174 <p><strong> NOTE: </strong> This documentation section is outdated and needs to be | |
175 revised. | |
176 </p> | |
177 <p>Facing this internationalization effort, a few users expressed their | |
178 concerns. Some of these doubts are presented and discussed, here. | |
179 </p> | |
180 <ul> | |
181 <li> Smaller groups | |
182 | |
183 <p>Some languages are not spoken by a very large number of people, so people | |
184 speaking them sometimes consider that there may not be all that much | |
185 demand such versions of free software packages. Moreover, many people | |
186 being <em>into computers</em>, in some countries, generally seem to prefer | |
187 English versions of their software. | |
188 </p> | |
189 <p>On the other end, people might enjoy their own language a lot, and be | |
190 very motivated at providing to themselves the pleasure of having their | |
191 beloved free software speaking their mother tongue. They do themselves | |
192 a personal favor, and do not pay that much attention to the number of | |
193 people benefiting of their work. | |
194 </p> | |
195 </li><li> Misinterpretation | |
196 | |
197 <p>Other users are shy to push forward their own language, seeing in this | |
198 some kind of misplaced propaganda. Someone thought there must be some | |
199 users of the language over the networks pestering other people with it. | |
200 </p> | |
201 <p>But any spoken language is worth localization, because there are | |
202 people behind the language for whom the language is important and | |
203 dear to their hearts. | |
204 </p> | |
205 </li><li> Odd translations | |
206 | |
207 <p>The biggest problem is to find the right translations so that | |
208 everybody can understand the messages. Translations are usually a | |
209 little odd. Some people get used to English, to the extent they may | |
210 find translations into their own language “rather pushy, obnoxious | |
211 and sometimes even hilarious.” As a French speaking man, I have | |
212 the experience of those instruction manuals for goods, so poorly | |
213 translated in French in Korea or Taiwan… | |
214 </p> | |
215 <p>The fact is that we sometimes have to create a kind of national | |
216 computer culture, and this is not easy without the collaboration of | |
217 many people liking their mother tongue. This is why translations are | |
218 better achieved by people knowing and loving their own language, and | |
219 ready to work together at improving the results they obtain. | |
220 </p> | |
221 </li><li> Dependencies over the GPL or LGPL | |
222 | |
223 <p>Some people wonder if using GNU <code>gettext</code> necessarily brings their | |
224 package under the protective wing of the GNU General Public License or | |
225 the GNU Lesser General Public License, when they do not want to make | |
226 their program free, or want other kinds of freedom. The simplest | |
227 answer is “normally not”. | |
228 </p> | |
229 <p>The <code>gettext-runtime</code> part of GNU <code>gettext</code>, i.e. the | |
230 contents of <code>libintl</code>, is covered by the GNU Lesser General Public | |
231 License. The <code>gettext-tools</code> part of GNU <code>gettext</code>, i.e. the | |
232 rest of the GNU <code>gettext</code> package, is covered by the GNU General | |
233 Public License. | |
234 </p> | |
235 <p>The mere marking of localizable strings in a package, or conditional | |
236 inclusion of a few lines for initialization, is not really including | |
237 GPL'ed or LGPL'ed code. However, since the localization routines in | |
238 <code>libintl</code> are under the LGPL, the LGPL needs to be considered. | |
239 It gives the right to distribute the complete unmodified source of | |
240 <code>libintl</code> even with non-free programs. It also gives the right | |
241 to use <code>libintl</code> as a shared library, even for non-free programs. | |
242 But it gives the right to use <code>libintl</code> as a static library or | |
243 to incorporate <code>libintl</code> into another library only to free | |
244 software. | |
245 </p> | |
246 </li></ul> | |
247 | |
248 | |
249 <a name="Organization"></a> | |
250 <a name="SEC221"></a> | |
251 <h2 class="section"> <a href="gettext_toc.html#TOC214">12.4 Organization</a> </h2> | |
252 | |
253 <p><strong> NOTE: </strong> This documentation section is outdated and needs to be | |
254 revised. | |
255 </p> | |
256 <p>On a larger scale, the true solution would be to organize some kind of | |
257 fairly precise set up in which volunteers could participate. I gave | |
258 some thought to this idea lately, and realize there will be some | |
259 touchy points. I thought of writing to Richard Stallman to launch | |
260 such a project, but feel it might be good to shake out the ideas | |
261 between ourselves first. Most probably that Linux International has | |
262 some experience in the field already, or would like to orchestrate | |
263 the volunteer work, maybe. Food for thought, in any case! | |
264 </p> | |
265 <p>I guess we have to setup something early, somehow, that will help | |
266 many possible contributors of the same language to interlock and avoid | |
267 work duplication, and further be put in contact for solving together | |
268 problems particular to their tongue (in most languages, there are many | |
269 difficulties peculiar to translating technical English). My Swedish | |
270 contributor acknowledged these difficulties, and I'm well aware of | |
271 them for French. | |
272 </p> | |
273 <p>This is surely not a technical issue, but we should manage so the | |
274 effort of locale contributors be maximally useful, despite the national | |
275 team layer interface between contributors and maintainers. | |
276 </p> | |
277 <p>The Translation Project needs some setup for coordinating language | |
278 coordinators. Localizing evolving programs will surely | |
279 become a permanent and continuous activity in the free software community, | |
280 once well started. | |
281 The setup should be minimally completed and tested before GNU | |
282 <code>gettext</code> becomes an official reality. The e-mail address | |
283 ‘<tt>coordinator@translationproject.org</tt>’ has been set up for receiving | |
284 offers from volunteers and general e-mail on these topics. This address | |
285 reaches the Translation Project coordinator. | |
286 </p> | |
287 | |
288 | |
289 <a name="Central-Coordination"></a> | |
290 <a name="SEC222"></a> | |
291 <h3 class="subsection"> <a href="gettext_toc.html#TOC215">12.4.1 Central Coordination</a> </h3> | |
292 | |
293 <p>I also think GNU will need sooner than it thinks, that someone set up | |
294 a way to organize and coordinate these groups. Some kind of group | |
295 of groups. My opinion is that it would be good that GNU delegates | |
296 this task to a small group of collaborating volunteers, shortly. | |
297 Perhaps in ‘<tt>gnu.announce</tt>’ a list of this national committee's | |
298 can be published. | |
299 </p> | |
300 <p>My role as coordinator would simply be to refer to Ulrich any German | |
301 speaking volunteer interested to localization of free software packages, and | |
302 maybe helping national groups to initially organize, while maintaining | |
303 national registries for until national groups are ready to take over. | |
304 In fact, the coordinator should ease volunteers to get in contact with | |
305 one another for creating national teams, which should then select | |
306 one coordinator per language, or country (regionalized language). | |
307 If well done, the coordination should be useful without being an | |
308 overwhelming task, the time to put delegations in place. | |
309 </p> | |
310 | |
311 <a name="National-Teams"></a> | |
312 <a name="SEC223"></a> | |
313 <h3 class="subsection"> <a href="gettext_toc.html#TOC216">12.4.2 National Teams</a> </h3> | |
314 | |
315 <p>I suggest we look for volunteer coordinators/editors for individual | |
316 languages. These people will scan contributions of translation files | |
317 for various programs, for their own languages, and will ensure high | |
318 and uniform standards of diction. | |
319 </p> | |
320 <p>From my current experience with other people in these days, those who | |
321 provide localizations are very enthusiastic about the process, and are | |
322 more interested in the localization process than in the program they | |
323 localize, and want to do many programs, not just one. This seems | |
324 to confirm that having a coordinator/editor for each language is a | |
325 good idea. | |
326 </p> | |
327 <p>We need to choose someone who is good at writing clear and concise | |
328 prose in the language in question. That is hard—we can't check | |
329 it ourselves. So we need to ask a few people to judge each others' | |
330 writing and select the one who is best. | |
331 </p> | |
332 <p>I announce my prerelease to a few dozen people, and you would not | |
333 believe all the discussions it generated already. I shudder to think | |
334 what will happen when this will be launched, for true, officially, | |
335 world wide. Who am I to arbitrate between two Czekolsovak users | |
336 contradicting each other, for example? | |
337 </p> | |
338 <p>I assume that your German is not much better than my French so that | |
339 I would not be able to judge about these formulations. What I would | |
340 suggest is that for each language there is a group for people who | |
341 maintain the PO files and judge about changes. I suspect there will | |
342 be cultural differences between how such groups of people will behave. | |
343 Some will have relaxed ways, reach consensus easily, and have anyone | |
344 of the group relate to the maintainers, while others will fight to | |
345 death, organize heavy administrations up to national standards, and | |
346 use strict channels. | |
347 </p> | |
348 <p>The German team is putting out a good example. Right now, they are | |
349 maybe half a dozen people revising translations of each other and | |
350 discussing the linguistic issues. I do not even have all the names. | |
351 Ulrich Drepper is taking care of coordinating the German team. | |
352 He subscribed to all my pretest lists, so I do not even have to warn | |
353 him specifically of incoming releases. | |
354 </p> | |
355 <p>I'm sure, that is a good idea to get teams for each language working | |
356 on translations. That will make the translations better and more | |
357 consistent. | |
358 </p> | |
359 | |
360 | |
361 <a name="Sub_002dCultures"></a> | |
362 <a name="SEC224"></a> | |
363 <h4 class="subsubsection"> <a href="gettext_toc.html#TOC217">12.4.2.1 Sub-Cultures</a> </h4> | |
364 | |
365 <p>Taking French for example, there are a few sub-cultures around computers | |
366 which developed diverging vocabularies. Picking volunteers here and | |
367 there without addressing this problem in an organized way, soon in the | |
368 project, might produce a distasteful mix of internationalized programs, | |
369 and possibly trigger endless quarrels among those who really care. | |
370 </p> | |
371 <p>Keeping some kind of unity in the way French localization of | |
372 internationalized programs is achieved is a difficult (and delicate) job. | |
373 Knowing the latin character of French people (:-), if we take this | |
374 the wrong way, we could end up nowhere, or spoil a lot of energies. | |
375 Maybe we should begin to address this problem seriously <em>before</em> | |
376 GNU <code>gettext</code> become officially published. And I suspect that this | |
377 means soon! | |
378 </p> | |
379 | |
380 <a name="Organizational-Ideas"></a> | |
381 <a name="SEC225"></a> | |
382 <h4 class="subsubsection"> <a href="gettext_toc.html#TOC218">12.4.2.2 Organizational Ideas</a> </h4> | |
383 | |
384 <p>I expect the next big changes after the official release. Please note | |
385 that I use the German translation of the short GPL message. We need | |
386 to set a few good examples before the localization goes out for true | |
387 in the free software community. Here are a few points to discuss: | |
388 </p> | |
389 <ul> | |
390 <li> | |
391 Each group should have one FTP server (at least one master). | |
392 | |
393 </li><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). | |
397 | |
398 </li><li> | |
399 There should also be a ChangeLog file (this is more useful than the | |
400 RCS archive but can be generated automatically from the later by | |
401 Emacs). | |
402 | |
403 </li><li> | |
404 A <em>core group</em> should judge about questionable changes (for now | |
405 this group consists solely by me but I ask some others occasionally; | |
406 this also seems to work). | |
407 | |
408 </li></ul> | |
409 | |
410 | |
411 <a name="Mailing-Lists"></a> | |
412 <a name="SEC226"></a> | |
413 <h3 class="subsection"> <a href="gettext_toc.html#TOC219">12.4.3 Mailing Lists</a> </h3> | |
414 | |
415 <p>If we get any inquiries about GNU <code>gettext</code>, send them on to: | |
416 </p> | |
417 <table><tr><td> </td><td><pre class="example">‘<tt>coordinator@translationproject.org</tt>’ | |
418 </pre></td></tr></table> | |
419 | |
420 <p>The ‘<tt>*-pretest</tt>’ lists are quite useful to me, maybe the idea could | |
421 be generalized to many GNU, and non-GNU packages. But each maintainer | |
422 his/her way! | |
423 </p> | |
424 <p>François, we have a mechanism in place here at | |
425 ‘<tt>gnu.ai.mit.edu</tt>’ to track teams, support mailing lists for | |
426 them and log members. We have a slight preference that you use it. | |
427 If this is OK with you, I can get you clued in. | |
428 </p> | |
429 <p>Things are changing! A few years ago, when Daniel Fekete and I | |
430 asked for a mailing list for GNU localization, nested at the FSF, we | |
431 were politely invited to organize it anywhere else, and so did we. | |
432 For communicating with my pretesters, I later made a handful of | |
433 mailing lists located at iro.umontreal.ca and administrated by | |
434 <code>majordomo</code>. These lists have been <em>very</em> dependable | |
435 so far… | |
436 </p> | |
437 <p>I suspect that the German team will organize itself a mailing list | |
438 located in Germany, and so forth for other countries. But before they | |
439 organize for true, it could surely be useful to offer mailing lists | |
440 located at the FSF to each national team. So yes, please explain me | |
441 how I should proceed to create and handle them. | |
442 </p> | |
443 <p>We should create temporary mailing lists, one per country, to help | |
444 people organize. Temporary, because once regrouped and structured, it | |
445 would be fair the volunteers from country bring back <em>their</em> list | |
446 in there and manage it as they want. My feeling is that, in the long | |
447 run, each team should run its own list, from within their country. | |
448 There also should be some central list to which all teams could | |
449 subscribe as they see fit, as long as each team is represented in it. | |
450 </p> | |
451 | |
452 <a name="Information-Flow"></a> | |
453 <a name="SEC227"></a> | |
454 <h2 class="section"> <a href="gettext_toc.html#TOC220">12.5 Information Flow</a> </h2> | |
455 | |
456 <p><strong> NOTE: </strong> This documentation section is outdated and needs to be | |
457 revised. | |
458 </p> | |
459 <p>There will surely be some discussion about this messages after the | |
460 packages are finally released. If people now send you some proposals | |
461 for better messages, how do you proceed? Jim, please note that | |
462 right now, as I put forward nearly a dozen of localizable programs, I | |
463 receive both the translations and the coordination concerns about them. | |
464 </p> | |
465 <p>If I put one of my things to pretest, Ulrich receives the announcement | |
466 and passes it on to the German team, who make last minute revisions. | |
467 Then he submits the translation files to me <em>as the maintainer</em>. | |
468 For free packages I do not maintain, I would not even hear about it. | |
469 This scheme could be made to work for the whole Translation Project, | |
470 I think. For security reasons, maybe Ulrich (national coordinators, | |
471 in fact) should update central registry kept at the Translation Project | |
472 (Jim, me, or Len's recruits) once in a while. | |
473 </p> | |
474 <p>In December/January, I was aggressively ready to internationalize | |
475 all of GNU, giving myself the duty of one small GNU package per week | |
476 or so, taking many weeks or months for bigger packages. But it does | |
477 not work this way. I first did all the things I'm responsible for. | |
478 I've nothing against some missionary work on other maintainers, but | |
479 I'm also losing a lot of energy over it—same debates over again. | |
480 </p> | |
481 <p>And when the first localized packages are released we'll get a lot of | |
482 responses about ugly translations :-). Surely, and we need to have | |
483 beforehand a fairly good idea about how to handle the information | |
484 flow between the national teams and the package maintainers. | |
485 </p> | |
486 <p>Please start saving somewhere a quick history of each PO file. I know | |
487 for sure that the file format will change, allowing for comments. | |
488 It would be nice that each file has a kind of log, and references for | |
489 those who want to submit comments or gripes, or otherwise contribute. | |
490 I sent a proposal for a fast and flexible format, but it is not | |
491 receiving acceptance yet by the GNU deciders. I'll tell you when I | |
492 have more information about this. | |
493 </p> | |
494 | |
495 <a name="Translating-plural-forms"></a> | |
496 <a name="SEC228"></a> | |
497 <h2 class="section"> <a href="gettext_toc.html#TOC221">12.6 Translating plural forms</a> </h2> | |
498 | |
499 <p>Suppose you are translating a PO file, and it contains an entry like this: | |
500 </p> | |
501 <table><tr><td> </td><td><pre class="smallexample">#, c-format | |
502 msgid "One file removed" | |
503 msgid_plural "%d files removed" | |
504 msgstr[0] "" | |
505 msgstr[1] "" | |
506 </pre></td></tr></table> | |
507 | |
508 <p>What does this mean? How do you fill it in? | |
509 </p> | |
510 <p>Such an entry denotes a message with plural forms, that is, a message where | |
511 the text depends on a cardinal number. The general form of the message, | |
512 in English, is the <code>msgid_plural</code> line. The <code>msgid</code> line is the | |
513 English singular form, that is, the form for when the number is equal to 1. | |
514 More details about plural forms are explained in <a href="gettext_11.html#SEC207">Additional functions for plural forms</a>. | |
515 </p> | |
516 <p>The first thing you need to look at is the <code>Plural-Forms</code> line in the | |
517 header entry of the PO file. It contains the number of plural forms and a | |
518 formula. If the PO file does not yet have such a line, you have to add it. | |
519 It only depends on the language into which you are translating. You can | |
520 get this info by using the <code>msginit</code> command (see <a href="gettext_6.html#SEC45">Creating a New PO File</a>) – | |
521 it contains a database of known plural formulas – or by asking other | |
522 members of your translation team. | |
523 </p> | |
524 <p>Suppose the line looks as follows: | |
525 </p> | |
526 <table><tr><td> </td><td><pre class="smallexample">"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" | |
527 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" | |
528 </pre></td></tr></table> | |
529 | |
530 <p>It's logically one line; recall that the PO file formatting is allowed to | |
531 break long lines so that each physical line fits in 80 monospaced columns. | |
532 </p> | |
533 <p>The value of <code>nplurals</code> here tells you that there are three plural | |
534 forms. The first thing you need to do is to ensure that the entry contains | |
535 an <code>msgstr</code> line for each of the forms: | |
536 </p> | |
537 <table><tr><td> </td><td><pre class="smallexample">#, c-format | |
538 msgid "One file removed" | |
539 msgid_plural "%d files removed" | |
540 msgstr[0] "" | |
541 msgstr[1] "" | |
542 msgstr[2] "" | |
543 </pre></td></tr></table> | |
544 | |
545 <p>Then translate the <code>msgid_plural</code> line and fill it in into each | |
546 <code>msgstr</code> line: | |
547 </p> | |
548 <table><tr><td> </td><td><pre class="smallexample">#, c-format | |
549 msgid "One file removed" | |
550 msgid_plural "%d files removed" | |
551 msgstr[0] "%d slika uklonjenih" | |
552 msgstr[1] "%d slika uklonjenih" | |
553 msgstr[2] "%d slika uklonjenih" | |
554 </pre></td></tr></table> | |
555 | |
556 <p>Now you can refine the translation so that it matches the plural form. | |
557 According to the formula above, <code>msgstr[0]</code> is used when the number | |
558 ends in 1 but does not end in 11; <code>msgstr[1]</code> is used when the number | |
559 ends in 2, 3, 4, but not in 12, 13, 14; and <code>msgstr[2]</code> is used in | |
560 all other cases. With this knowledge, you can refine the translations: | |
561 </p> | |
562 <table><tr><td> </td><td><pre class="smallexample">#, c-format | |
563 msgid "One file removed" | |
564 msgid_plural "%d files removed" | |
565 msgstr[0] "%d slika je uklonjena" | |
566 msgstr[1] "%d datoteke uklonjenih" | |
567 msgstr[2] "%d slika uklonjenih" | |
568 </pre></td></tr></table> | |
569 | |
570 <p>You noticed that in the English singular form (<code>msgid</code>) the number | |
571 placeholder could be omitted and replaced by the numeral word “one”. | |
572 Can you do this in your translation as well? | |
573 </p> | |
574 <table><tr><td> </td><td><pre class="smallexample">msgstr[0] "jednom datotekom je uklonjen" | |
575 </pre></td></tr></table> | |
576 | |
577 <p>Well, it depends on whether <code>msgstr[0]</code> applies only to the number 1, | |
578 or to other numbers as well. If, according to the plural formula, | |
579 <code>msgstr[0]</code> applies only to <code>n == 1</code>, then you can use the | |
580 specialized translation without the number placeholder. In our case, | |
581 however, <code>msgstr[0]</code> also applies to the numbers 21, 31, 41, etc., | |
582 and therefore you cannot omit the placeholder. | |
583 </p> | |
584 | |
585 <a name="Prioritizing-messages"></a> | |
586 <a name="SEC229"></a> | |
587 <h2 class="section"> <a href="gettext_toc.html#TOC222">12.7 Prioritizing messages: How to determine which messages to translate first</a> </h2> | |
588 | |
589 <p>A translator sometimes has only a limited amount of time per week to | |
590 spend on a package, and some packages have quite large message catalogs | |
591 (over 1000 messages). Therefore she wishes to translate the messages | |
592 first that are the most visible to the user, or that occur most frequently. | |
593 This section describes how to determine these "most urgent" messages. | |
594 It also applies to determine the "next most urgent" messages after the | |
595 message catalog has already been partially translated. | |
596 </p> | |
597 <p>In a first step, she uses the programs like a user would do. While she | |
598 does this, the GNU <code>gettext</code> library logs into a file the not yet | |
599 translated messages for which a translation was requested from the program. | |
600 </p> | |
601 <p>In a second step, she uses the PO mode to translate precisely this set | |
602 of messages. | |
603 </p> | |
604 <a name="IDX1089"></a> | |
605 <p>Here are more details. The GNU <code>libintl</code> library (but not the | |
606 corresponding functions in GNU <code>libc</code>) supports an environment variable | |
607 <code>GETTEXT_LOG_UNTRANSLATED</code>. The GNU <code>libintl</code> library will | |
608 log into this file the messages for which <code>gettext()</code> and related | |
609 functions couldn't find the translation. If the file doesn't exist, it | |
610 will be created as needed. On systems with GNU <code>libc</code> a shared library | |
611 ‘<samp>preloadable_libintl.so</samp>’ is provided that can be used with the ELF | |
612 ‘<samp>LD_PRELOAD</samp>’ mechanism. | |
613 </p> | |
614 <p>So, in the first step, the translator uses these commands on systems with | |
615 GNU <code>libc</code>: | |
616 </p> | |
617 <table><tr><td> </td><td><pre class="smallexample">$ LD_PRELOAD=/usr/local/lib/preloadable_libintl.so | |
618 $ export LD_PRELOAD | |
619 $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused | |
620 $ export GETTEXT_LOG_UNTRANSLATED | |
621 </pre></td></tr></table> | |
622 | |
623 <p>and these commands on other systems: | |
624 </p> | |
625 <table><tr><td> </td><td><pre class="smallexample">$ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused | |
626 $ export GETTEXT_LOG_UNTRANSLATED | |
627 </pre></td></tr></table> | |
628 | |
629 <p>Then she uses and peruses the programs. (It is a good and recommended | |
630 practice to use the programs for which you provide translations: it | |
631 gives you the needed context.) When done, she removes the environment | |
632 variables: | |
633 </p> | |
634 <table><tr><td> </td><td><pre class="smallexample">$ unset LD_PRELOAD | |
635 $ unset GETTEXT_LOG_UNTRANSLATED | |
636 </pre></td></tr></table> | |
637 | |
638 <p>The second step starts with removing duplicates: | |
639 </p> | |
640 <table><tr><td> </td><td><pre class="smallexample">$ msguniq $HOME/gettextlogused > missing.po | |
641 </pre></td></tr></table> | |
642 | |
643 <p>The result is a PO file, but needs some preprocessing before a PO file editor | |
644 can be used with it. First, it is a multi-domain PO file, containing | |
645 messages from many translation domains. Second, it lacks all translator | |
646 comments and source references. Here is how to get a list of the affected | |
647 translation domains: | |
648 </p> | |
649 <table><tr><td> </td><td><pre class="smallexample">$ sed -n -e 's,^domain "\(.*\)"$,\1,p' < missing.po | sort | uniq | |
650 </pre></td></tr></table> | |
651 | |
652 <p>Then the translator can handle the domains one by one. For simplicity, | |
653 let's use environment variables to denote the language, domain and source | |
654 package. | |
655 </p> | |
656 <table><tr><td> </td><td><pre class="smallexample">$ lang=nl # your language | |
657 $ domain=coreutils # the name of the domain to be handled | |
658 $ package=/usr/src/gnu/coreutils-4.5.4 # the package where it comes from | |
659 </pre></td></tr></table> | |
660 | |
661 <p>She takes the latest copy of ‘<tt>$lang.po</tt>’ from the Translation Project, | |
662 or from the package (in most cases, ‘<tt>$package/po/$lang.po</tt>’), or | |
663 creates a fresh one if she's the first translator (see <a href="gettext_6.html#SEC45">Creating a New PO File</a>). | |
664 She then uses the following commands to mark the not urgent messages as | |
665 "obsolete". (This doesn't mean that these messages - translated and | |
666 untranslated ones - will go away. It simply means that the PO file editor | |
667 will ignore them in the following editing session.) | |
668 </p> | |
669 <table><tr><td> </td><td><pre class="smallexample">$ msggrep --domain=$domain missing.po | grep -v '^domain' \ | |
670 > $domain-missing.po | |
671 $ msgattrib --set-obsolete --ignore-file $domain-missing.po $domain.$lang.po \ | |
672 > $domain.$lang-urgent.po | |
673 </pre></td></tr></table> | |
674 | |
675 <p>The she translates ‘<tt>$domain.$lang-urgent.po</tt>’ by use of a PO file editor | |
676 (see section <a href="gettext_8.html#SEC63">Editing PO Files</a>). | |
677 (FIXME: I don't know whether <code>KBabel</code> and <code>gtranslator</code> also | |
678 preserve obsolete messages, as they should.) | |
679 Finally she restores the not urgent messages (with their earlier | |
680 translations, for those which were already translated) through this command: | |
681 </p> | |
682 <table><tr><td> </td><td><pre class="smallexample">$ msgmerge --no-fuzzy-matching $domain.$lang-urgent.po $package/po/$domain.pot \ | |
683 > $domain.$lang.po | |
684 </pre></td></tr></table> | |
685 | |
686 <p>Then she can submit ‘<tt>$domain.$lang.po</tt>’ and proceed to the next domain. | |
687 </p> | |
688 | |
689 <table cellpadding="1" cellspacing="1" border="0"> | |
690 <tr><td valign="middle" align="left">[<a href="#SEC217" title="Beginning of this chapter or previous chapter"> << </a>]</td> | |
691 <td valign="middle" align="left">[<a href="gettext_13.html#SEC230" title="Next chapter"> >> </a>]</td> | |
692 <td valign="middle" align="left"> </td> | |
693 <td valign="middle" align="left"> </td> | |
694 <td valign="middle" align="left"> </td> | |
695 <td valign="middle" align="left"> </td> | |
696 <td valign="middle" align="left"> </td> | |
697 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td> | |
698 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td> | |
699 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td> | |
700 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td> | |
701 </tr></table> | |
702 <p> | |
703 <font size="-1"> | |
704 This document was generated by <em>Bruno Haible</em> on <em>February, 21 2024</em> using <a href="https://www.nongnu.org/texi2html/"><em>texi2html 1.78a</em></a>. | |
705 </font> | |
706 <br> | |
707 | |
708 </p> | |
709 </body> | |
710 </html> |