FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-10-2008, 05:46 PM
Allan McRae
 
Default Tidy up missing changelog error message

Dan McGee wrote:
> On Sat, May 10, 2008 at 11:31 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
>
>> if((fp = alpm_pkg_changelog_open(pkg)) == NULL) {
>> - /* TODO after string freeze use pm_fprintf */
>> - fprintf(stderr, _("error: no changelog available for '%s'.
"),
>> + pm_fprintf(stderr, PM_LOG_ERROR, "no changelog available for '%s'.
",
>>
> Ooo, nice.
>
> Any chance you want to fold this into a bigger patch, hopefully
> slightly tested, finding more of these types of things? This one
> wasn't alone.
>

Before, I continue on with this, does the patched version of the string
above get flagged for translation? I ask because the only other use of
the pm_fprintf function I found was in pacman/pacman.c.

pm_fprintf(stderr, PM_LOG_ERROR, "Internal pacman error: Segmentation
fault.
"
"Please submit a full bug report with --debug if appropriate.
");

Now, I can't find those strings in the files in the po/ folder. These
lines are in pacman-3.1.4 so should have been translated. Am I missing
something obvious or should the strings be surrounded with "_( )"?



_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-10-2008, 06:09 PM
Xavier
 
Default Tidy up missing changelog error message

Allan McRae wrote:
> Dan McGee wrote:
>> On Sat, May 10, 2008 at 11:31 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
>>
>>> if((fp = alpm_pkg_changelog_open(pkg)) == NULL) {
>>> - /* TODO after string freeze use pm_fprintf */
>>> - fprintf(stderr, _("error: no changelog available for '%s'.
"),
>>> + pm_fprintf(stderr, PM_LOG_ERROR, "no changelog available for '%s'.
",
>>>
>> Ooo, nice.
>>
>> Any chance you want to fold this into a bigger patch, hopefully
>> slightly tested, finding more of these types of things? This one
>> wasn't alone.
>>
>
> Before, I continue on with this, does the patched version of the string
> above get flagged for translation? I ask because the only other use of
> the pm_fprintf function I found was in pacman/pacman.c.
>
> pm_fprintf(stderr, PM_LOG_ERROR, "Internal pacman error: Segmentation
> fault.
"
> "Please submit a full bug report with --debug if appropriate.
");
>
> Now, I can't find those strings in the files in the po/ folder. These
> lines are in pacman-3.1.4 so should have been translated. Am I missing
> something obvious or should the strings be surrounded with "_( )"?
>
>

Yes, _ is what indicates which strings can be translated :
src/pacman/util.h:#define _(str) gettext(str)

In the case of an error that is always displayed (not debug output), we
want it to be translated. So we need to keep _ there indeed.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-11-2008, 01:21 AM
Allan McRae
 
Default Tidy up missing changelog error message

Xavier wrote:
> Allan McRae wrote:
>
>> Dan McGee wrote:
>>
>>> On Sat, May 10, 2008 at 11:31 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
>>>
>>>
>>>> if((fp = alpm_pkg_changelog_open(pkg)) == NULL) {
>>>> - /* TODO after string freeze use pm_fprintf */
>>>> - fprintf(stderr, _("error: no changelog available for '%s'.
"),
>>>> + pm_fprintf(stderr, PM_LOG_ERROR, "no changelog available for '%s'.
",
>>>>
>>>>
>>> Ooo, nice.
>>>
>>> Any chance you want to fold this into a bigger patch, hopefully
>>> slightly tested, finding more of these types of things? This one
>>> wasn't alone.
>>>
>>>
>> Before, I continue on with this, does the patched version of the string
>> above get flagged for translation? I ask because the only other use of
>> the pm_fprintf function I found was in pacman/pacman.c.
>>
>> pm_fprintf(stderr, PM_LOG_ERROR, "Internal pacman error: Segmentation
>> fault.
"
>> "Please submit a full bug report with --debug if appropriate.
");
>>
>> Now, I can't find those strings in the files in the po/ folder. These
>> lines are in pacman-3.1.4 so should have been translated. Am I missing
>> something obvious or should the strings be surrounded with "_( )"?
>>
>>
>>
>
> Yes, _ is what indicates which strings can be translated :
> src/pacman/util.h:#define _(str) gettext(str)
>
> In the case of an error that is always displayed (not debug output), we
> want it to be translated. So we need to keep _ there indeed.
>
So just to clarify, was the "Internal pacman error..." message above not
flagged for translation for a reason? Otherwise, I will fix this as I
update all other fprintf lines.

Allan



_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 07:06 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org