From c69df101644326860f501d4dadd3a14f2ed05007 Mon Sep 17 00:00:00 2001 From: Eva <42466980+po5@users.noreply.github.com> Date: Wed, 26 Apr 2023 09:02:45 +0200 Subject: [PATCH] tweak: handle plural in audio track list (#530) --- scripts/uosc_shared/intl/es.json | 1 + scripts/uosc_shared/intl/fr.json | 1 + scripts/uosc_shared/lib/menus.lua | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/uosc_shared/intl/es.json b/scripts/uosc_shared/intl/es.json index e53b5f8..bcdc87b 100644 --- a/scripts/uosc_shared/intl/es.json +++ b/scripts/uosc_shared/intl/es.json @@ -44,6 +44,7 @@ "Track %s": "Pista %s", "Utils": "Utilidades", "Video": "Vídeo", + "%s channel": "%s canal", "%s channels": "%s canales", "default": "por defecto", "drive": "unidad", diff --git a/scripts/uosc_shared/intl/fr.json b/scripts/uosc_shared/intl/fr.json index 350554c..9d6af99 100644 --- a/scripts/uosc_shared/intl/fr.json +++ b/scripts/uosc_shared/intl/fr.json @@ -44,6 +44,7 @@ "Track %s": "Piste %s", "Utils": "Outils", "Video": "Vidéo", + "%s channel": "%s canal", "%s channels": "%s canaux", "default": "par défaut", "drive": "lecteur", diff --git a/scripts/uosc_shared/lib/menus.lua b/scripts/uosc_shared/lib/menus.lua index 170eb52..44be3c3 100644 --- a/scripts/uosc_shared/lib/menus.lua +++ b/scripts/uosc_shared/lib/menus.lua @@ -106,7 +106,7 @@ function create_select_tracklist_type_menu_opener(menu_title, track_type, track_ end if track['demux-fps'] then h(string.format('%.5gfps', track['demux-fps'])) end h(track.codec) - if track['audio-channels'] then h(t('%s channels', track['audio-channels'])) end + if track['audio-channels'] then h(t(track['audio-channels'] == 1 and '%s channel' or '%s channels', track['audio-channels'])) end if track['demux-samplerate'] then h(string.format('%.3gkHz', track['demux-samplerate'] / 1000)) end if track.forced then h(t('forced')) end if track.default then h(t('default')) end