Bug 76529 - Mix of translated and untranslated message
Summary: Mix of translated and untranslated message
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords: love
Depends on:
Blocks:
 
Reported: 2014-03-23 21:52 UTC by Göran Uddeborg
Modified: 2017-05-07 21:08 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Göran Uddeborg 2014-03-23 21:52:44 UTC
Note: I originally reported this in the tracking system at http://pulseaudio.org/ticket.  But it does no longer seem active, and the bug is still there, so I repeat the report here.

In src/utils/pacat.c, in the function stream_state_callback, there is this code:

pa_log(_("Connected to device %s (%u, %ssuspended)."),
        pa_stream_get_device_name(s),
        pa_stream_get_device_index(s),
        pa_stream_is_suspended(s) ? "" : "not ");

The word "not" is not available for translation here.  And building messages from pieces in this way often breaks translations.  I'm sure there are some language where the word "suspended" should have different forms depending on whether it is negated or not.

I would suggest to make two complete messages instead, and select the entire message based on the return value of pa_stream_is_suspended().

An addition/alternative was suggested by "mkbosmans" in my original report:

If someone is going over the source code and review for translation difficulties, then please also look at pa_yes_no in pulsecore/core-util.c. Those little two strings should be translated also.

Perhaps that's even a possible solution here:

pa_log(_("Connected to device %s (%u, suspended: %s)."),
        pa_stream_get_device_name(s),
        pa_stream_get_device_index(s),
        pa_yes_no(pa_stream_is_suspended(s));
Comment 1 Tanu Kaskinen 2014-03-24 07:24:54 UTC
Thanks for the report, and sorry for ignoring the original report.

(In reply to comment #0)
> pa_log(_("Connected to device %s (%u, suspended: %s)."),
>         pa_stream_get_device_name(s),
>         pa_stream_get_device_index(s),
>         pa_yes_no(pa_stream_is_suspended(s));

I implemented this suggestion. Fixes committed:

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=cd13fb368dd5ee286f83eba500098c37b0df28f0

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=568702f44ec5d5d25c19a8a77ce888174ce2ed00
Comment 2 Alexander Potashev 2014-05-11 21:41:45 UTC
The strings "yes" and "no" are not extracted from src/pulsecore/core-util.h to pulseaudio.pot, and therefore will not be translatable.

I use the following command sequence to generate pulseaudio.pot:
    ./autogen.sh
    cd po
    make update-po
Comment 3 Alexander Potashev 2014-05-11 21:50:17 UTC
Also, there is a similar problem (word puzzle) with "not" here in src/utils/pacat.c, line 410:
    pa_log(_("Stream moved to device %s (%u, %ssuspended).%s"), pa_stream_get_device_name(s), pa_stream_get_device_index(s), pa_stream_is_suspended(s) ? "" : _("not "),  CLEAR_LINE);


On word puzzles in general: http://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pitfall_.232:_Word_Puzzles
Comment 4 Göran Uddeborg 2017-05-07 21:08:37 UTC
Alexander, let us keep one issue per report.  The problem originally reported here is fixed.  The additional problems you mention are likely not being noticed because of that.  I suggest you create a separate report for them, most likely they will have a better chance of being handled that way.


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.