Skip to content

Commit

Permalink
translation: change n gettext to context gettext for genders
Browse files Browse the repository at this point in the history
closes #138
  • Loading branch information
Rirusha committed Aug 31, 2024
1 parent 36669d0 commit 8ffbee4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/widgets/views/playlist.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 8ffbee4

Please sign in to comment.