From 6a3271735186a2b4d3c500f4f60c0c03a12bdd2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 29 Jul 2016 18:15:03 +0200 Subject: Make music_sampler multilingual --- music_sampler/action.py | 2 +- music_sampler/actions/interrupt_wait.py | 2 +- music_sampler/actions/pause.py | 4 +- music_sampler/actions/play.py | 18 +- music_sampler/actions/run_command.py | 6 +- music_sampler/actions/seek.py | 8 +- music_sampler/actions/stop.py | 13 +- music_sampler/actions/stop_all_actions.py | 2 +- music_sampler/actions/unpause.py | 4 +- music_sampler/actions/volume.py | 24 +- music_sampler/actions/wait.py | 19 +- music_sampler/app_blocks/actionlist.py | 2 +- music_sampler/helpers.py | 51 ++- .../locales/fr/LC_MESSAGES/music_sampler.po | 424 +++++++++++++++++++++ music_sampler/music_sampler.kv | 4 +- 15 files changed, 518 insertions(+), 65 deletions(-) create mode 100644 music_sampler/locales/fr/LC_MESSAGES/music_sampler.po (limited to 'music_sampler') diff --git a/music_sampler/action.py b/music_sampler/action.py index ef56b7c..d269d0e 100644 --- a/music_sampler/action.py +++ b/music_sampler/action.py @@ -110,4 +110,4 @@ class Action: return getattr(actions, self.action)\ .description(self, **self.arguments) else: - return "unknown action {}".format(self.action) + return _("unknown action {}").format(self.action) diff --git a/music_sampler/actions/interrupt_wait.py b/music_sampler/actions/interrupt_wait.py index 8f465f0..f85a3c4 100644 --- a/music_sampler/actions/interrupt_wait.py +++ b/music_sampler/actions/interrupt_wait.py @@ -2,4 +2,4 @@ def run(action, wait_id=None, **kwargs): action.mapping.interrupt_wait(wait_id) def description(action, wait_id=None, **kwargs): - return "interrupt wait with id {}".format(wait_id) + return _("interrupt wait with id {}").format(wait_id) diff --git a/music_sampler/actions/pause.py b/music_sampler/actions/pause.py index bb27734..4575f32 100644 --- a/music_sampler/actions/pause.py +++ b/music_sampler/actions/pause.py @@ -5,6 +5,6 @@ def run(action, music=None, **kwargs): def description(action, music=None, **kwargs): if music is not None: - return "pausing « {} »".format(music.name) + return _("pausing « {} »").format(music.name) else: - return "pausing all musics" + return _("pausing all musics") diff --git a/music_sampler/actions/play.py b/music_sampler/actions/play.py index fdba95b..f6057ad 100644 --- a/music_sampler/actions/play.py +++ b/music_sampler/actions/play.py @@ -19,26 +19,32 @@ def run(action, music=None, fade_in=0, start_at=0, def description(action, music=None, fade_in=0, start_at=0, restart_if_running=False, volume=100, loop=0, **kwargs): + formats = [] message = "starting " if music is not None: - message += "« {} »".format(music.name) + message += "« {} »" + formats.append(music.name) else: message += "all musics" if start_at != 0: - message += " at {}s".format(start_at) + message += " at {}s" + formats.append(start_at) if fade_in != 0: - message += " with {}s fade_in".format(fade_in) + message += " with {}s fade_in" + formats.append(fade_in) - message += " at volume {}%".format(volume) + message += " at volume {}%" + formats.append(volume) if loop > 0: - message += " {} times".format(loop + 1) + message += " {} times" + formats.append(loop + 1) elif loop < 0: message += " in loop" if restart_if_running: message += " (restarting if already running)" - return message + return _(message).format(*formats) diff --git a/music_sampler/actions/run_command.py b/music_sampler/actions/run_command.py index 1e80c1e..df23056 100644 --- a/music_sampler/actions/run_command.py +++ b/music_sampler/actions/run_command.py @@ -6,8 +6,10 @@ def run(action, command="", wait=False, **kwargs): action.process.wait() def description(action, command="", wait=False, **kwargs): - message = "running command {}".format(command) + formats = [] + message = "running command {}" + formats.append(command) if wait: message += " (waiting for its execution to finish)" - return message + return _(message).format(*formats) diff --git a/music_sampler/actions/seek.py b/music_sampler/actions/seek.py index 467af7d..9f19798 100644 --- a/music_sampler/actions/seek.py +++ b/music_sampler/actions/seek.py @@ -5,15 +5,15 @@ def run(action, music=None, value=0, delta=False, **kwargs): def description(action, music=None, value=0, delta=False, **kwargs): if delta: if music is not None: - return "moving music « {} » by {:+d}s" \ + return _("moving music « {} » by {:+d}s") \ .format(music.name, value) else: - return "moving all musics by {:+d}s" \ + return _("moving all musics by {:+d}s") \ .format(value) else: if music is not None: - return "moving music « {} » to position {}s" \ + return _("moving music « {} » to position {}s") \ .format(music.name, value) else: - return "moving all musics to position {}s" \ + return _("moving all musics to position {}s") \ .format(value) 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, def description(action, music=None, fade_out=0, wait=False, set_wait_id=None, **kwargs): + formats = [] message = "stopping " if music is not None: - message += "music « {} »".format(music.name) + message += "music « {} »" + formats.append(music.name) else: message += "all musics" if fade_out > 0: - message += " with {}s fadeout".format(fade_out) + message += " with {}s fadeout" + formats.append(fade_out) if wait: if set_wait_id is not None: - message += " (waiting the end of fadeout, with id {})"\ - .format(set_wait_id) + message += " (waiting the end of fadeout, with id {})" + formats.append(set_wait_id) else: message += " (waiting the end of fadeout)" - return message + return _(message).format(*formats) def interrupt(action, music=None, fade_out=0, wait=False, set_wait_id=None, **kwargs): diff --git a/music_sampler/actions/stop_all_actions.py b/music_sampler/actions/stop_all_actions.py index 4ea875a..14a1a94 100644 --- a/music_sampler/actions/stop_all_actions.py +++ b/music_sampler/actions/stop_all_actions.py @@ -11,4 +11,4 @@ def description(action, other_only=False, **kwargs): if other_only: message += " except this key" - return message + return _(message) diff --git a/music_sampler/actions/unpause.py b/music_sampler/actions/unpause.py index 5fa88c3..6505ab8 100644 --- a/music_sampler/actions/unpause.py +++ b/music_sampler/actions/unpause.py @@ -5,6 +5,6 @@ def run(action, music=None, **kwargs): def description(action, music=None, **kwargs): if music is not None: - return "unpausing « {} »".format(music.name) + return _("unpausing « {} »").format(music.name) else: - return "unpausing all musics" + return _("unpausing all musics") diff --git a/music_sampler/actions/volume.py b/music_sampler/actions/volume.py index 7dda3c1..e02cdfa 100644 --- a/music_sampler/actions/volume.py +++ b/music_sampler/actions/volume.py @@ -6,23 +6,27 @@ def run(action, music=None, value=100, fade=0, delta=False, **kwargs): def description(action, music=None, value=100, delta=False, fade=0, **kwargs): + formats = [] message = "" if delta: if music is not None: - message += "{:+d}% to volume of « {} »" \ - .format(value, music.name) + message += "{:+d}% to volume of « {} »" + formats.append(value) + formats.append(music.name) else: - message += "{:+d}% to volume" \ - .format(value) + message += "{:+d}% to volume" + formats.append(value) else: if music is not None: - message += "setting volume of « {} » to {}%" \ - .format(music.name, value) + message += "setting volume of « {} » to {}%" + formats.append(music.name) + formats.append(value) else: - message += "setting volume to {}%" \ - .format(value) + message += "setting volume to {}%" + formats.append(value) if fade > 0: - message += " with {}s fade".format(fade) + message += " with {}s fade" + formats.append(fade) - return message + return _(message).format(*formats) diff --git a/music_sampler/actions/wait.py b/music_sampler/actions/wait.py index ea42408..e6d07f2 100644 --- a/music_sampler/actions/wait.py +++ b/music_sampler/actions/wait.py @@ -16,21 +16,24 @@ def run(action, duration=0, music=None, set_wait_id=None, **kwargs): action.sleep_event.wait() def description(action, duration=0, music=None, set_wait_id=None, **kwargs): + formats = [] message = "" if music is None: - message += "waiting {}s" \ - .format(duration) + message += "waiting {}s" + formats.append(duration) elif duration == 0: - message += "waiting the end of « {} »" \ - .format(music.name) + message += "waiting the end of « {} »" + formats.append(music.name) else: - message += "waiting the end of « {} » + {}s" \ - .format(music.name, duration) + message += "waiting the end of « {} » + {}s" + formats.append(music.name) + formats.append(duration) if set_wait_id is not None: - message += " (setting id = {})".format(set_wait_id) + message += " (setting id = {})" + formats.append(set_wait_id) - return message + return _(message).format(*formats) def interrupt(action, duration=0, music=None, **kwargs): if action.sleep_event is not None: diff --git a/music_sampler/app_blocks/actionlist.py b/music_sampler/app_blocks/actionlist.py index 51f4b82..8c4c5e9 100644 --- a/music_sampler/app_blocks/actionlist.py +++ b/music_sampler/app_blocks/actionlist.py @@ -15,7 +15,7 @@ class ActionList(RelativeLayout): action_list = ListProperty([]) def update_list(self, key, action_descriptions): - self.action_title = "actions linked to key {}:".format(key.key_sym) + self.action_title = _("actions linked to key {}:").format(key.key_sym) action_list = [] for [action, status] in action_descriptions: diff --git a/music_sampler/helpers.py b/music_sampler/helpers.py index 2249746..2199058 100644 --- a/music_sampler/helpers.py +++ b/music_sampler/helpers.py @@ -5,6 +5,8 @@ import os import math import sounddevice as sd import logging +import gettext +gettext.install('music_sampler') Logger = logging.getLogger("kivy") from . import sysfont @@ -66,71 +68,76 @@ def parse_args(): sys.argv.extend(["-c", "kivy:log_name:/tmp/music_sampler_%_.txt"]) parser = argparse.ArgumentParser( - description="A Music Sampler application.", + description=_("A Music Sampler application."), formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("-c", "--config", default="config.yml", required=False, - help="Config file to load") + help=_("Config file to load")) parser.add_argument("-p", "--music-path", default=".", required=False, - help="Folder in which to find the music files") + help=_("Folder in which to find the music files")) parser.add_argument("-d", "--debug", nargs=0, action=DebugModeAction, - help="Print messages in console") + help=_("Print messages in console")) parser.add_argument("-m", "--builtin-mixing", action="store_true", - help="Make the mixing of sounds manually\ - (do it if the system cannot handle it correctly)") + help=_("Make the mixing of sounds manually\ + (do it if the system cannot handle it correctly)")) parser.add_argument("-l", "--latency", default="high", required=False, - help="Latency: low, high or number of seconds") + help=_("Latency: low, high or number of seconds")) parser.add_argument("-b", "--blocksize", default=0, type=int, required=False, - help="Blocksize: If not 0, the number of frames to take\ - at each step for the mixer") + help=_("Blocksize: If not 0, the number of frames to take\ + at each step for the mixer")) parser.add_argument("-f", "--frame-rate", default=44100, type=int, required=False, - help="Frame rate to play the musics") + help=_("Frame rate to play the musics")) parser.add_argument("-x", "--channels", default=2, type=int, required=False, - help="Number of channels to use") + help=_("Number of channels to use")) parser.add_argument("-s", "--sample-width", default=2, type=int, required=False, - help="Sample width (number of bytes for each frame)") + help=_("Sample width (number of bytes for each frame)")) parser.add_argument("-V", "--version", action="version", - help="Displays the current version and exits. Only use\ - in bundled package", + help=_("Displays the current version and exits. Only use\ + in bundled package"), version=show_version()) parser.add_argument("--device", action=SelectDeviceAction, - help="Select this sound device" + help=_("Select this sound device") ) parser.add_argument("--list-devices", nargs=0, action=ListDevicesAction, - help="List available sound devices" + help=_("List available sound devices") ) parser.add_argument("--no-focus-warning", action='store_true', - help="Don't show warning when focus is lost" + help=_("Don't show warning when focus is lost") + ) + parser.add_argument("-L", "--language", + required=False, + default="fr", + help=_("Select another language") ) parser.add_argument('--', dest="args", - help="Kivy arguments. All arguments after this are interpreted\ - by Kivy. Pass \"-- --help\" to get Kivy's usage.") + help=_("Kivy arguments. All arguments after this are interpreted\ + by Kivy. Pass \"-- --help\" to get Kivy's usage.")) args = parser.parse_args(argv) @@ -143,6 +150,10 @@ def parse_args(): Config.sample_width = args.sample_width Config.builtin_mixing = args.builtin_mixing Config.no_focus_warning = args.no_focus_warning + if args.language != 'en': + gettext.translation("music_sampler", + localedir=path() + '/locales', + languages=[args.language]).install() if args.music_path.endswith("/"): Config.music_path = args.music_path else: @@ -167,7 +178,7 @@ def show_version(): with open(path() + ".pyinstaller_commit", "r") as f: return f.read() else: - return "option '-v' can only be used in bundled package" + return _("option '-V' can only be used in bundled package") def duration_to_min_sec(duration): minutes = int(duration / 60) diff --git a/music_sampler/locales/fr/LC_MESSAGES/music_sampler.po b/music_sampler/locales/fr/LC_MESSAGES/music_sampler.po new file mode 100644 index 0000000..e711737 --- /dev/null +++ b/music_sampler/locales/fr/LC_MESSAGES/music_sampler.po @@ -0,0 +1,424 @@ +# This file is distributed under the same license as the music_sampler package. +# +msgid "" +msgstr "" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: music_sampler/action.py:113 +msgid "unknown action {}" +msgstr "Action « {} » inconnue" + +#: music_sampler/helpers.py:69 +msgid "A Music Sampler application." +msgstr "Un lecteur de musique préprogrammable" + +#: music_sampler/helpers.py:74 +msgid "Config file to load" +msgstr "Fichier de configuration à charger" + +#: music_sampler/helpers.py:78 +msgid "Folder in which to find the music files" +msgstr "Dossier dans lequel trouver les fichiers de musiques" + +#: music_sampler/helpers.py:82 +msgid "Print messages in console" +msgstr "Afficher les messages de debug" + +#: music_sampler/helpers.py:85 +msgid "" +"Make the mixing of sounds manually (do it if the system " +"cannot handle it correctly)" +msgstr "Faire le mixage en interne (activer si le système n'y parvient pas)" + +#: music_sampler/helpers.py:90 +msgid "Latency: low, high or number of seconds" +msgstr "Latence: low, high ou un nombre de secondes." + +#: music_sampler/helpers.py:95 +msgid "" +"Blocksize: If not 0, the number of frames to take at each " +"step for the mixer" +msgstr "Taille de block: si non nul, indique le nombre de frames à prendre à chaque étape de mixage" + +#: music_sampler/helpers.py:101 +msgid "Frame rate to play the musics" +msgstr "Fréquence d'échantillonnage pour jouer les musiques" + +#: music_sampler/helpers.py:106 +msgid "Number of channels to use" +msgstr "Nombre de canaux par musique" + +#: music_sampler/helpers.py:111 +msgid "Sample width (number of bytes for each frame)" +msgstr "Largeur d'échantillonnage (nombre d'octets pour chaque frame)" + +#: music_sampler/helpers.py:114 +msgid "" +"Displays the current version and exits. Only use in " +"bundled package" +msgstr "Affiche la version courante et quitte (utilisable uniuqement pour la version compilée)" + +#: music_sampler/helpers.py:119 +msgid "Select this sound device" +msgstr "Sélectionne le périphérique de son" + +#: music_sampler/helpers.py:124 +msgid "List available sound devices" +msgstr "Affiche la liste des périphériques de son disponibles" + +#: music_sampler/helpers.py:128 +msgid "Don't show warning when focus is lost" +msgstr "Ne pas afficher d'avertissement lorsque l'application perd le focus." + +#: music_sampler/helpers.py:130 +msgid "Select another language" +msgstr "Choix d'une autre langue" + +#: music_sampler/helpers.py:132 +msgid "" +"Kivy arguments. All arguments after this are interpreted " +"by Kivy. Pass \"-- --help\" to get Kivy's usage." +msgstr "Arguments à passer à la librairie Kivy" + +#: music_sampler/helpers.py:170 +msgid "option '-v' can only be used in bundled package" +msgstr "L'argument '-V' ne peut être utilisé que dans la version compilée" + +#: music_sampler/actions/interrupt_wait.py:5 +msgid "interrupt wait with id {}" +msgstr "Interrompre l'attente d'identifiant {}" + +#: music_sampler/actions/pause.py:8 +msgid "pausing « {} »" +msgstr "mise en pause de « {} »" + +#: music_sampler/actions/pause.py:10 +msgid "pausing all musics" +msgstr "mise en pause des musiques" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at volume {}%" +msgstr "lance « {} » au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at volume {}%" +msgstr "lance toutes les musiques au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s at volume {}%" +msgstr "lance « {} » à {}s au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s at volume {}%" +msgstr "lance toutes les musiques à {}s au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » with {}s fade_in at volume {}%" +msgstr "lance « {} » avec un fondu de {}s au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics with {}s fade_in at volume {}%" +msgstr "lance toutes les musiques avec un fondu de {}s au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s with {}s fade_in at volume {}%" +msgstr "lance « {} » à {}s avec un fondu de {}s au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s with {}s fade_in at volume {}%" +msgstr "lance toutes les musiques à {}s avec un fondu de {}s au volume {}%" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at volume {}% {} times" +msgstr "lance « {} » au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at volume {}% {} times" +msgstr "lance toutes les musiques au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s at volume {}% {} times" +msgstr "lance « {} » à {}s au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s at volume {}% {} times" +msgstr "lance toutes les musiques à {}s au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » with {}s fade_in at volume {}% {} times" +msgstr "lance « {} » avec un fondu de {}s au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics with {}s fade_in at volume {}% {} times" +msgstr "lance toutes les musiques avec un fondu de {}s au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s with {}s fade_in at volume {}% {} times" +msgstr "lance « {} » à {}s avec un fondu de {}s au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s with {}s fade_in at volume {}% {} times" +msgstr "lance toutes les musiques à {}s avec un fondu de {}s au volume {}% {} fois" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at volume {}% in loop" +msgstr "lance « {} » au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at volume {}% in loop" +msgstr "lance toutes les musiques au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s at volume {}% in loop" +msgstr "lance « {} » à {}s au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s at volume {}% in loop" +msgstr "lance toutes les musiques à {}s au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » with {}s fade_in at volume {}% in loop" +msgstr "lance « {} » avec un fondu de {}s au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics with {}s fade_in at volume {}% in loop" +msgstr "lance toutes les musiques avec un fondu de {}s au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s with {}s fade_in at volume {}% in loop" +msgstr "lance « {} » à {}s avec un fondu de {}s au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s with {}s fade_in at volume {}% in loop" +msgstr "lance toutes les musiques à {}s avec un fondu de {}s au volume {}% en boucle" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at volume {}% (restarting if already running)" +msgstr "lance « {} » au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at volume {}% (restarting if already running)" +msgstr "lance toutes les musiques au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s at volume {}% (restarting if already running)" +msgstr "lance « {} » à {}s au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s at volume {}% (restarting if already running)" +msgstr "lance toutes les musiques à {}s au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » with {}s fade_in at volume {}% (restarting if already running)" +msgstr "lance « {} » avec un fondu de {}s au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics with {}s fade_in at volume {}% (restarting if already running)" +msgstr "lance toutes les musiques avec un fondu de {}s au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s with {}s fade_in at volume {}% (restarting if already running)" +msgstr "lance « {} » à {}s avec un fondu de {}s au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s with {}s fade_in at volume {}% (restarting if already running)" +msgstr "lance toutes les musiques à {}s avec un fondu de {}s au volume {}% (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at volume {}% {} times (restarting if already running)" +msgstr "lance « {} » au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at volume {}% {} times (restarting if already running)" +msgstr "lance toutes les musiques au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s at volume {}% {} times (restarting if already running)" +msgstr "lance « {} » à {}s au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s at volume {}% {} times (restarting if already running)" +msgstr "lance toutes les musiques à {}s au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » with {}s fade_in at volume {}% {} times (restarting if already running)" +msgstr "lance « {} » avec un fondu de {}s au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics with {}s fade_in at volume {}% {} times (restarting if already running)" +msgstr "lance toutes les musiques avec un fondu de {}s au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s with {}s fade_in at volume {}% {} times (restarting if already running)" +msgstr "lance « {} » à {}s avec un fondu de {}s au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s with {}s fade_in at volume {}% {} times (restarting if already running)" +msgstr "lance toutes les musiques à {}s avec un fondu de {}s au volume {}% {} fois (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at volume {}% in loop (restarting if already running)" +msgstr "lance « {} » au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at volume {}% in loop (restarting if already running)" +msgstr "lance toutes les musiques au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s at volume {}% in loop (restarting if already running)" +msgstr "lance « {} » à {}s au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s at volume {}% in loop (restarting if already running)" +msgstr "lance toutes les musiques à {}s au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » with {}s fade_in at volume {}% in loop (restarting if already running)" +msgstr "lance « {} » avec un fondu de {}s au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics with {}s fade_in at volume {}% in loop (restarting if already running)" +msgstr "lance toutes les musiques avec un fondu de {}s au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting « {} » at {}s with {}s fade_in at volume {}% in loop (restarting if already running)" +msgstr "lance « {} » à {}s avec un fondu de {}s au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/play.py:50 +msgid "starting all musics at {}s with {}s fade_in at volume {}% in loop (restarting if already running)" +msgstr "lance toutes les musiques à {}s avec un fondu de {}s au volume {}% en boucle (redémarre si déjà lancée)" + +#: music_sampler/actions/run_command.py:15 +msgid "running command {}" +msgstr "lance la commande {}" + +#: music_sampler/actions/run_command.py:15 +msgid "running command {} (waiting for its execution to finish)" +msgstr "lance la commande {} (attend la fin de son exécution)" + +#: music_sampler/actions/seek.py:8 +msgid "moving music « {} » by {:+d}s" +msgstr "avance la musique « {} » de {:+d}s" + +#: music_sampler/actions/seek.py:11 +msgid "moving all musics by {:+d}s" +msgstr "avance les musiques de {:+d}s" + +#: music_sampler/actions/seek.py:15 +msgid "moving music « {} » to position {}s" +msgstr "avance la musique « {} » en position {}s" + +#: music_sampler/actions/seek.py:18 +msgid "moving all musics to position {}s" +msgstr "avance les musiques en position {}s" + +#: music_sampler/actions/stop.py:40 +msgid "stopping music « {} »" +msgstr "arrête la musique « {} »" + +#: music_sampler/actions/stop.py:40 +msgid "stopping all musics" +msgstr "arrête toutes les musiques" + +#: music_sampler/actions/stop.py:40 +msgid "stopping music « {} » with {}s fadeout" +msgstr "arrête la musique « {} » avec un fadeout de {}s" + +#: music_sampler/actions/stop.py:40 +msgid "stopping all musics with {}s fadeout" +msgstr "arrête toutes les musiques avec un fadeout de {}s" + +#: music_sampler/actions/stop.py:40 +msgid "stopping music « {} » with {}s fadeout (waiting the end of fadeout, with id {})" +msgstr "arrête la musique « {} » avec un fadeout de {}s (attend la fin du fadeout, avec l'identifiant {})" + +#: music_sampler/actions/stop.py:40 +msgid "stopping all musics with {}s fadeout (waiting the end of fadeout, with id {})" +msgstr "arrête toutes les musiques avec un fadeout de {}s (attend la fin du fadeout, avec l'identifiant {})" + +#: music_sampler/actions/stop.py:40 +msgid "stopping music « {} » with {}s fadeout (waiting the end of fadeout)" +msgstr "arrête la musique « {} » avec un fadeout de {}s (attend la fin du fadeout)" + +#: music_sampler/actions/stop.py:40 +msgid "stopping all musics with {}s fadeout (waiting the end of fadeout)" +msgstr "arrête toutes les musiques avec un fadeout de {}s (attend la fin du fadeout)" + +#: music_sampler/actions/unpause.py:8 +msgid "unpausing « {} »" +msgstr "reprend « {} »" + +#: music_sampler/actions/unpause.py:10 +msgid "unpausing all musics" +msgstr "reprend toutes les musiques" + +#: music_sampler/actions/volume.py:32 +msgid "{:+d}% to volume of « {} »" +msgstr "{:+d}% sur le volume de « {} »" + +#: music_sampler/actions/volume.py:32 +msgid "{:+d}% to volume" +msgstr "{:+d}% sur le volume global" + +#: music_sampler/actions/volume.py:32 +msgid "{:+d}% to volume of « {} » with {}s fade" +msgstr "{:+d}% sur le volume de « {} » avec {}s de fade" + +#: music_sampler/actions/volume.py:32 +msgid "{:+d}% to volume with {}s fade" +msgstr "{:+d}% sur le volume global avec {}s de fade" + +#: music_sampler/actions/volume.py:32 +msgid "setting volume of « {} » to {}%" +msgstr "changement du volume de « {} » à {}%" + +#: music_sampler/actions/volume.py:32 +msgid "setting volume to {}%" +msgstr "changement du volume global à {}%" + +#: music_sampler/actions/volume.py:32 +msgid "setting volume of « {} » to {}% with {}s fade" +msgstr "changement du volume de « {} » à {}% avec {}s de fade" + +#: music_sampler/actions/volume.py:32 +msgid "setting volume to {}% with {}s fade" +msgstr "changement du volume global à {}% avec {}s de fade" + +#: music_sampler/actions/wait.py:36 +msgid "waiting {}s" +msgstr "attend {}s" + +#: music_sampler/actions/wait.py:36 +msgid "waiting the end of « {} »" +msgstr "attend la fin de « {} »" + +#: music_sampler/actions/wait.py:36 +msgid "waiting the end of « {} » + {}s" +msgstr "attend la fin de « {} » + {}s" + +#: music_sampler/actions/wait.py:36 +msgid "waiting {}s (setting id = {})" +msgstr "attend {}s (définit l'identifiant {})" + +#: music_sampler/actions/wait.py:36 +msgid "waiting the end of « {} » (setting id = {})" +msgstr "attend la fin de « {} » (définit l'identifiant {})" + +#: music_sampler/actions/wait.py:36 +msgid "waiting the end of « {} » + {}s (setting id = {})" +msgstr "attend la fin de « {} » + {}s (définit l'identifiant {})" + +#: music_sampler/app_blocks/actionlist.py:18 +msgid "actions linked to key {}:" +msgstr "actions liées à la touche {} :" + +#: music_sampler/music_sampler.kv:93 +msgid "Focus lost!" +msgstr "Focus perdu !" + +#: music_sampler/music_sampler.kv:369 +msgid "volume: {}%" +msgstr "volume : {}%" diff --git a/music_sampler/music_sampler.kv b/music_sampler/music_sampler.kv index ae5dbd7..0432e14 100644 --- a/music_sampler/music_sampler.kv +++ b/music_sampler/music_sampler.kv @@ -90,7 +90,7 @@ font_name: "Ubuntu" font_size: self.parent and 2 * self.parent.key_size or 42 text_size: self.size - text: "Focus lost!" + text: _("Focus lost!") : canvas: @@ -366,7 +366,7 @@ font_name: "Ubuntu" font_size: self.parent.font_size or 10 color: 0, 0, 0, 1 - text: "volume: {}%".format(self.parent.master_volume) + text: _("volume: {}%").format(self.parent.master_volume) valign: "top" size_hint: None, None size: self.texture_size[0], self.texture_size[1] -- cgit v1.2.3