From 582b7d16856bef57f65c055a2051a1297c13bda3 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 May 2020 10:30:30 +0200 Subject: [PATCH] MediaPlayer: missing localization Fixes #16062 --- src/apps/mediaplayer/MainWin.cpp | 2 +- src/apps/mediaplayer/playlist/FilePlaylistItem.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apps/mediaplayer/MainWin.cpp b/src/apps/mediaplayer/MainWin.cpp index 6668f62005..b5ebacf9a1 100644 --- a/src/apps/mediaplayer/MainWin.cpp +++ b/src/apps/mediaplayer/MainWin.cpp @@ -1196,7 +1196,7 @@ MainWin::OpenPlaylistItem(const PlaylistItemRef& item) _PlaylistItemOpened(item, ret); } else { BString string; - string << "Opening '" << item->Name() << "'."; + string.SetToFormat(B_TRANSLATE("Opening '%s'.", item->Name()); fControls->SetDisabledString(string.String()); } } diff --git a/src/apps/mediaplayer/playlist/FilePlaylistItem.cpp b/src/apps/mediaplayer/playlist/FilePlaylistItem.cpp index 54840f998d..75b4579dd7 100644 --- a/src/apps/mediaplayer/playlist/FilePlaylistItem.cpp +++ b/src/apps/mediaplayer/playlist/FilePlaylistItem.cpp @@ -150,6 +150,8 @@ FilePlaylistItem::GetAttribute(const Attribute& attribute, BString& string) const { if (attribute == ATTR_STRING_NAME) { + if (fRefs[0].name == NULL) + return B_NAME_NOT_FOUND; string = fRefs[0].name; return B_OK; }