Bug 78564

Summary: Untranslatable string due to wrong usage of gettext
Product: PulseAudio Reporter: Alexander Potashev <aspotashev>
Component: daemonAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart, piotrdrag
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Alexander Potashev 2014-05-11 22:09:18 UTC
Untranslatable string due to wrong usage of gettext here in src/daemon/main.c, line 271:
    pa_log_info(_("Successfully changed user to \"" PA_SYSTEM_USER "\"."));

Because Gettext can only extract string constants and cannot parse C preprocessor variables, it extracts only the first part - "Successfully changed user to \"". Then, because the whole string along with PA_SYSTEM_USER, etc is passed into the _() call, translation for that is not found and the string is never translated into any language.

Solution: pass PA_SYSTEM_USER as "%s", like this:
    pa_log_info(_("Successfully changed user to \"%s\"."), PA_SYSTEM_USER);
Comment 1 David Henningsson 2014-09-02 14:14:11 UTC
Fixed now:

commit 764da4260a2ab44816d4b1f4c4e709f4684b1b9a
Author: David Henningsson <david.henningsson@canonical.com>
Date:   Tue Sep 2 12:09:44 2014 +0200

    Make all debug/info level messages untranslatable

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.