po-debconf-1.0.16+nmu2ubuntu1/0000775000000000000000000000000011712573434012713 5ustar po-debconf-1.0.16+nmu2ubuntu1/intltool-bin/0000775000000000000000000000000011712573434015325 5ustar po-debconf-1.0.16+nmu2ubuntu1/pot-header0000775000000000000000000000077211712075201014664 0ustar # # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans # # Developers do not need to manually edit POT or PO files. po-debconf-1.0.16+nmu2ubuntu1/po2debconf0000775000000000000000000002074111712075201014653 0ustar #! /bin/sh # po2debconf - merge translations into Debconf templates file # Copyright (C) 2002-2005 Denis Barbier # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # This script is part of po-debconf : ${PODEBCONF_LIB=/usr/share/intltool-debian} : ${PODEBCONF_ENCODINGS=/usr/share/po-debconf/encodings} # Prevent automatic conversion to UTF-8 by Perl unset LANGUAGE LANG LC_ALL LC_CTYPE # Default values dftencoding=utf8 dftformat=2 help= quiet=--quiet origfile= podir= outfile= encoding=$dftencoding format=$dftformat for option do if [ -n "$prev" ]; then eval "$prev=\$option" prev= shift continue fi optarg=`expr "x$option" : 'x[^=]*=\(.*\)'` case $option in -h | --h | --help ) help=1 shift ;; -v | --v | --verbose ) quiet= shift ;; -o | --o | --output ) prev=outfile shift ;; -o=* | --o=* | --output=* ) outfile=$optarg shift ;; --podir ) prev=podir shift ;; --podir=* ) podir=$optarg shift ;; -e | --e | --encoding ) prev=encoding shift ;; --e=* | --encoding=* ) encoding=$optarg shift ;; -E | --E | --alt-encoding ) encoding=popular shift ;; -u | --u | --utf8 ) # Obsolete encoding=utf8 shift ;; -n | --n | --no-utf8 ) # Obsoleted encoding=po shift ;; -O | --O | --old-format ) # Obsolete, use po/output file instead format=1 shift ;; -* ) echo "$0: unknown option: $option ...exiting" 1>&2 exit 1 ;; * ) break ;; esac done origfile=$1 fail=0 [ -n "$origfile" ] || fail=1 if [ "x$help" = x1 ] || [ "x$fail" = x1 ]; then cat <&2 Usage: po2debconf [options] master Options: -h, --help display this help message -v, --verbose enable verbose mode -o, --output=FILE specify output file (Default: stdout) -e, --encoding=STRING convert encoding, STRING is chosen between po: no conversion utf8: convert to UTF-8 popular: change encoding according to file map found in PODEBCONF_ENCODINGS environment variable (Default, map is $PODEBCONF_ENCODINGS) traditional: obsolete, replaced by popular --podir=DIR specify PO output directory (Default: /po) EOT exit $fail fi [ -f "$origfile" ] || { echo "ERROR: File $origfile does not exist ...exiting" 1>&2 exit 1 } utf8= case $encoding in po | PO ) encoding=po ;; pop* | POP* ) encoding=popular ;; trad* | TRAD* ) encoding=popular ;; utf8 | utf-8 | UTF8 | UTF-8 ) encoding=utf8 ;; * ) echo "ERROR: Wrong --encoding argument, must be po, popular or utf8 ...exiting" 1>&2 exit 1 ;; esac [ -n "$podir" ] || podir=`dirname $origfile`/po [ -d "$podir" ] || { echo "ERROR: Directory $podir does not exist ...exiting" 1>&2 exit 1 } # Override values when $podir/output file is found if [ -f "$podir/output" ]; then outputformat=`sed -e 1q "$podir/output" | awk '{printf "%s", $1}'` [ -n "$outputformat" ] && format=$outputformat outputencoding=`sed -e 1q "$podir/output" | awk '{printf "%s", $2}'` [ -n "$outputencoding" ] && encoding=$outputencoding fi # Test validity of $encoding and $format values case $encoding in po | popular | utf8 ) # Do nothing : ;; * ) # Invalid value, set default encoding echo "Warning:Invalid encoding: $encoding, set to '$dftencoding'" 1>&2 encoding=$dftencoding ;; esac case $format in 1 | 2 ) # Do nothing : ;; * ) # Invalid value, set default encoding echo "Warning:Invalid format: $format, set to '$dftformat'" 1>&2 format=$dftformat ;; esac [ "$encoding" = popular ] || format=2 [ "$encoding" = utf8 ] && utf8="-u" outdir= fake= is_tmp= tmpfile= cleanup() { rc=$? [ -n "$outdir" ] && [ -d "$outdir" ] && { rm -f "$outdir"/*.po rmdir "$outdir" } [ -n "$fake" ] && [ -L "$podir/$fake.po" ] && rm -f "$podir/$fake.po" [ -n "$is_tmp" ] && [ -f "$outfile" ] && rm -f "$outfile" [ -n "$tmpfile" ] && [ -f "$tmpfile" ] && rm -f "$tmpfile" exit $rc } trap 'cleanup' HUP INT QUIT BUS PIPE TERM if [ "$encoding" = popular ]; then [ -f "$PODEBCONF_ENCODINGS" ] || { echo "ERROR: File $PODEBCONF_ENCODINGS does not exist ...exiting" 1>&2 exit 1 } outdir=`mktemp -t -d po2debconf.XXXXXXXXXX` || { echo "ERROR: Unable to create temporary directory ...exiting" 1>&2 exit 1 } tmpfile=`mktemp -t po2debconf.XXXXXXXXXX` || { echo "ERROR: Unable to create temporary file ...exiting" 1>&2 exit 1 } for f in $podir/*.po do [ -f "$f" ] || continue l=`echo $f | sed -e 's/.*\///' -e 's/\.po$//'` encto=`grep "^$l[ ]" "$PODEBCONF_ENCODINGS" | sed -e "s/^$l[ ][ ]*//" -e 1q` if [ -n "$encto" ]; then [ -n "$quiet" ] || echo "Converting $f to $encto..." 1>&2 if msgconv -t "$encto" "$f" -o "$tmpfile" 2>/dev/null; then mv "$tmpfile" "$outdir/$l.po" else echo "Warning: msgconv failed when converting file $f to $encto ... file skipped" >&2 fi else echo "Warning: Unknown default encoding for $l, get it from $f" 1>&2 cat "$f" > "$outdir/$l.po" fi done podir=$outdir rm -f "$tmpfile" fi if [ "x$outfile" = 'x-' ] || [ -z "$outfile" ]; then outfile=`mktemp -t po2debconf.XXXXXXXXXX` || { echo "ERROR: Unable to create temporary file ...exiting" 1>&2 exit 1 } is_tmp=1 fi # Helps no.po -> nb.po transition if [ -r "$podir/no.po" ]; then if [ -r "$podir/nb.po" ]; then echo "Warning: Both no.po and nb.po files exist, please consider removing no.po" 1>&2 else echo "Warning: no.po is obsolete and should be renamed into nb.po" 1>&2 fi elif [ -r "$podir/nb.po" ]; then # nb.po was found, copy it to no.po to provide both -nb and -no # localized fields and thus ease no -> nb transition for Norwegian # speaking people. fake=no ln -s nb.po "$podir/no.po" fi $PODEBCONF_LIB/intltool-merge $quiet --rfc822deb-style $utf8 $podir $origfile $outfile 1>&2 || exit 1 if [ $format -le 1 ]; then tmpfile=`mktemp -t po2debconf.XXXXXXXXXX` || { echo "ERROR: Unable to create temporary file ...exiting" 1>&2 exit 1 } sed -e 's/^\([^ :]*\)\.[^ :]*:/\1:/' $outfile > $tmpfile && mv -f $tmpfile $outfile fi tmpfile=`mktemp -t po2debconf.XXXXXXXXXX` || { echo "ERROR: Unable to create temporary file ...exiting" 1>&2 exit 1 } sed -e 's/^DefaultChoice/Default/' $outfile > $tmpfile && mv -f $tmpfile $outfile [ -n "$is_tmp" ] && cat "$outfile" # Set $? to 0 : cleanup po-debconf-1.0.16+nmu2ubuntu1/COPYING0000775000000000000000000004310411712075201013740 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. po-debconf-1.0.16+nmu2ubuntu1/README-trans0000664000000000000000000001175111712075201014712 0ustar General notes for translators: 1. Before starting a translation, always check with your fellow translators on debian-l10n-@lists.debian.org (if such a list does exist) to make sure that noone is currently working on the same translation, and read current bugreports against the package you are going to translate to see if a translation has already been reported. 2. If you want to update a translation, please always contact the previous translator in order to prevent duplication of work. Mail addresses can be found in the PO file. 3. To start a new translation, copy the templates.pot file into .po, where is the ISO code of your language. Then specify in the first msgstr the charset used for translated strings, and also put any useful piece of information. 4. Any general text editor can be used to work on PO files, and there are some specific tools like gtranslator or kbabel which can be helpful if you are not familiar with PO files. Gettext documentation contains explanations about the PO file format, and you must read at least the 'Filling in the Header Entry' and 'The Format of PO Files' sections. 5. When you have finished your translation, always reread your file at least once to correct all meaning, spelling, grammar, typo and other mistakes. (Maybe your PO editor does include a spellchecker or a translation helper like acheck). Next run msgfmt -c -v -o /dev/null .po to check that your file is valid and will be integrated without trouble. Depending on your language team policy, you may also send your translation to your dedicated l10n list so that it gets reviewed. 6. When your translation is finished and valid, file a bugreport against the package being translated, severity minor. Tag your report with 'l10n' and 'patch' marks, add "[INTL:xx]" (where xx is the ISO code of your language) to the subject to help further searches, ask politely that your translation gets included, give maintainer instructions on what to do with this file (e.g. "Please copy the attachment into debian/po/cs.po") and do not forget to attach your translation. This step can be very easily performed with the reportbug utility. Notes specific to po-debconf: 1. The field name is displayed in comments before msgid. Default values are special for debconf, because when template type is 'Select' or 'Multiselect', they must *not* be translated, but their values may be changed (in rare curcumstances) to another string listed in the English Choices field. For this reason, developers should use DefaultChoice instead of Default in order to prevent confusion. THIS IS A PO-DEBCONF EXTENSION. In the generated templates file, Default will of course be printed, since debconf does not define this DefaultChoice field. 2. Because instructions for translators may be inserted by developers, you must ensure that the tool you are using is able to display (without corruption) these comments. See for instance instructions to handle language selection in the geneweb package. 3. Sometimes msgids are identical whereas msgstr could have different values. In order to make msgids unique, some special text can be inserted at the end of the string, more precisely any sequence of + a left square bracket: '[' + a space + zero or more occurences of any character except left square bracket, right square bracket and newline + a right square bracket: ']' at the end of string is removed from msgid strings. It also applies to msgstr strings, so that translators can insert an empty string. 4. Lines are wrapped by debconf, except when they begin with a space. Such lines are often used to format lists, but each frontend has its own limitations. It seems that such lines must not exceed 72 characters in order to be displayed reasonably well on all frontends. 5. The podebconf-display-po script (from po-debconf >= 0.8.3) is able to show your translation as it will be displayed by debconf at configuration time. Run podebconf-display-po -fdialog debian/po/.po to have a rough idea on how your translation will look like. But this only works for basic configuration files, rendering may be altered if complex operations (like heavy use of text substitution) are performed. Available debconf frontends (which can be selected by the -f flag) are listed in debconf(7). po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po_templates/0000775000000000000000000000000011712573434020655 5ustar po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po_templates/submit-po0000664000000000000000000000111111712075201022476 0ustar # Lines beginning with a number sign are comments, they are removed when # sending mails. If a line is composed of a # followed by a 'Name: Value' # pair, it is interpreted as a mail header field and is passed to your mail # transport agent. You can edit/add/remove those header fields. # # From: # Subject: PO translations for the package are outdated Package: Version: N/A Severity: wishlist Tags: l10n The following translations are outdated: Translators, please send your translations to this bugreport. Thanks in advance, po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po_templates/submit0000664000000000000000000000113111712075201022064 0ustar # Lines beginning with a number sign are comments, they are removed when # sending mails. If a line is composed of a # followed by a 'Name: Value' # pair, it is interpreted as a mail header field and is passed to your mail # transport agent. You can edit/add/remove those header fields. # # From: # Subject: debconf PO translations for the package are outdated Package: Version: N/A Severity: wishlist Tags: l10n The following debconf translations are outdated: Translators, please send your translations to this bugreport. Thanks in advance, po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po_templates/translators-po0000664000000000000000000000161511712075201023560 0ustar # Lines beginning with a number sign are comments, they are removed when # sending mails. If a line is composed of a # followed by a 'Name: Value' # pair, it is interpreted as a mail header field and is passed to your mail # transport agent. You can edit/add/remove those header fields. # # From: # Subject: : Please update the PO translation for the package # Reply-To: # # This mail will be sent to the following people: # (you can update email addresses, or remove lines. Only email addresses # with the check box checked will receive the message). Hi, You are noted as the last translator of the translation for . The English template has been changed, and now some messages are marked "fuzzy" in your translation or are missing. I would be grateful if you could take the time and update it. Thanks in advance, po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po_templates/call-po0000664000000000000000000000137211712075201022117 0ustar # Lines beginning with a number sign are comments, they are removed when # sending mails. If a line is composed of a # followed by a 'Name: Value' # pair, it is interpreted as a mail header field and is passed to your mail # transport agent. You can edit/add/remove those header fields. # # From: # Subject: : Please translate the package # Reply-To: Dear Debian I18N people, I would like to know if some of you would be interested in translating . already includes . So do not translate it to these languages (the translators will be contacted separately). If you have read so far, please find the POT file in attachment. Thanks in advance, po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po_templates/call0000664000000000000000000000141111712075201021475 0ustar # Lines beginning with a number sign are comments, they are removed when # sending mails. If a line is composed of a # followed by a 'Name: Value' # pair, it is interpreted as a mail header field and is passed to your mail # transport agent. You can edit/add/remove those header fields. # # From: # Subject: : Please translate debconf PO for the package # Reply-To: Dear Debian I18N people, I would like to know if some of you would be interested in translating . already includes . So do not translate it to these languages (the translators will be contacted separately). If you have read so far, please find the POT file in attachment. Thanks in advance, po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po_templates/translators0000664000000000000000000000163111712075201023142 0ustar # Lines beginning with a number sign are comments, they are removed when # sending mails. If a line is composed of a # followed by a 'Name: Value' # pair, it is interpreted as a mail header field and is passed to your mail # transport agent. You can edit/add/remove those header fields. # # From: # Subject: : Please update debconf PO translation for the package # Reply-To: # # This mail will be sent to the following people: # (you can update email addresses, or remove lines. Only email addresses # with the check box checked will receive the message). Hi, You are noted as the last translator of the debconf translation for . The English template has been changed, and now some messages are marked "fuzzy" in your translation or are missing. I would be grateful if you could take the time and update it. Thanks in advance, po-debconf-1.0.16+nmu2ubuntu1/Makefile0000664000000000000000000000171211712075201014341 0ustar prefix = /usr/local all: $(MAKE) -C doc $(MAKE) fix fix: debconf-gettextize debconf-updatepo po2debconf debconf-updatepo po2debconf: FORCE @sed \ -e 's@\(: \$${PODEBCONF_LIB=\)[^}]*}@\1$(prefix)/share/intltool-debian}@' \ -e 's@\(: \$${PODEBCONF_ENCODINGS=\)[^}]*}@\1$(prefix)/share/po-debconf/encodings}@' \ $@ > $@.tmp && mv $@.tmp $@ @chmod a+x $@ debconf-gettextize: FORCE @sed \ -e 's@\(\$$ENV{PODEBCONF_LIB} ||= \)[^;]*;@\1"$(prefix)/share/intltool-debian";@' \ -e 's@\(\$$ENV{PODEBCONF_ENCODINGS} ||= \)[^;]*;@\1"$(prefix)/share/po-debconf/encodings";@' \ -e 's@\(\$$ENV{PODEBCONF_HEADER} ||= \)[^;]*;@\1"$(prefix)/share/po-debconf/pot-header";@' \ $@ > $@.tmp && mv $@.tmp $@ @chmod a+x $@ reset: FORCE @$(MAKE) all prefix=/usr clean: @$(MAKE) -C doc clean -@rm -rf tests/tmp deb: fakeroot debian/rules clean dh_clean dpkg-buildpackage -rfakeroot -ICVS -I.cvsignore -I.scvsrc -I.git -I.gitignore .PHONY: FORCE fix reset po-debconf-1.0.16+nmu2ubuntu1/README0000664000000000000000000000013611712075201013560 0ustar Informations previously provided by this file are now shipped in the po-debconf(7) manpage. po-debconf-1.0.16+nmu2ubuntu1/podebconf-report-po0000775000000000000000000007710611712075201016525 0ustar #!/usr/bin/perl -w # podebconf-report-po, Send outdated debconf PO files to the last translator # Copyright (C) 2004-2006 Fabio Tranchitella # Denis Barbier # Copyright (C) 2007-2008 Nicolas François # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # ## Release information my $PROGRAM = "podebconf-report-po"; my $VERSION = "0.14"; ## Loaded modules, require libmail-sendmail-perl use strict; my $no_zlib = 0; eval q{use Compress::Zlib;}; if ($@) { $no_zlib = 1; eval q{ sub Compress::Zlib::memGzip { return shift; } }; } my $no_encode = 0; eval q{use Encode;}; if ($@) { $no_encode = 1; } use MIME::Base64; use MIME::QuotedPrint; use Getopt::Long; use POSIX; use File::Temp 'tempfile'; use Cwd 'abs_path'; ## Global variables my $CONF_ARG; if (-e $ENV{'HOME'}."/.podebconf-report-po.conf") { $CONF_ARG = $ENV{'HOME'}."/.podebconf-report-po.conf"; } my $NO_CONF; my $HELP_ARG = 0; my $VERSION_ARG = 0; my $VERBOSE_ARG; my $NO_VERBOSE; my $SUBMIT_ARG = 0; my $FORCE_ARG; my $NO_FORCE; my $CALL; my $CALL_WITH_TRANSLATORS; my $CALL_WITHOUT_TRANSLATORS; my $POTFILE = ""; my $LANGS = ""; my $LANGUAGETEAM_ARG; my $NO_LANGUAGETEAM; my $SMTP_ARG; my $TEMPLATE_ARG; my $TEMPLATE_CALL; my $TEMPLATE_TRANSLATORS; my $TEMPLATE_SUBMIT; my $NO_TEMPLATE; my $DEFAULT_ARG; my $NO_DEFAULT; my $PACKAGE_ARG = ""; my $SUMMARY_ARG; my $NO_SUMMARY; my $FROM_ARG; my $BTS_ARG = ""; my $DEADLINE_ARG; my $NO_DEADLINE; my $PODIR_ARG = ""; my $GZIP_ARG; my $NO_GZIP; my $UTF8; my $NO_UTF8; my $MBOX = ""; my $MUTT = 0; my @ADDLANGUAGETEAM = (); my $SEND_MESSAGE = 0; my $NOT_DEBCONF = 0; my @TOPDIRS = qw{../.. .. .}; my $PODIR = ''; my $EDITOR = '/usr/bin/sensible-editor'; ## Default subjects (used if the specified template does not contain a ## Subject field). my $SUBJECT_TRANSLATOR; my $SUBJECT_SUBMIT; my $SUBJECT_CALL; my $SUBJECT = ''; my $BODY = ''; # Warnings may be deleted from screen when entering editor, # so display them when it is closed. my $warn = ''; ## Handle options GetOptions ( "conf=s" => \$CONF_ARG, "noconf" => \$NO_CONF, "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "v|verbose" => \$VERBOSE_ARG, "noverbose" => \$NO_VERBOSE, "f|force" => \$FORCE_ARG, "noforce" => \$NO_FORCE, "podir=s" => \$PODIR_ARG, "smtp=s" => \$SMTP_ARG, "template=s" => \$TEMPLATE_ARG, "templatetranslators=s" => \$TEMPLATE_TRANSLATORS, "templatecall=s" => \$TEMPLATE_CALL, "templatesubmit=s" => \$TEMPLATE_SUBMIT, "notemplate" => \$NO_TEMPLATE, "default" => \$DEFAULT_ARG, "nodefault" => \$NO_DEFAULT, "gzip" => \$GZIP_ARG, "nogzip" => \$NO_GZIP, "langs=s" => \$LANGS, "languageteam" => \$LANGUAGETEAM_ARG, "nolanguageteam" => \$NO_LANGUAGETEAM, "addlanguageteam=s"=>\@ADDLANGUAGETEAM, "package=s" => \$PACKAGE_ARG, "deadline=s" => \$DEADLINE_ARG, "nodeadline" => \$NO_DEADLINE, "call:s" => \$CALL, "withtranslators" => \$CALL_WITH_TRANSLATORS, "withouttranslators" => \$CALL_WITHOUT_TRANSLATORS, "potfile=s" => \$POTFILE, "summary" => \$SUMMARY_ARG, "nosummary" => \$NO_SUMMARY, "from=s" => \$FROM_ARG, "bts=s" => \$BTS_ARG, "submit" => \$SUBMIT_ARG, "postpone=s" => \$MBOX, "mutt" => \$MUTT, "utf8" => \$UTF8, "noutf8" => \$NO_UTF8, "notdebconf" => \$NOT_DEBCONF, "sendmessage" => \$SEND_MESSAGE ) or &Help_InvalidOption; &Help_PrintVersion if $VERSION_ARG; &Help_PrintHelp if $HELP_ARG; eval q{use Mail::Sendmail;}; die "$PROGRAM: This program requires the libmail-sendmail-perl package.\n". "$PROGRAM: Aborting!\n" if $@; # Check invalid set of options if ($LANGUAGETEAM_ARG && defined $CALL && not $CALL_WITH_TRANSLATORS) { die "In the --call mode, the --languageteam option is only valid if --withtranslators is specified.\n"; } ## Try to locate the PO directory if ($PODIR_ARG eq "") { my $dir = getcwd; if ($NOT_DEBCONF) { if ($dir =~ m/\/po$/) { $PODIR = "."; } elsif (-d "$dir/po") { $PODIR = "po"; } } else { if ($dir =~ m/\/po$/) { $PODIR = "."; } elsif (-d "$dir/debian/po") { $PODIR = "debian/po"; } elsif (-d "$dir/po") { $PODIR = "po"; } } } else { $PODIR = $PODIR_ARG; } die "Directory po not found, exiting!\n" if $PODIR eq ""; die "Wrong argument: $PODIR is not a directory!\n" unless -d $PODIR; ## Try to detect if it is a debconf template translation unless ($NOT_DEBCONF) { my $dir = abs_path($PODIR); if ($dir =~ m/\/po$/ and $dir !~ m/\/debian\/po$/) { $NOT_DEBCONF = 1; } } ## Define the default subjects (if not set in the template) if ($NOT_DEBCONF) { $SUBJECT_TRANSLATOR = ": Please update the PO translation for the package "; $SUBJECT_SUBMIT = "PO translations for the package are outdated"; $SUBJECT_CALL = ": Please translate the package "; } else { $SUBJECT_TRANSLATOR = ": Please update debconf PO translation for the package "; $SUBJECT_SUBMIT = "debconf PO translations for the package are outdated"; $SUBJECT_CALL = ": Please translate debconf PO for the package "; } my $conf = ""; unless ($NO_CONF or !defined $CONF_ARG) { open (CNF, "< $CONF_ARG") or die ("Couldn't read $CONF_ARG: $!\nExiting!\n"); while () { $conf .= $_; } close(CNF) or die ("Couldn't close $CONF_ARG: $!\nExiting!\n"); $conf =~ s/^\s*#.*$//m; $conf =~ s/\s*$//m; } if ($conf =~ m/^smtp\s*(?:\s|=)\s*(.*)$/m) { $SMTP_ARG = $1; } elsif (!defined $SMTP_ARG) { $SMTP_ARG = ""; } if (defined $FROM_ARG) { # Use the from parameter from the command line } elsif ($conf =~ m/^from\s*(?:\s|=)\s*(.*)$/m) { $FROM_ARG = $1; } elsif (!defined $FROM_ARG) { # This part comes from devscripts' bts if ($ENV{'DEBEMAIL'} || $ENV{'EMAIL'}) { my ($email, $name); if (exists $ENV{'DEBFULLNAME'}) { $name = $ENV{'DEBFULLNAME'}; } if (exists $ENV{'DEBEMAIL'}) { $email = $ENV{'DEBEMAIL'}; if ($email =~ /^(.*?)\s+<(.*)>\s*$/) { $name ||= $1; $email = $2; } } if (exists $ENV{'EMAIL'}) { if ($ENV{'EMAIL'} =~ /^(.*?)\s+<(.*)>\s*$/) { $name ||= $1; $email ||= $2; } else { $email ||= $ENV{'EMAIL'}; } } if (! $name) { # Perhaps not ideal, but it will have to do $name = (getpwuid($<))[6]; $name =~ s/,.*//; } $FROM_ARG = $name ? "$name <$email>" : $email; } else { # We will try below to use the Maintainer: control field $FROM_ARG = ""; } } if (defined $NO_VERBOSE) { $VERBOSE_ARG = 0; } elsif ($conf =~ m/^verbose$/m) { $VERBOSE_ARG = 1; } elsif (!defined $VERBOSE_ARG) { $VERBOSE_ARG = 0; } if (defined $NO_FORCE) { $FORCE_ARG = 0; } elsif ($conf =~ m/^force$/m) { $FORCE_ARG = 1; } elsif (!defined $FORCE_ARG) { $FORCE_ARG = 0; } if (defined $NO_TEMPLATE) { $TEMPLATE_ARG = ""; } elsif ($conf =~ m/^template\s*(?:\s|=)\s*(.*)$/m) { $TEMPLATE_ARG = $1; } elsif (!defined $TEMPLATE_ARG) { $TEMPLATE_ARG = ""; } if (defined $TEMPLATE_TRANSLATORS) { # Command line has the highest priority } elsif ($conf =~ m/^templatetranslators\s*(?:\s|=)\s*(.*)$/m) { $TEMPLATE_TRANSLATORS = $1; } else { if ($NOT_DEBCONF) { $TEMPLATE_TRANSLATORS ="/usr/share/po-debconf/templates/translators-po"; } else { $TEMPLATE_TRANSLATORS ="/usr/share/po-debconf/templates/translators"; } } if (defined $TEMPLATE_SUBMIT) { # Command line has the highest priority } elsif ($conf =~ m/^templatesubmit\s*(?:\s|=)\s*(.*)$/m) { $TEMPLATE_SUBMIT = $1; } else { $TEMPLATE_SUBMIT ="/usr/share/po-debconf/templates/submit"; } if (defined $TEMPLATE_CALL) { # Command line has the highest priority } elsif ($conf =~ m/^templatecall\s*(?:\s|=)\s*(.*)$/m) { $TEMPLATE_CALL = $1; } else { if ($NOT_DEBCONF) { $TEMPLATE_CALL ="/usr/share/po-debconf/templates/call-po"; } else { $TEMPLATE_CALL ="/usr/share/po-debconf/templates/call"; } } if ($TEMPLATE_ARG ne "") { $TEMPLATE_TRANSLATORS = $TEMPLATE_ARG; $TEMPLATE_SUBMIT = $TEMPLATE_ARG; $TEMPLATE_CALL = $TEMPLATE_ARG; } if (defined $NO_DEFAULT) { $DEFAULT_ARG = 0; } elsif ($conf =~ m/^default$/m) { $DEFAULT_ARG = 1; } elsif (!defined $DEFAULT_ARG) { $DEFAULT_ARG = 0; } if (defined $NO_GZIP) { $GZIP_ARG = 0; } elsif ($conf =~ m/^nogzip$/m) { $GZIP_ARG = 1; } elsif (!defined $GZIP_ARG) { $GZIP_ARG = 0; } if (defined $NO_DEADLINE) { undef $DEADLINE_ARG; } elsif (defined $DEADLINE_ARG) { # Use the specified deadline } elsif ($conf =~ m/^nodeadline$/m) { undef $DEADLINE_ARG; } elsif ($conf =~ m/^deadline\s*(?:\s|=)\s*(.*)$/m) { $DEADLINE_ARG = $1; } else { print " You should specify a deadline to help translators organize their work. This deadline is usually the date you are planning to make the next release (or the day before). Deadline? [+10days] "; chomp($DEADLINE_ARG = ); # The default deadline is +10days if ($DEADLINE_ARG eq "") { $DEADLINE_ARG = "+10days"; } } if (defined $NO_LANGUAGETEAM) { $LANGUAGETEAM_ARG = 0; } elsif (defined $LANGUAGETEAM_ARG) { $LANGUAGETEAM_ARG = 1; } elsif ($conf =~ m/^languageteam$/m) { $LANGUAGETEAM_ARG = 1; } elsif ($conf =~ m/^nolanguageteam$/m) { $LANGUAGETEAM_ARG = 0; } else { $LANGUAGETEAM_ARG = 1; } while ($conf =~ m/^addlanguageteam\s*(?:\s|=)\s*(.*)$/gm) { push @ADDLANGUAGETEAM, $1; } if (defined $NO_SUMMARY) { $SUMMARY_ARG = 0; } elsif ($conf =~ m/^summary$/m) { $SUMMARY_ARG = 1; } elsif (!defined $SUMMARY_ARG) { $SUMMARY_ARG = 0; } if (defined $NO_UTF8) { $UTF8 = 0; } elsif ($conf =~ m/^utf8$/m) { $UTF8 = 1; } elsif (!defined $UTF8) { $UTF8 = 0; } if (defined $CALL_WITHOUT_TRANSLATORS) { $CALL_WITH_TRANSLATORS = 0; } elsif (defined $CALL_WITH_TRANSLATORS) { $CALL_WITH_TRANSLATORS = 1; } elsif ($conf =~ m/^withtranslators$/m) { $CALL_WITH_TRANSLATORS = 1; } elsif ($conf =~ m/^withouttranslators$/m) { $CALL_WITH_TRANSLATORS = 0; } else { # The default. (it will be removed when not in --call mode) $CALL_WITH_TRANSLATORS = 1; } # Disable --withtranslators if no call for translations are requested with # --call. $CALL_WITH_TRANSLATORS = 0 unless defined $CALL; if ($no_encode and $UTF8) { $warn .= "--utf8 requires the Encode perl module. ". "Turning this option off.\n"; $UTF8 = 0; } if ($MUTT) { $MBOX = qx/mutt -Q postponed/; if ($MBOX =~ m/^postponed="(.*)"$/) { $MBOX = $1; } else { $MBOX = $ENV{'HOME'}."/postponed"; warn "Could not find mutt's postpone mailbox with ". " 'mutt -Q postponed'. Using $MBOX."; } } ## Try to find default editor $EDITOR = $ENV{'EDITOR'} if exists($ENV{'EDITOR'}); $EDITOR = $ENV{'VISUAL'} if exists($ENV{'VISUAL'}); if ($no_zlib && $GZIP_ARG) { $warn .= "Warning: This program requires the libcompress-zlib-perl package in order\n". " to support the --gzip flag, but it is not installed.\n". " PO files will not be compressed!\n\n"; $GZIP_ARG = 0; } if ($POTFILE eq "") { opendir(DIR, $PODIR); foreach my $potFile (grep(/\.pot$/, readdir(DIR))) { if (length $POTFILE) { die "Too many pot file found.\n". "Please specify one with the --potfile option.\n"; } $POTFILE = $potFile; } closedir(DIR); opendir(DIR, $PODIR); if (length $POTFILE) { print "Using $POTFILE for the call for translation\n"; } else { warn "No POT file found. You should specify one with the ". "--potfile option, or specify in the mail how to ". "retrieve it." } closedir(DIR); } ## Try to find the maintainer e-mail address and the package name # Package version my $PKG_VERSION = "N/A"; # Expanded into " " if version is found, otherwise my $PACKAGE_AND_VERSION = ""; if ($PACKAGE_ARG =~ s/_(.*)//) { $PKG_VERSION = $1; } if ($PACKAGE_ARG eq "" or $FROM_ARG eq "") { my $CONTROL = ''; foreach my $d (@TOPDIRS) { $CONTROL = "$d/debian/control" if (-f "$d/debian/control"); } if ($CONTROL eq '') { foreach my $d (@TOPDIRS) { $CONTROL = "$d/debian/control.in" if (-f "$d/debian/control.in"); } } if (-f $CONTROL) { ## Only read the first stanza local $/ = "\n\n"; open (CNTRL, "< $CONTROL") or die "Unable to read $CONTROL: $!\n"; my $text = ; close (CNTRL) or die "Unable to close $CONTROL: $!\n"; if ($PACKAGE_ARG eq "" && $text =~ m/^Source: (.*)/m) { $PACKAGE_ARG = $1; } if ($FROM_ARG eq "" && $text =~ m/^Maintainer: (.*)/m) { $FROM_ARG = $1; } } } if ($PKG_VERSION eq "N/A") { my $CHANGELOG = ''; foreach my $d (@TOPDIRS) { $CHANGELOG = "$d/debian/changelog" if (-f "$d/debian/changelog"); } if (-f $CHANGELOG) { # Version information is not vital, do not abort # if it cannot be retrieved. if (open (CHG, "< $CHANGELOG")) { while () { if (m/^$PACKAGE_ARG\s+\((.*)\)\s/) { $PKG_VERSION = $1; } last if m/^ --/; } } close (CHG); } } if ($PKG_VERSION eq 'N/A' and $PACKAGE_ARG eq '') { # Try to read the PACKAGEand VERSION from the .pot file Verbose("PODIR: $PODIR"); Verbose("POTFILE: $POTFILE"); my $content = &ReadFile($PODIR . "/" . $POTFILE); $content =~ m/\n"Project-Id-Version:\s*([^"]*)\s*\\n"\n/i; my $package_and_version = $1; if ($package_and_version =~ m/^(.+)\s+(.+?)$/i) { $PACKAGE_ARG = $1; $PKG_VERSION = $2; } else { $PACKAGE_ARG = $package_and_version; } } $PACKAGE_AND_VERSION = $PACKAGE_ARG . ($PKG_VERSION ne 'N/A' ? " ".$PKG_VERSION : ""); Verbose("Package: $PACKAGE_ARG"); Verbose("Version: $PKG_VERSION"); Verbose("Maintainer: $FROM_ARG"); # If the specified deadline starts with a '+', it is an offset from now. if ($DEADLINE_ARG =~ m/^\+/) { my $cmd = "LC_ALL=C date -R -d \"$DEADLINE_ARG\""; $DEADLINE_ARG = qx/$cmd/; if ($? != 0) { die "podebconf-report-po: failed to execute '$cmd': $!.\n"; } chomp $DEADLINE_ARG; } if ($DEADLINE_ARG ne "") { $DEADLINE_ARG = "\n\nThe deadline for receiving the updated translation is\n$DEADLINE_ARG."; } my $REPLY = ''; if ($BTS_ARG =~ m/^\d+$/) { $BTS_ARG .= "\@bugs.debian.org"; $REPLY = "Please respect the Reply-To: field and send your updated translation to\n$BTS_ARG."; } else { $REPLY = "Please send the updated file to me, or submit it as a wishlist bug\nagainst ."; } PREPARE_MAIL: if ($SUBMIT_ARG) { $BODY = &ReadFile($TEMPLATE_SUBMIT); $SUBJECT = $SUBJECT_SUBMIT; } elsif (defined $CALL) { $CALL="Debian Internationalization " unless length $CALL; $BODY = &ReadFile($TEMPLATE_CALL); $SUBJECT = $SUBJECT_CALL; } else { $CALL=""; $BODY = &ReadFile($TEMPLATE_TRANSLATORS); $SUBJECT = $SUBJECT_TRANSLATOR; } ## Apply the values to the subject and to the body of the message $SUBJECT =~ s//$PACKAGE_ARG/g; $SUBJECT =~ s//$PKG_VERSION/g; $SUBJECT =~ s//$PACKAGE_AND_VERSION/g; ## Check every file with .po extension in $PODIR ... Verbose("Checking for PO files in $PODIR"); opendir(DIR, $PODIR); my $poFiles = {}; my $statistics = "language translated fuzzy untranslated\n". "-----------------------------------------------------\n"; if (defined $CALL and length $CALL) { foreach my $poFile (grep(/\.po$/, sort readdir(DIR))) { $poFiles->{$poFile} = {}; my $cmd = "LC_ALL=C /usr/bin/msgfmt -o /dev/null --stat $PODIR/$poFile 2>&1"; my $stats = qx/$cmd/; chomp $stats; my ($t, $f, $u) = ("", "", ""); my $lang = $poFile; $lang =~ s/\.po$//; if ($stats =~ s/^([0-9]+) translated message[s ,]*//) { $t = $1; } if ($stats =~ s/^([0-9]+) fuzzy translation[s ,]*//) { $f = $1; } if ($stats =~ s/^([0-9]+) untranslated message[s ,]*//) { $u = $1; } $statistics .= sprintf(" %-10s%10s %10s %10s\n", $lang, $t, $f, $u); } } else { foreach my $poFile (grep(/\.po$/, readdir(DIR))) { local $/ = "\n\n"; $poFiles->{$poFile} = {}; my $outdated = 0; my $found_header = 0; open (PO, "< $PODIR/$poFile") or die "Unable to read $PODIR/$poFile: $!\n"; while () { if ($found_header == 0 && m/msgid ""\nmsgstr/s) { $found_header = 1; # Concatenate lines s/"\n"//g; if (m/\\nLast-Translator: (.*?)\\n/ && $1 ne 'FULL NAME ') { $poFiles->{$poFile}->{translator} = $1; } else { $warn .= "Warning: $poFile: Unable to determine last translator. Skipping file!\n"; last; } if (m/\\nContent-Type: [^;]*; charset=(.*?)\\n/) { $poFiles->{$poFile}->{charset} = $1; } else { $warn .= "Warning: $poFile: Unable to determine charset. Skipping file!\n"; last; } if ($LANGUAGETEAM_ARG && m/\\nLanguage-Team: (.*?)\\n/) { $poFiles->{$poFile}->{team} = $1 if $1 ne 'LANGUAGE '; } my $lang = $poFile; $lang =~ s/\.po$//; if ($LANGUAGETEAM_ARG) { foreach my $lang_list (@ADDLANGUAGETEAM) { next unless ($lang_list =~ m/^$lang:(.*)$/); my $list = $1; my $list_addr = $1; $list_addr =~ s/^.*?<([^<>]*)>.*?$/$1/; $poFiles->{$poFile}->{team} = "" unless (defined $poFiles->{$poFile}->{team}); next if ($poFiles->{$poFile}->{team} =~ m/(^|<)\Q$list_addr\E(>|$)/); if (length $poFiles->{$poFile}->{team}) { $poFiles->{$poFile}->{team} .= ", "; } $poFiles->{$poFile}->{team} .= $list; } } next; } # Ignore outdated msgids next unless m/^msgid /m; # Check for fuzzy or missing translations s/\n+$//s; if (m/^#, .*fuzzy/m or m/\nmsgstr ""$/s) { $outdated = 1; last; } } if ($UTF8) { Encode::from_to($poFiles->{$poFile}->{translator}, $poFiles->{$poFile}->{charset}, "UTF-8"); Encode::from_to($poFiles->{$poFile}->{team}, $poFiles->{$poFile}->{charset}, "UTF-8"); } close (PO) or die "Unable to close $PODIR/$poFile: $!\n"; delete $poFiles->{$poFile} unless $outdated; } closedir(DIR); if (keys %$poFiles) { print "Outdated files: ".join(' ', keys %$poFiles)."\n"; } else { print "No outdated files\n"; exit(0); } } my %langs=(); foreach (split(",", $LANGS)) { $langs{$_.".po"} = 1; } my $filelist = ''; if ($SUBMIT_ARG or length $CALL) { $filelist = join(' ', sort keys %$poFiles)."\n"; } else { # Try to detect invalid emails. # This is very frequent for language teams. my $warn_invalid_email = 0; foreach my $poFile (sort keys %$poFiles) { if ($poFiles->{$poFile}->{translator} !~ /^(.*<)?[^@]+@[^@]+\.[A-Za-z]{2,4}>?$/) { $warn_invalid_email = 1; last; } if (defined($poFiles->{$poFile}->{team}) and $poFiles->{$poFile}->{team} !~ /^(.*<)?[^@]+@[^@]+\.[A-Za-z]{2,4}>?$/) { $warn_invalid_email = 1; last; } } if ($warn_invalid_email) { $filelist .= "#\n" ."# WARNING: Some email addresses seem to be invalid.\n" ."# You should remove them and inform the translators separately.\n" ."#\n"; } # Add the list of PO files. foreach my $poFile (sort keys %$poFiles) { $filelist .= '### '; $filelist .= '[' .((!%langs or $langs{$poFile})?'*':' '). '] '; $filelist .= $poFile . ': ' . $poFiles->{$poFile}->{translator}; $filelist .= ', ' . $poFiles->{$poFile}->{team} if defined($poFiles->{$poFile}->{team}); $filelist .= "\n"; } # Remove non-ASCII characters $filelist = DropNonASCII($filelist) unless ($UTF8); } $filelist =~ s/\n$//s; my %headers = (); OPEN_EDITOR: ReplaceTags(); $BODY = &OpenEditor($EDITOR, $BODY) if not $DEFAULT_ARG; ReplaceTags(); %headers = &ParseHeaders($BODY); my %To = &ParseTo($BODY); print STDERR $warn if $warn ne ''; my @mails = (); if ($SUBMIT_ARG) { my %mail = ( From => $FROM_ARG, To => "maintonly\@bugs.debian.org", Subject => $SUBJECT, 'X-Mail-Originator' => "$PROGRAM $VERSION" ); $mail{body} = encode_qp(&RemoveHeaders($BODY)); @mails = (\%mail); } elsif (length $CALL) { my %mail = ( From => $FROM_ARG, To => $CALL, Subject => $SUBJECT, 'X-Mail-Originator' => "$PROGRAM $VERSION" ); my $ext = ($GZIP_ARG ? '.gz' : ''); my $file = $POTFILE; my $content = &ReadFile($PODIR . "/" . $file); $content = Compress::Zlib::memGzip($content) if $GZIP_ARG; my $file_encoded = encode_base64($content); my $contentType = ($GZIP_ARG ? "application/octet-stream": "text/x-gettext; name=\"$file\"; charset=\"US-ASCII\""); my $boundary = "=" . time() . "="; $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; my $charset = $UTF8?"utf-8":"us-ascii"; my $body = &RemoveHeaders($BODY); $mail{body} = <<_EOF_; --$boundary Content-Type: text/plain; charset="$charset" Content-Transfer-Encoding: quoted-printable $body _EOF_ if ($SEND_MESSAGE) { $mail{body} .= <<_EOF_; --$boundary-- _EOF_ } else { $mail{body} .= <<_EOF_; --$boundary Content-Type: $contentType Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="$file$ext" $file_encoded --$boundary-- _EOF_ } @mails = (\%mail); } else { my $body = encode_qp(&RemoveHeaders($BODY)); my $ext = ($GZIP_ARG ? '.gz' : ''); foreach my $file (keys %$poFiles) { if (defined $To{$file}) { my $content = &ReadFile($PODIR . "/" . $file); $content = Compress::Zlib::memGzip($content) if $GZIP_ARG; my $file_encoded = encode_base64($content); my $contentType = ($GZIP_ARG ? "application/octet-stream" : "text/x-gettext; name=\"$file\"; charset=\"$poFiles->{$file}->{charset}\""); my %mail = ( From => $FROM_ARG, To => $To{$file}, Subject => $SUBJECT, 'X-Mail-Originator' => "$PROGRAM $VERSION" ); my $boundary = "=" . time() . "="; $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; my $charset = $UTF8?"utf-8":"us-ascii"; $mail{body} = <<_EOF_; --$boundary Content-Type: text/plain; charset="$charset" Content-Transfer-Encoding: quoted-printable $body _EOF_ if ($SEND_MESSAGE) { $mail{body} .= <<_EOF_; --$boundary-- _EOF_ } else { $mail{body} .= <<_EOF_; --$boundary Content-Type: $contentType Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="$file$ext" $file_encoded --$boundary-- _EOF_ } push(@mails, \%mail); } } } # Add mail headers and remove non-ASCII characters foreach my $refmail (@mails) { foreach my $h (keys(%headers)) { if ($UTF8) { $refmail->{$h} = encode_qp($headers{$h}, ""); $refmail->{$h} =~ s/=$//m; $refmail->{$h} =~ s/(\S*=\S*)/=?utf-8?Q?$1?=/g; } else { $refmail->{$h} = &DropNonASCII($headers{$h}); } } foreach my $h (qw(From To Subject)) { if ($UTF8) { unless ($refmail->{$h} =~ m/=\?utf-8\?Q\?/) { $refmail->{$h} = encode_qp($refmail->{$h}, ""); $refmail->{$h} =~ s/=$//m; $refmail->{$h} =~ s/(\S*=\S*)/=?utf-8?Q?$1?=/g; } } else { $refmail->{$h} = &DropNonASCII($refmail->{$h}); } } $refmail->{smtp} = $SMTP_ARG if ($SMTP_ARG ne ''); } if (!$FORCE_ARG) { my $answers = ($DEFAULT_ARG)?"[y/N/?]":"[y/N/e/?]"; my $with_mutt = ""; $with_mutt = " (with mutt)" if $MUTT; QUESTION: if ($SUBMIT_ARG) { print "Ready to send$with_mutt the bug report against the package $PACKAGE_ARG, are you sure? $answers "; } elsif (length $CALL) { print "Ready to send$with_mutt the call for translation to $CALL, are you sure? $answers "; } else { print "Ready to send$with_mutt the emails, are you sure? $answers "; } my $line = <>; chop $line; if ($line eq "e" or $line eq "E") { goto OPEN_EDITOR unless ($DEFAULT_ARG); } elsif ($line eq "?") { print "y send the mail(s).\n". "? display this help message.\n". ($DEFAULT_ARG?"":"e reopen the editor.\n"). "N exit, without sending mails.\n"; goto QUESTION; } exit(0) if ($line ne "Y" and $line ne "y"); } # Make Perl compiler quiet print $Mail::Sendmail::error . $Mail::Sendmail::error if 0; foreach my $mail (@mails) { if (defined $MBOX and length $MBOX) { Postpone($mail); } else { sendmail(%{$mail}) or print "Couldn't send the email: $Mail::Sendmail::error\n"; } } if ($SUMMARY_ARG and not $CALL) { my %summary = ( From => $FROM_ARG, To => $FROM_ARG, Subject => $SUBJECT, 'X-Mail-Originator' => "$PROGRAM $VERSION" ); $summary{body} = "List of outdated files:\n"; foreach my $poFile (sort keys %$poFiles) { $summary{body} .= ' ' . $poFile . ': ' . $poFiles->{$poFile}->{translator}; $summary{body} .= ', ' . $poFiles->{$poFile}->{team} if defined($poFiles->{$poFile}->{team}); $summary{body} .= "\n"; } $summary{body} .= "Translators received the mail below.\n\n"; $summary{body} .= encode_qp(&RemoveHeaders($BODY)); if (defined $MBOX and length $MBOX) { Postpone(\%summary); } else { sendmail(%summary) or print "Couldn't send the email: $Mail::Sendmail::error\n"; } } if ($MUTT) { if (system("mutt -p") >> 8 != 0) { die "Problem running mutt -p: $!\n"; } } if ($CALL_WITH_TRANSLATORS) { print "Now, prepare the mail for translators..."; undef $CALL; undef $CALL_WITH_TRANSLATORS; goto PREPARE_MAIL; } exit(0); ############################################################################### sub ReplaceTags { $BODY =~ s//$REPLY/g; $BODY =~ s//$BTS_ARG/g; $BODY =~ s/\n# Reply-To: \n/\n/; $BODY =~ s//$SUBJECT/g; $BODY =~ s//$PACKAGE_ARG/g if ($PACKAGE_ARG ne ''); $BODY =~ s//$PKG_VERSION/g if ($PKG_VERSION ne ''); $BODY =~ s//$PACKAGE_AND_VERSION/g if ($PACKAGE_AND_VERSION ne ''); $BODY =~ s//$FROM_ARG/g; $BODY =~ s/\n/$DEADLINE_ARG/g; $BODY =~ s/\n/$statistics/g; $BODY =~ s//$filelist/g; } sub OpenEditor { my $editor = shift; my $body = shift; my $opts = ""; my ($fh, $tmpnam) = tempfile("podebconf-report-po.mail.tmp.XXXXXX", UNLINK => 0, TMPDIR => 1); print $fh $body; close($fh) or die ("Couldn't close $tmpnam: $!\nExiting!\n"); $opts = "-f" if ($editor eq "vim"); system("$editor $opts $tmpnam"); $body = &ReadFile($tmpnam) if (-f $tmpnam); unlink($tmpnam); return $body; } sub ParseHeaders { my $body = shift; my %headers = (); while ($body =~ s/^#[ \t]*([^\n]*)\n//s) { my $comment = $1; if ($comment =~ m/^([a-zA-Z0-9_-]+):\s*([^\n]+)$/) { $headers{$1} = $2; } } return %headers; } sub ParseTo { my $body = shift; my %To = (); while ($body =~ s/^#[ \t]*([^\n]*)\n//s) { my $comment = $1; if ($comment =~ s/^##[ \t]*\[(?:\*|x|X)\][ \t]*([^:]*):[ \t]*([^\n]*)$//s) { $To{$1} = $2; } } return %To; } sub RemoveHeaders { my $body = shift; # First remove comments 1 while $body =~ s/^#[^\n]*\n//s; # Optional empty lines $body =~ s/^\s+//s; return $body; } sub DropNonASCII { my $text = shift; $text =~ s/[\x80-\xff]/?/g; return $text; } sub ReadFile { my $file = shift; local $/ = undef; open(FILE, "< $file") or die ("Couldn't read $file: $!\nExiting!\n"); my $body = ; close(FILE) or die ("Couldn't close $file: $!\nExiting!\n"); return $body; } ## Handle invalid arguments sub Help_InvalidOption { print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit 1; } ## Print the usage message and exit sub Help_PrintHelp { print <<_EOF_; Usage: ${PROGRAM} [OPTIONS] Send outdated debconf PO files to the last translators. Options: --addlanguageteam=LANG:LIST Send a copy of the messages for language LANG also to the LIST (unless it is already the language team). --bts=BUGNUMBER specify the Debian bug number to set as reply-to --call[=LIST] send a call for translations to the LIST (or to the Debian I18N mailing list by default --conf --noconf --deadline=DEADLINE specify the deadline for receiving the updated translations --default don't open the editor and use the template as is --nodefault -f, --force send the email without confirmation --noforce --from=MAINTAINER specify the name and the email address of the sender --gzip compress PO files with gzip --nogzip --help display this help and exit --langs=LANGUAGES restrict sending emails only to these languages --languageteam send the email also to the Language Team --nolanguageteam --mutt send the mails with mutt. This set the --postpone argument to the mutt's postponed parameter or \$HOME/postponed --notdebconf this is not for debconf translation. Do not mention debconf in the subject and message --package=PACKAGE specify the name of the package --podir=DIRECTORY specify where are located the PO files --postpone=MBOX do not send emails, append them in MBOX. This file can be used as a postponed mailbox with mutt -p. --potfile=FILE when used with --call, specifies the POT file to attach to the call for translations --sendmessage only send a message, without any attachment --smtp=SERVER specify SMTP server for mailing (default localhost) --submit send a bug report against the package with a report of the outdated debconf translations --summary send a status report to the maintainer with the list of emails sent to translators --nosummary --utf8 send the mail in UTF-8 --noutf8 --version display version information and exit -v, --verbose display additional information --noverbose --templatecall=TEMPLATE specify file to use it as template for the emails --templatesubmit=TEMPLATE specify file to use it as template for the emails --templatetranslators=TEMPLATE specify file to use it as template for the emails --template=TEMPLATE specify file to use it as template for the emails --notemplate --withtranslators when used with --call, specifies that request for translation updates must be sent to the translators --withouttranslators _EOF_ exit 0; } ## Print the version text and exit sub Help_PrintVersion { print <<_EOF_; ${PROGRAM} $VERSION Copyright (C) 2004-2006 Fabio Tranchitella and Denis Barbier. Copyright (C) 2007 Nicolas François This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit 0; } sub Verbose { my $msg = shift; return unless $VERBOSE_ARG; $msg =~ s/^/**${PROGRAM}: /mg; print STDERR $msg."\n"; } sub Postpone { my $mail = shift; if (eval { require Mail::Box::Manager }) { import Mail::Box::Manager; my $mgr = new Mail::Box::Manager; my $folder = $mgr->open(folder => $MBOX, access => 'a', create => 1); my $msg = Mail::Message->build ( From => ${$mail}{'From'} , To => ${$mail}{'To'} , Subject => ${$mail}{'Subject'} , 'X-Mail-Originator' => ${$mail}{'X-Mail-Originator'} , 'Content-Type' => ${$mail}{'content-type'} , data => ${$mail}{body} ); $mgr->appendMessage($folder, $msg); $folder->write(); $mgr->close(); } else { die "The --postpone and --mutt options require the ". "perl Mail::Box package. Please install the Debian ". "libmail-box-perl package if you want to use these ". "options. No mail written or sent."; } } po-debconf-1.0.16+nmu2ubuntu1/encodings0000664000000000000000000000156111712075201014577 0ustar # # Legacy encoding for these languages # ar UTF-8 bg CP1251 bs UTF-8 ca ISO-8859-15 cs ISO-8859-2 cy UTF-8 da ISO-8859-1 de ISO-8859-15 el ISO-8859-7 en ISO-8859-1 eo ISO-8859-3 es ISO-8859-15 eu ISO-8859-1 fi ISO-8859-15 fr ISO-8859-15 gl ISO-8859-15 he ISO-8859-8 hr ISO-8859-2 hu ISO-8859-2 id ISO-8859-1 it ISO-8859-15 ja EUC-JP ko EUC-KR lt ISO-8859-13 nb ISO-8859-1 nl ISO-8859-15 nn ISO-8859-1 no ISO-8859-1 pl ISO-8859-2 pt ISO-8859-15 pt_BR ISO-8859-1 ro ISO-8859-2 ru KOI8-R sk ISO-8859-2 sl ISO-8859-2 sq UTF-8 sv ISO-8859-1 th TIS-620 tr ISO-8859-9 tr_TR ISO-8859-9 uk KOI8-U zh_CN GB2312 zh_HK Big5HKSCS zh_TW Big5 po-debconf-1.0.16+nmu2ubuntu1/doc/0000775000000000000000000000000011712573434013460 5ustar po-debconf-1.0.16+nmu2ubuntu1/doc/de/0000775000000000000000000000000011712573434014050 5ustar po-debconf-1.0.16+nmu2ubuntu1/doc/pt/0000775000000000000000000000000011712573434014103 5ustar po-debconf-1.0.16+nmu2ubuntu1/doc/en/0000775000000000000000000000000011712573434014062 5ustar po-debconf-1.0.16+nmu2ubuntu1/doc/en/debconf-gettextize.1.pod0000664000000000000000000001013611712075201020505 0ustar =head1 NAME debconf-gettextize - extract translations of debconf templates into PO files =head1 SYNOPSIS B [B<-v>] [B<-h>] [B<--podir=I>] [B<--choices>] [B<--merge>] I [I ...] =head1 DESCRIPTION The F files read by debconf contain English text and translations in the same file. But in source packages, translations are managed in separate files to help translators. In the initial implementation, a master F file contained only English text, and F> files contained both original and translated strings for the language I. The B program was merging master and translated templates files. The new implementation with C is based on C. Maintainers mark translatable fields by prepending them with an underscore, English strings are automatically extracted into a POT file, translators work on normal PO files, and B generates a merged templates file with the same structure. The B program was initially designed to help migrating to the new implementation. =over 2 =item It reads a list of master files and their associated translations, and generates F files for each language containing translated strings. =item Each input file receives an C<.old> suffix, and a new master file overwrites the old one; it is identical to the previous master file except that an underscore is prepended to translatable fields. Developers can then choose which fields translators have to work on and which ones are skipped because their values are not locale-dependent. =item A F file is also created, it contains the list of F files B has to process. =back Typically the B program must be run only once when transforming from the first implementation to the C format, but it can also be used afterwards to transform a C<_Choices> field into C<__Choices> (or vice-versa) without losing translations, when using the C<--merge> flag (alongside with C<--choices> or not). The desired template containing the C<_Choices> or C<__Choices> fields to modify has to be copied into a temporary template file, which is passed to B as an argument. Then the following steps are performed: =over 3 =item 1. B is run on this template file to generate a translated templates file. =item 2. This translated templates file is processed as described above and PO files are generated. =item 3. Newly created PO files are merged with existing ones. =back When PO files are merged, C<_Choices> fields have to be replaced by C<__Choices> (or vice-versa) in the original templates file before running B, otherwise new translations will be fuzzy. =head1 OPTIONS =over 4 =item B<-h>, B<--help> Display a usage summary for the program and exit. =item B<-v>, B<--verbose> Process in verbose mode. =item B<--podir=I> Set directory for PO files. Default is to search for PO files in the F subdirectory below the location of the first master file. =item B<--choices> By default, B replaces C fields by C<_Choices>. With this flag, C<__Choices> fields are written instead. =item B<--merge> When this flag is set, the strings are merged with existing PO files. The templates files and F are not modified. =back =head1 CAVEATS The C field is special when template type is C