Bug#351557: German translation update and minor i18n improvements
On Sun, Feb 19, 2006 at 10:43:40PM +0100, Ruben Porras wrote: Am Mittwoch, den 08.02.2006, 23:07 +0100 schrieb Jens Seidel: msgid Encoding of README|UTF-8 msgstr UTF-8 without effect. After reinstalling version 0.4.1-1 from the archive it works again. So, Daniel, it seems that you need to check this regression. I found it. As usual only two or three lines of code are effected. Here is the patch: --- old-aptitude/src/aptitude.h 2006-02-21 21:24:56.0 +0100 +++ new-aptitude/src/aptitude.h 2006-02-21 21:24:56.0 +0100 @@ -29,8 +29,8 @@ # define _(Text) gettext (Text) # define N_(Text) Text -/** Strips everything up to and includeing the first pipe character - * from the string. Strings without a pipe character are unchanged. +/** Strips everything up to and including the first pipe character + * from the translated string. Translations without a pipe character are unchanged. */ #ifdef __GNUG__ __attribute__ ((format_arg(1))) @@ -41,7 +41,7 @@ const char * const stripto = strchr(translation, '|'); if(stripto == NULL) -return Text; +return translation; else return stripto+1; } @@ -53,7 +53,11 @@ # define textdomain(Domain) /* empty */ # define _(Text) Text # define N_(Text) Text -# define P_(Text) Text +inline const char *P_(const char *Text) +{ + const char * const stripto = strchr(Text, '|'); + return stripto+1; +} # define gettext(Text) Text # define dgettext(Domain, Text) Text #endif - const char *encoding=P_(Encoding of README|UTF-8); + const char *encoding=P_(Encoding of README|ISO_8859-1); The old version didn't support a translation into UTF-8 or similar without |. Other languages such as Italian were effected as well. The old code failed also with NLS support disabled. Jens -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#351557: German translation update and minor i18n improvements
Am Mittwoch, den 08.02.2006, 23:07 +0100 schrieb Jens Seidel: My locale is the same. I tried it again and this time it worked, I'm confused. So I created the package again from a clean darcs checkout. Now it fails again. I tried both msgid Encoding of README|UTF-8 msgstr ISO_8859-1 and msgid Encoding of README|UTF-8 msgstr UTF-8 without effect. After reinstalling version 0.4.1-1 from the archive it works again. So, Daniel, it seems that you need to check this regression. Apart of this, I've splittet into smaller patches Jens' patch, and applied the ones I think can be safely applied. The other are attached to this mail, and i think you should review them. I've sent the rest to daniel as a patch to his darcs repository. diff -rN -u old-aptitude/src/vscreen/fragment.cc new-aptitude/src/vscreen/fragment.cc --- old-aptitude/src/vscreen/fragment.cc 2006-02-05 18:50:00.0 +0100 +++ new-aptitude/src/vscreen/fragment.cc 2006-02-05 18:50:03.0 +0100 @@ -1367,8 +1367,6 @@ arguments[i].F=va_arg(arglst, fragment *); break; case 's': - arguments[i].s=va_arg(arglst, const char *); - break; case 'S': arguments[i].s=va_arg(arglst, const char *); break; diff -rN -u old-aptitude/po/Makevars new-aptitude/po/Makevars --- old-aptitude/po/Makevars 2006-02-05 18:49:58.0 +0100 +++ new-aptitude/po/Makevars 2006-02-05 18:50:01.0 +0100 @@ -18,8 +18,6 @@ # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. -# -# (is that correct for aptitude?) COPYRIGHT_HOLDER = Daniel Burrows [EMAIL PROTECTED] # This is the email address or URL to which the translators shall report diff -rN -u old-aptitude/src/broken_indicator.cc new-aptitude/src/broken_indicator.cc --- old-aptitude/src/broken_indicator.cc 2006-02-05 18:49:59.0 +0100 +++ new-aptitude/src/broken_indicator.cc 2006-02-05 18:50:02.0 +0100 @@ -323,7 +323,6 @@ state.generated_solutions); fragments.push_back(fragf(%s , countstr.c_str())); -fragments.push_back(fragf(_(Suggest ))); vectorfragment * suggestions; @@ -357,8 +356,10 @@ downgrade_count), downgrade_count))); -fragments.push_back(join_fragments(suggestions, - L,)); +/* ForTranslators: %F is replaced with a comma separated list such as + n1 installs, n2 removals, ... + */ +fragments.push_back(fragf(_(Suggest %F), join_fragments(suggestions, L, ))); if(state.background_thread_active) { diff -rN -u old-aptitude/src/ui.cc new-aptitude/src/ui.cc --- old-aptitude/src/ui.cc 2006-02-05 18:50:00.0 +0100 +++ new-aptitude/src/ui.cc 2006-02-05 18:50:02.0 +0100 @@ -881,15 +881,17 @@ { char buf[512]; - snprintf(buf, 512, HELPDIR /%s, _(README)); // README can be translated.. + snprintf(buf, 512, HELPDIR /%s, _(README)); // README can be translated... - const char *encoding=P_(Encoding of README|UTF-8); + const char *encoding=P_(Encoding of README|ISO_8859-1); // Deal with missing localized docs. if(access(buf, R_OK)!=0) { +// encoding is latin1=ISO_8859-1, right? +// cannot open README in a German locale, why? strncpy(buf, HELPDIR /README, 512); - encoding=UTF-8; + encoding=ISO_8859-1; } vs_table_ref t = vs_table::create();
Bug#351557: German translation update and minor i18n improvements
Am Sonntag, den 05.02.2006, 19:22 +0100 schrieb Jens Seidel: Package: aptitude Severity: minor Tags: i18n, patch Hi Daniel, I attached an update of the German translation and additional minor i18n improvements against your darcs repository. Well, you also change things like the copyright holder in po/Makevars.template Please note that the strings in the current help screen (aptitude --help) use full stops very inconsistently. Please fix this. I marked in my patch comments starting with Translators: so that these are copied into the PO file. I suggest you use this feature to explain a few strings such as I did for the new Suggest %F. Introducing Suggest %F instead of _(Suggest)+%F is necessary since the German translation of this is Schlage %F vor (%F doesn't occur at the end). (There was also , used as separator in %F, whereas , is a better choice.) Ok, we already have comments starting with ForTranslators, but them don't appear in the .pot file (I suppose this is because i never add this to the Makefile). i'll convert your strings to match this. The msgid bugs address should be [EMAIL PROTECTED] not [EMAIL PROTECTED] since the second requires proper tags in the mail. Please also allow a proper translation of Y/n strings. At the current state the user needs to enter the English shortcuts. And another problem. I cannot open the manual (which isn't translated to German yet) from the help menu. It works in a English locale but in the German one I get only an empty window. I also noticed that the (English) README is encoded in latin1 not UTF-8 but it also doesn't work which this change. That's not true for everyone, my locale is: LANG=de_DE.UTF-8 LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=de_DE.UTF-8 LC_TIME=de_DE.UTF-8 LC_COLLATE=de_DE.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=de_DE.UTF-8 LC_ADDRESS=de_DE.UTF-8 LC_TELEPHONE=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=de_DE.UTF-8 LC_ALL= and I can see it perfectly. How is your locale? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#351557: German translation update and minor i18n improvements
On Wed, Feb 08, 2006 at 10:02:01AM +0100, Ruben Porras wrote: Am Sonntag, den 05.02.2006, 19:22 +0100 schrieb Jens Seidel: Well, you also change things like the copyright holder in po/Makevars.template Ahm, true. Not sure whether that's OK or not. But since Makevars.template is a template for Makevars I thought it's best to change twice. Maybe it's also possible to remove it? I was also not sure about is the effect of the bad dependency handling related to po/ on Makevars. touch de.po make doesn't regenerate de.gmo, even after rm de.gmo! (But that's true for other projects as well and I know about make update-po.) And another problem. I cannot open the manual (which isn't translated to German yet) from the help menu. It works in a English locale but in the German one I get only an empty window. I also noticed that the (English) README is encoded in latin1 not UTF-8 but it also doesn't work which this change. That's not true for everyone, my locale is: LANG=de_DE.UTF-8 LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=de_DE.UTF-8 LC_TIME=de_DE.UTF-8 LC_COLLATE=de_DE.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=de_DE.UTF-8 LC_ADDRESS=de_DE.UTF-8 LC_TELEPHONE=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=de_DE.UTF-8 LC_ALL= and I can see it perfectly. How is your locale? My locale is the same. I tried it again and this time it worked, I'm confused. So I created the package again from a clean darcs checkout. Now it fails again. I tried both msgid Encoding of README|UTF-8 msgstr ISO_8859-1 and msgid Encoding of README|UTF-8 msgstr UTF-8 without effect. After reinstalling version 0.4.1-1 from the archive it works again. Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-1-686 Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Versions of packages aptitude depends on: ii apt [libapt-pkg-libc6.3-6-3.1 0.6.43.2 Advanced front-end for dpkg ii libc6 2.3.5-8GNU C Library: Shared libraries an ii libgcc1 1:4.0.2-5 GCC support library ii libncursesw5 5.5-1 Shared libraries for terminal hand ii libsigc++-2.0-0c2a2.0.16-2 type-safe Signal Framework for C++ ii libstdc++64.0.2-5The GNU Standard C++ Library v3 Versions of packages aptitude recommends: pn aptitude-doc-en | aptitude-do none (no description available) Jens -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#351557: German translation update and minor i18n improvements
Package: aptitude Severity: minor Tags: i18n, patch Hi Daniel, I attached an update of the German translation and additional minor i18n improvements against your darcs repository. Please note that the strings in the current help screen (aptitude --help) use full stops very inconsistently. Please fix this. I marked in my patch comments starting with Translators: so that these are copied into the PO file. I suggest you use this feature to explain a few strings such as I did for the new Suggest %F. Introducing Suggest %F instead of _(Suggest)+%F is necessary since the German translation of this is Schlage %F vor (%F doesn't occur at the end). (There was also , used as separator in %F, whereas , is a better choice.) The msgid bugs address should be [EMAIL PROTECTED] not [EMAIL PROTECTED] since the second requires proper tags in the mail. Please also allow a proper translation of Y/n strings. At the current state the user needs to enter the English shortcuts. And another problem. I cannot open the manual (which isn't translated to German yet) from the help menu. It works in a English locale but in the German one I get only an empty window. I also noticed that the (English) README is encoded in latin1 not UTF-8 but it also doesn't work which this change. During one of my tests I got a segfault during exiting aptitude. Sorry I have no backtrace and could not reproduce it. (I played a little bit without root permission, removed a few packages and tested the resolver strings by selecting ,, . and e. Hope this helps.) Once I got a 100% CPU usage for more than 5 minutes during resolver run (until I killed aptitude) with an output of --\ Resolving dependencies... open: 73083; closed: 49009; defer: 0; conflict: 81 I cannot imagine that it usually takes such a long time, especially as I found a few timeout strings in the translation. (PIII 800MHz CPU) PS: Do not forget to update po/aptitude.pot using rm aptitude.pot make aptitude.pot after applying this patch since a few strings changed. Jens aptitude_de+i18n.diff.gz Description: Binary data