Merge lp:~nick-dedekind/indicator-sound/slider-labels into lp:indicator-sound/14.10

Proposed by Nick Dedekind on 2014-07-28
Status: Merged
Approved by: Ted Gould on 2014-09-26
Approved revision: 448
Merged at revision: 453
Proposed branch: lp:~nick-dedekind/indicator-sound/slider-labels
Merge into: lp:indicator-sound/14.10
Diff against target: 35 lines (+4/-4)
1 file modified
src/sound-menu.vala (+4/-4)
To merge this branch: bzr merge lp:~nick-dedekind/indicator-sound/slider-labels
Reviewer Review Type Date Requested Status
Charles Kerr (community) 2014-07-28 Approve on 2014-10-06
PS Jenkins bot (community) continuous-integration Approve on 2014-09-26
Review via email: mp+228463@code.launchpad.net

Commit message

Use label for Volume sliders.

Description of the change

To post a comment you must log in.
Charles Kerr (charlesk) wrote :

Looks good but these strings need to be wrapped in _() for i18n, e.g.:

- foo.create_slider_menu_item ("Microphone Volume", "indicator.mic-volume", ...
+ foo.create_slider_menu_item (_("Microphone Volume"), "indicator.mic-volume", ...

review: Needs Fixing
448. By Nick Dedekind on 2014-09-26

use translatable string

Nick Dedekind (nick-dedekind) wrote :

> Looks good but these strings need to be wrapped in _() for i18n, e.g.:
>
> - foo.create_slider_menu_item ("Microphone Volume", "indicator.mic-volume",
> ...
> + foo.create_slider_menu_item (_("Microphone Volume"), "indicator.mic-volume",
> ...

Thanks. Done

Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/sound-menu.vala'
2--- src/sound-menu.vala 2014-03-13 21:14:36 +0000
3+++ src/sound-menu.vala 2014-09-26 13:53:23 +0000
4@@ -35,7 +35,7 @@
5 this.volume_section = new Menu ();
6 if ((flags & DisplayFlags.SHOW_MUTE) != 0)
7 volume_section.append (_("Mute"), "indicator.mute");
8- volume_section.append_item (this.create_slider_menu_item ("indicator.volume(0)", 0.0, 1.0, 0.01,
9+ volume_section.append_item (this.create_slider_menu_item (_("Volume"), "indicator.volume(0)", 0.0, 1.0, 0.01,
10 "audio-volume-low-zero-panel",
11 "audio-volume-high-panel"));
12
13@@ -75,7 +75,7 @@
14 }
15 set {
16 if (value && !this.mic_volume_shown) {
17- var slider = this.create_slider_menu_item ("indicator.mic-volume", 0.0, 1.0, 0.01,
18+ var slider = this.create_slider_menu_item (_("Microphone Volume"), "indicator.mic-volume", 0.0, 1.0, 0.01,
19 "audio-input-microphone-low-zero-panel",
20 "audio-input-microphone-high-panel");
21 volume_section.append_item (slider);
22@@ -227,11 +227,11 @@
23 player_section.append_submenu (_("Choose Playlist"), submenu);
24 }
25
26- MenuItem create_slider_menu_item (string action, double min, double max, double step, string min_icon_name, string max_icon_name) {
27+ MenuItem create_slider_menu_item (string label, string action, double min, double max, double step, string min_icon_name, string max_icon_name) {
28 var min_icon = new ThemedIcon.with_default_fallbacks (min_icon_name);
29 var max_icon = new ThemedIcon.with_default_fallbacks (max_icon_name);
30
31- var slider = new MenuItem (null, action);
32+ var slider = new MenuItem (label, action);
33 slider.set_attribute ("x-canonical-type", "s", "com.canonical.unity.slider");
34 slider.set_attribute_value ("min-icon", min_icon.serialize ());
35 slider.set_attribute_value ("max-icon", max_icon.serialize ());

Subscribers

People subscribed via source and target branches