diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-29 18:15:03 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-29 18:44:42 +0200 |
commit | 6a3271735186a2b4d3c500f4f60c0c03a12bdd2f (patch) | |
tree | e5ceaf01ba400b1ef552fbeec92919826200cd30 /music_sampler/actions/stop.py | |
parent | 7d6df771f603e9642047264f967525422ef09e99 (diff) | |
download | MusicSampler-1.2.0.tar.gz MusicSampler-1.2.0.tar.zst MusicSampler-1.2.0.zip |
Make music_sampler multilingual1.2.0
Diffstat (limited to 'music_sampler/actions/stop.py')
-rw-r--r-- | music_sampler/actions/stop.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/music_sampler/actions/stop.py b/music_sampler/actions/stop.py index 88cc66d..769c312 100644 --- a/music_sampler/actions/stop.py +++ b/music_sampler/actions/stop.py | |||
@@ -19,22 +19,25 @@ def run(action, music=None, fade_out=0, wait=False, | |||
19 | def description(action, music=None, fade_out=0, wait=False, | 19 | def description(action, music=None, fade_out=0, wait=False, |
20 | set_wait_id=None, **kwargs): | 20 | set_wait_id=None, **kwargs): |
21 | 21 | ||
22 | formats = [] | ||
22 | message = "stopping " | 23 | message = "stopping " |
23 | if music is not None: | 24 | if music is not None: |
24 | message += "music « {} »".format(music.name) | 25 | message += "music « {} »" |
26 | formats.append(music.name) | ||
25 | else: | 27 | else: |
26 | message += "all musics" | 28 | message += "all musics" |
27 | 29 | ||
28 | if fade_out > 0: | 30 | if fade_out > 0: |
29 | message += " with {}s fadeout".format(fade_out) | 31 | message += " with {}s fadeout" |
32 | formats.append(fade_out) | ||
30 | if wait: | 33 | if wait: |
31 | if set_wait_id is not None: | 34 | if set_wait_id is not None: |
32 | message += " (waiting the end of fadeout, with id {})"\ | 35 | message += " (waiting the end of fadeout, with id {})" |
33 | .format(set_wait_id) | 36 | formats.append(set_wait_id) |
34 | else: | 37 | else: |
35 | message += " (waiting the end of fadeout)" | 38 | message += " (waiting the end of fadeout)" |
36 | 39 | ||
37 | return message | 40 | return _(message).format(*formats) |
38 | 41 | ||
39 | def interrupt(action, music=None, fade_out=0, wait=False, | 42 | def interrupt(action, music=None, fade_out=0, wait=False, |
40 | set_wait_id=None, **kwargs): | 43 | set_wait_id=None, **kwargs): |