[vlc-commits] [Git][videolan/vlc][master] macosx: Fix singular form of playlist detail string

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Jul 5 09:46:41 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
c763aa10 by Claudio Cambra at 2026-07-05T09:28:13+00:00
macosx: Fix singular form of playlist detail string

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryDataTypes.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryDataTypes.m
=====================================
@@ -1010,7 +1010,8 @@ static NSString *genreArrayDisplayString(NSArray<VLCMediaLibraryGenre *> * const
         self.libraryID = p_playlist->i_id;
         self.smallArtworkMRL = toNSStr(p_playlist->psz_artwork_mrl);
         self.displayString = toNSStr(p_playlist->psz_name);
-        self.primaryDetailString = [NSString stringWithFormat:@"%u items", p_playlist->i_nb_media];
+        const unsigned int numberOfMedia = p_playlist->i_nb_media;
+        self.primaryDetailString = numberOfMedia == 0 ? _NS("No item") : _NPS("%u item", "%u items", numberOfMedia);
         self.durationString = [NSString stringWithTime:p_playlist->i_duration / VLCMediaLibraryMediaItemDurationDenominator];
 
         _MRL = toNSStr(p_playlist->psz_mrl);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c763aa10c29690a45f98e6f6b6040b6accdd9396

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c763aa10c29690a45f98e6f6b6040b6accdd9396
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list