From 8ffbee4b5ae81066ac5acba52bba0c97b634722d Mon Sep 17 00:00:00 2001 From: Vladimir Vaskov Date: Sat, 31 Aug 2024 12:24:45 +0300 Subject: [PATCH] translation: change n gettext to context gettext for genders closes #138 --- src/widgets/views/playlist.vala | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/widgets/views/playlist.vala b/src/widgets/views/playlist.vala index e685afc..2c406d3 100644 --- a/src/widgets/views/playlist.vala +++ b/src/widgets/views/playlist.vala @@ -241,12 +241,16 @@ namespace Cassette { playlist_status.label = _("Owner: %s").printf (playlist_info.owner.name); } } else { - // Translators: 0 - female, 1 - male (different gender endings) - string format_string = ngettext ( - "%s updated playlist %s", - "%s updated playlist %s", - playlist_info.owner.sex == "female"? 0 : 1 - ); + string format_string; + if (playlist_info.owner.sex == "female") { + // Translators: %s is female person + format_string = C_ ("female person", "%s updated playlist %s"); + + } else { + // Translators: %s is male person + format_string = C_ ("male person", "%s updated playlist %s"); + } + playlist_status.label = format_string.printf (playlist_info.owner.name, get_when (playlist_info.modified)); }