Commit 53e23eae authored by Nate Graham's avatar Nate Graham
Browse files

Fix i18n context across the codebase

Some strings had no context, some had context that was redundant with
the user-visible text, and most lacked context markers. All are fixed
now.
parent c2c4ae73
Pipeline #219290 passed with stage
in 5 minutes and 33 seconds
......@@ -7170,7 +7170,7 @@ DataTypes::TrackDataType DatabaseInterface::buildTrackDataFromDatabaseRecord(con
if (trackRecord.value(DatabaseInterfacePrivate::TrackArtistsCount).toInt() == 1) {
result[DataTypes::TrackDataType::key_type::AlbumArtistRole] = trackRecord.value(DatabaseInterfacePrivate::TrackArtistName);
} else if (trackRecord.value(DatabaseInterfacePrivate::TrackArtistsCount).toInt() > 1) {
result[DataTypes::TrackDataType::key_type::AlbumArtistRole] = i18n("Various Artists");
result[DataTypes::TrackDataType::key_type::AlbumArtistRole] = i18nc("@item:intable", "Various Artists");
}
}
......@@ -7234,7 +7234,7 @@ DataTypes::TrackDataType DatabaseInterface::buildRadioDataFromDatabaseRecord(con
result[DataTypes::TrackDataType::key_type::DatabaseIdRole] = trackRecord.value(DatabaseInterfacePrivate::RadioId);
result[DataTypes::TrackDataType::key_type::TitleRole] = trackRecord.value(DatabaseInterfacePrivate::RadioTitle);
result[DataTypes::TrackDataType::key_type::AlbumRole] = i18n("Radio Stations");
result[DataTypes::TrackDataType::key_type::AlbumRole] = i18nc("@item:intable", "Radio Stations");
result[DataTypes::TrackDataType::key_type::ResourceRole] = trackRecord.value(DatabaseInterfacePrivate::RadioHttpAddress);
result[DataTypes::TrackDataType::key_type::ImageUrlRole] = trackRecord.value(DatabaseInterfacePrivate::RadioImageAddress);
result[DataTypes::TrackDataType::key_type::RatingRole] = trackRecord.value(DatabaseInterfacePrivate::RadioRating);
......@@ -8217,7 +8217,7 @@ DataTypes::ListAlbumDataType DatabaseInterface::internalAllAlbumsPartialData(QSq
if (currentRecord.value(DatabaseInterfacePrivate::AlbumsArtistsCount).toInt() == 1) {
newData[DataTypes::SecondaryTextRole] = allArtists.first();
} else if (currentRecord.value(DatabaseInterfacePrivate::AlbumsArtistsCount).toInt() > 1) {
newData[DataTypes::SecondaryTextRole] = i18n("Various Artists");
newData[DataTypes::SecondaryTextRole] = i18nc("@item:intable", "Various Artists");
}
}
newData[DataTypes::ArtistRole] = newData[DataTypes::SecondaryTextRole];
......@@ -8301,7 +8301,7 @@ DataTypes::AlbumDataType DatabaseInterface::internalOneAlbumPartialData(qulonglo
if (currentRecord.value(DatabaseInterfacePrivate::SingleAlbumArtistsCount).toInt() == 1) {
result[DataTypes::SecondaryTextRole] = allArtists.first();
} else if (currentRecord.value(DatabaseInterfacePrivate::SingleAlbumArtistsCount).toInt() > 1) {
result[DataTypes::SecondaryTextRole] = i18n("Various Artists");
result[DataTypes::SecondaryTextRole] = i18nc("@item:intable", "Various Artists");
}
}
result[DataTypes::ArtistRole] = result[DataTypes::SecondaryTextRole];
......
......@@ -172,36 +172,36 @@ void ElisaApplication::setupActions(const QString &actionName)
if (actionName == QLatin1String("toggle_playlist") && KAuthorized::authorizeAction(actionName)) {
auto togglePlaylistAction = d->mCollection.addAction(actionName, this, &ElisaApplication::togglePlaylist);
togglePlaylistAction->setShortcut(QKeySequence(Qt::Key_F9));
togglePlaylistAction->setText(i18n("Toggle Playlist"));
togglePlaylistAction->setText(i18nc("@action", "Toggle Playlist"));
}
if (actionName == QLatin1String("Seek") && KAuthorized::authorizeAction(actionName)) {
auto seekAction = d->mCollection.addAction(actionName, this, &ElisaApplication::seek);
seekAction->setText(i18n("Seek forward 10 seconds"));
seekAction->setText(i18nc("@action", "Seek forward 10 seconds"));
d->mCollection.setDefaultShortcut(seekAction, QKeySequence(Qt::SHIFT | Qt::Key_Right));
}
if (actionName == QLatin1String("Scrub") && KAuthorized::authorizeAction(actionName)) {
auto scrubAction = d->mCollection.addAction(actionName, this, &ElisaApplication::scrub);
scrubAction->setText(i18n("Scrub backwards 10 seconds"));
scrubAction->setText(i18nc("@action", "Scrub backwards 10 seconds"));
d->mCollection.setDefaultShortcut(scrubAction, QKeySequence(Qt::SHIFT | Qt::Key_Left));
}
if (actionName == QLatin1String("NextTrack") && KAuthorized::authorizeAction(actionName)) {
auto nextTrackAction = d->mCollection.addAction(actionName, this, &ElisaApplication::nextTrack);
nextTrackAction->setText(i18n("Go to next track"));
nextTrackAction->setText(i18nc("@action", "Go to next track"));
d->mCollection.setDefaultShortcut(nextTrackAction, QKeySequence(Qt::CTRL | Qt::Key_Right));
}
if (actionName == QLatin1String("PreviousTrack") && KAuthorized::authorizeAction(actionName)) {
auto previousTrackAction = d->mCollection.addAction(actionName, this, &ElisaApplication::previousTrack);
previousTrackAction->setText(i18n("Go to previous track"));
previousTrackAction->setText(i18nc("@action", "Go to previous track"));
d->mCollection.setDefaultShortcut(previousTrackAction, QKeySequence(Qt::CTRL | Qt::Key_Left));
}
if (actionName == QLatin1String("Play-Pause") && KAuthorized::authorizeAction(actionName)) {
auto playPauseAction = d->mCollection.addAction(actionName, this, &ElisaApplication::playPause);
playPauseAction->setText(i18n("Play/pause"));
playPauseAction->setText(i18nc("@action", "Play/pause"));
d->mCollection.setDefaultShortcut(playPauseAction, QKeySequence(Qt::Key_Space));
}
......@@ -212,7 +212,7 @@ void ElisaApplication::setupActions(const QString &actionName)
if (actionName == QLatin1String("togglePartyMode") && KAuthorized::authorizeAction(actionName)) {
auto togglePartyModeAction = d->mCollection.addAction(actionName, this, &ElisaApplication::togglePartyMode);
togglePartyModeAction->setText(i18n("Toggle Party Mode"));
togglePartyModeAction->setText(i18nc("@action", "Toggle Party Mode"));
d->mCollection.setDefaultShortcut(togglePartyModeAction, QKeySequence(Qt::Key_F11));
d->mCollection.addAction(togglePartyModeAction->objectName(), togglePartyModeAction);
}
......
......@@ -107,20 +107,20 @@ int main(int argc, char *argv[])
QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("elisa")));
KAboutData aboutData( QStringLiteral("elisa"),
i18n("Elisa"),
i18nc("@title", "Elisa"),
QStringLiteral(ELISA_VERSION_STRING),
i18n("A Simple Music Player made with love by the KDE community"),
i18nc("@info", "A Simple Music Player made with love by the KDE community"),
KAboutLicense::LGPL_V3,
i18n("(c) 2015-2020, Elisa contributors"));
i18nc("@info", "(c) 2015-2020, Elisa contributors"));
aboutData.addAuthor(QStringLiteral("Matthieu Gallien"),i18n("Creator"), QStringLiteral("mgallien@mgallien.fr"));
aboutData.addAuthor(QStringLiteral("Nate Graham"), i18n("Author"), QStringLiteral("nate@kde.org"));
aboutData.addAuthor(QStringLiteral("Matthieu Gallien"),i18nc("@label", "Creator"), QStringLiteral("mgallien@mgallien.fr"));
aboutData.addAuthor(QStringLiteral("Nate Graham"), i18nc("@label", "Author"), QStringLiteral("nate@kde.org"));
aboutData.addCredit(QStringLiteral("Andrew Lake"), i18n("Concept and design work"), QStringLiteral("jamboarder@gmail.com"));
aboutData.addCredit(QStringLiteral("Luigi Toscano"), i18n("Localization support"), QStringLiteral("luigi.toscano@tiscali.it"));
aboutData.addCredit(QStringLiteral("Safa Alfulaij"), i18n("Right to left support in interface"), QStringLiteral("safa1996alfulaij@gmail.com"));
aboutData.addCredit(QStringLiteral("Diego Gangl"), i18n("Various improvements to the interface"), QStringLiteral("diego@sinestesia.co"));
aboutData.addCredit(QStringLiteral("Jérôme Guidon"), i18n("Support for online radios"), QStringLiteral("guidon@live.fr"));
aboutData.addCredit(QStringLiteral("Andrew Lake"), i18nc("@label", "Concept and design work"), QStringLiteral("jamboarder@gmail.com"));
aboutData.addCredit(QStringLiteral("Luigi Toscano"), i18nc("@label", "Localization support"), QStringLiteral("luigi.toscano@tiscali.it"));
aboutData.addCredit(QStringLiteral("Safa Alfulaij"), i18nc("@label", "Right to left support in interface"), QStringLiteral("safa1996alfulaij@gmail.com"));
aboutData.addCredit(QStringLiteral("Diego Gangl"), i18nc("@label", "Various improvements to the interface"), QStringLiteral("diego@sinestesia.co"));
aboutData.addCredit(QStringLiteral("Jérôme Guidon"), i18nc("@label", "Support for online radios"), QStringLiteral("guidon@live.fr"));
KAboutData::setApplicationData(aboutData);
......
......@@ -345,7 +345,7 @@ void EditableTrackMetadataModel::validData()
}
if (!newValidState) {
mErrorMessage = i18nc("Error message when track URL is invalid", "Invalid URL.");
mErrorMessage = i18nc("@info:status Error message when track URL is invalid", "Invalid URL.");
Q_EMIT errorMessageChanged();
}
......@@ -355,7 +355,7 @@ void EditableTrackMetadataModel::validData()
newValidState = newValidState && !titleData.toString().isEmpty();
if (!newValidState) {
mErrorMessage = i18nc("Error message when track title is empty", "Empty title.");
mErrorMessage = i18nc("@info:status Error message when track title is empty", "Empty title.");
Q_EMIT errorMessageChanged();
}
}
......
......@@ -156,14 +156,14 @@ QString LyricsModel::LyricsModelPrivate::parseTags(QString::const_iterator &begi
return begin;
};
static std::unordered_map<QString, QString> map = {
{QStringLiteral("ar"), i18n("Artist")},
{QStringLiteral("al"), i18n("Album")},
{QStringLiteral("ti"), i18n("Title")},
{QStringLiteral("au"), i18n("Creator")},
{QStringLiteral("length"), i18n("Length")},
{QStringLiteral("by"), i18nc("as in `Created by: Joe`", "Created by")},
{QStringLiteral("re"), i18n("Editor")},
{QStringLiteral("ve"), i18n("Version")}};
{QStringLiteral("ar"), i18nc("@label musical artist", "Artist")},
{QStringLiteral("al"), i18nc("@label musical album", "Album")},
{QStringLiteral("ti"), i18nc("@label song title", "Title")},
{QStringLiteral("au"), i18nc("@label", "Creator")},
{QStringLiteral("length"), i18nc("@label song length", "Length")},
{QStringLiteral("by"), i18nc("@label as in 'Created by: Joe'", "Created by")},
{QStringLiteral("re"), i18nc("@label as in 'a person who edits'", "Editor")},
{QStringLiteral("ve"), i18nc("@label", "Version")}};
QString tags;
while (begin != end) {
......@@ -186,7 +186,7 @@ QString LyricsModel::LyricsModelPrivate::parseTags(QString::const_iterator &begi
bool ok = true;
if (map.count(tagId)) {
tags += i18nc(
"this is a key => value map", "%1: %2\n", map[tagId],
"@label this is a key => value map", "%1: %2\n", map[tagId],
QString(tagIdEnd, std::distance(tagIdEnd, tagContentEnd)));
} else {
// offset tag
......
......@@ -441,39 +441,39 @@ void TrackMetadataModel::addDataByName(const QString &name)
{
DataTypes::ColumnsRoles newRole = DataTypes::TitleRole;
if (name == i18nc("Track title for track metadata view", "Title")) {
if (name == i18nc("@label:textbox Track title for track metadata view", "Title")) {
newRole = DataTypes::TitleRole;
} else if (name == i18nc("Track artist for track metadata view", "Artist")) {
} else if (name == i18nc("@label:textbox Track artist for track metadata view", "Artist")) {
newRole = DataTypes::ArtistRole;
} else if (name == i18nc("Album name for track metadata view", "Album")) {
} else if (name == i18nc("@label:textbox Album name for track metadata view", "Album")) {
newRole = DataTypes::AlbumRole;
} else if (name == i18nc("Album artist for track metadata view", "Album Artist")) {
} else if (name == i18nc("@label:textbox Album artist for track metadata view", "Album Artist")) {
newRole = DataTypes::AlbumArtistRole;
} else if (name == i18nc("Track number for track metadata view", "Track Number")) {
} else if (name == i18nc("@label:textbox Track number for track metadata view", "Track Number")) {
newRole = DataTypes::TrackNumberRole;
} else if (name == i18nc("Disc number for track metadata view", "Disc Number")) {
} else if (name == i18nc("@label:textbox Disc number for track metadata view", "Disc Number")) {
newRole = DataTypes::DiscNumberRole;
} else if (name == i18nc("Rating label for information panel", "Rating")) {
} else if (name == i18nc("@label:textbox Rating label for information panel", "Rating")) {
newRole = DataTypes::RatingRole;
} else if (name == i18nc("Genre label for track metadata view", "Genre")) {
} else if (name == i18nc("@label:textbox Genre label for track metadata view", "Genre")) {
newRole = DataTypes::GenreRole;
} else if (name == i18nc("Lyricist label for track metadata view", "Lyricist")) {
} else if (name == i18nc("@label:textbox Lyricist label for track metadata view", "Lyricist")) {
newRole = DataTypes::LyricistRole;
} else if (name == i18nc("Composer name for track metadata view", "Composer")) {
} else if (name == i18nc("@label:textbox Composer name for track metadata view", "Composer")) {
newRole = DataTypes::ComposerRole;
} else if (name == i18nc("Comment label for track metadata view", "Comment")) {
} else if (name == i18nc("@label:textbox Comment label for track metadata view", "Comment")) {
newRole = DataTypes::CommentRole;
} else if (name == i18nc("Year label for track metadata view", "Year")) {
} else if (name == i18nc("@label:textbox Year label for track metadata view", "Year")) {
newRole = DataTypes::YearRole;
} else if (name == i18nc("Channels label for track metadata view", "Channels")) {
} else if (name == i18nc("@label:textbox Channels label for track metadata view", "Channels")) {
newRole = DataTypes::ChannelsRole;
} else if (name == i18nc("Bit rate label for track metadata view", "Bit Rate")) {
} else if (name == i18nc("@label:textbox Bit rate label for track metadata view", "Bit Rate")) {
newRole = DataTypes::BitRateRole;
} else if (name == i18nc("Sample Rate label for track metadata view", "Sample Rate")) {
} else if (name == i18nc("@label:textbox Sample Rate label for track metadata view", "Sample Rate")) {
newRole = DataTypes::SampleRateRole;
} else if (name == i18nc("Lyrics label for track metadata view", "Lyrics")) {
} else if (name == i18nc("@label:textbox Lyrics label for track metadata view", "Lyrics")) {
newRole = DataTypes::LyricsRole;
} else if (name == i18nc("Duration label for track metadata view", "Duration")) {
} else if (name == i18nc("@label:textbox Duration label for track metadata view", "Duration")) {
newRole = DataTypes::DurationRole;
}
......@@ -488,70 +488,70 @@ QString TrackMetadataModel::nameFromRole(DataTypes::ColumnsRoles role)
switch (role)
{
case DataTypes::TitleRole:
result = i18nc("Track title for track metadata view", "Title");
result = i18nc("@label:textbox Track title for track metadata view", "Title");
break;
case DataTypes::DurationRole:
result = i18nc("Duration label for track metadata view", "Duration");
result = i18nc("@label:textbox Duration label for track metadata view", "Duration");
break;
case DataTypes::ArtistRole:
result = i18nc("Track artist for track metadata view", "Artist");
result = i18nc("@label:textbox Track artist for track metadata view", "Artist");
break;
case DataTypes::AlbumRole:
result = i18nc("Album name for track metadata view", "Album");
result = i18nc("@label:textbox Album name for track metadata view", "Album");
break;
case DataTypes::AlbumArtistRole:
result = i18nc("Album artist for track metadata view", "Album Artist");
result = i18nc("@label:textbox Album artist for track metadata view", "Album Artist");
break;
case DataTypes::TrackNumberRole:
result = i18nc("Track number for track metadata view", "Track Number");
result = i18nc("@label:textbox Track number for track metadata view", "Track Number");
break;
case DataTypes::DiscNumberRole:
result = i18nc("Disc number for track metadata view", "Disc Number");
result = i18nc("@label:textbox Disc number for track metadata view", "Disc Number");
break;
case DataTypes::RatingRole:
result = i18nc("Rating label for information panel", "Rating");
result = i18nc("@label:textbox Rating label for information panel", "Rating");
break;
case DataTypes::GenreRole:
result = i18nc("Genre label for track metadata view", "Genre");
result = i18nc("@label:textbox Genre label for track metadata view", "Genre");
break;
case DataTypes::LyricistRole:
result = i18nc("Lyricist label for track metadata view", "Lyricist");
result = i18nc("@label:textbox Lyricist label for track metadata view", "Lyricist");
break;
case DataTypes::ComposerRole:
result = i18nc("Composer name for track metadata view", "Composer");
result = i18nc("@label:textbox Composer name for track metadata view", "Composer");
break;
case DataTypes::CommentRole:
result = i18nc("Comment label for track metadata view", "Comment");
result = i18nc("@label:textbox Comment label for track metadata view", "Comment");
break;
case DataTypes::YearRole:
result = i18nc("Year label for track metadata view", "Year");
result = i18nc("@label:textbox Year label for track metadata view", "Year");
break;
case DataTypes::ChannelsRole:
result = i18nc("Channels label for track metadata view", "Channels");
result = i18nc("@label:textbox Channels label for track metadata view", "Channels");
break;
case DataTypes::BitRateRole:
result = i18nc("Bit rate label for track metadata view", "Bit Rate");
result = i18nc("@label:textbox Bit rate label for track metadata view", "Bit Rate");
break;
case DataTypes::SampleRateRole:
result = i18nc("Sample Rate label for track metadata view", "Sample Rate");
result = i18nc("@label:textbox Sample Rate label for track metadata view", "Sample Rate");
break;
case DataTypes::LastPlayDate:
result = i18nc("Last play date label for track metadata view", "Last played");
result = i18nc("@label:textbox Last play date label for track metadata view", "Last played");
break;
case DataTypes::FirstPlayDate:
result = i18nc("First play date label for track metadata view", "First played");
result = i18nc("@label:textbox First play date label for track metadata view", "First played");
break;
case DataTypes::PlayCounter:
result = i18nc("Play counter label for track metadata view", "Play count");
result = i18nc("@label:textbox Play counter label for track metadata view", "Play count");
break;
case DataTypes::LyricsRole:
result = i18nc("Lyrics label for track metadata view", "Lyrics");
result = i18nc("@label:textbox Lyrics label for track metadata view", "Lyrics");
break;
case DataTypes::ResourceRole:
result = i18nc("Radio HTTP address for radio metadata view", "Stream Http Address");
result = i18nc("@label:textbox Radio HTTP address for radio metadata view", "Stream Http Address");
break;
case DataTypes::ImageUrlRole:
result = i18nc("Image address for radio metadata view", "Image Address");
result = i18nc("@label:textbox Image address for radio metadata view", "Image Address");
break;
case DataTypes::SecondaryTextRole:
case DataTypes::ShadowForImageRole:
......
......@@ -102,13 +102,13 @@ QVariant ViewsModel::data(const QModelIndex &index, int role) const
switch (d->mViewsData->embeddedCategory())
{
case ElisaUtils::Album:
result = i18nc("Title of the view of all albums", "Albums");
result = i18nc("@title:window Title of the view of all albums", "Albums");
break;
case ElisaUtils::Genre:
result = i18nc("Title of the view of all genres", "Genres");
result = i18nc("@title:window Title of the view of all genres", "Genres");
break;
case ElisaUtils::Artist:
result = i18nc("Title of the view of all artists", "Artists");
result = i18nc("@title:window Title of the view of all artists", "Artists");
break;
case ElisaUtils::Radio:
case ElisaUtils::Track:
......
......@@ -170,7 +170,7 @@ void PowerManagementInterface::inhibitSleepPlasmaWorkspace()
QStringLiteral("org.freedesktop.PowerManagement.Inhibit"),
QStringLiteral("Inhibit"));
inhibitCall.setArguments({{QGuiApplication::desktopFileName()}, {i18nc("explanation for sleep inhibit during play of music", "Playing music")}});
inhibitCall.setArguments({{QGuiApplication::desktopFileName()}, {i18nc("@info:status explanation for sleep inhibit during play of music", "Playing music")}});
auto asyncReply = sessionBus.asyncCall(inhibitCall);
......@@ -220,7 +220,7 @@ void PowerManagementInterface::inhibitSleepGnomeWorkspace()
// 8 = Inhibit the session being marked as idle
// 16 = Inhibit auto-mounting removable media for the session
inhibitCall.setArguments({{QCoreApplication::applicationName()}, {uint(0)},
{i18nc("explanation for sleep inhibit during play of music", "Playing music")}, {uint(12)}});
{i18nc("@info:status explanation for sleep inhibit during play of music", "Playing music")}, {uint(12)}});
auto asyncReply = sessionBus.asyncCall(inhibitCall);
......
......@@ -214,7 +214,7 @@ FocusScope {
sourceComponent: Kirigami.PlaceholderMessage {
anchors.centerIn: parent
icon.name: "edit-none"
text: navigationBar.filterText.length > 0 ? i18n("No matches") : i18n("Nothing to display")
text: navigationBar.filterText.length > 0 ? i18nc("@info:placeholder", "No matches") : i18nc("@info:placeholder", "Nothing to display")
}
}
......
......@@ -13,7 +13,7 @@ import org.kde.kirigami 2.5 as Kirigami
Menu {
id: applicationMenu
title: i18nc("open application menu", "Application Menu")
title: i18nc("@title:menu", "Application Menu")
property var helpAction: ElisaApplication.action("help_contents")
property var reportBugAction: ElisaApplication.action("help_report_bug")
......@@ -30,7 +30,7 @@ Menu {
MenuSeparator {}
Action {
text: i18nc("Scan for New Music application menu entry", "Scan for New Music")
text: i18nc("@action:inmenu", "Scan for New Music")
icon.name: "view-refresh"
onTriggered: {
applicationMenu.close()
......@@ -39,7 +39,7 @@ Menu {
}
Action {
text: i18nc("Reset Database and Re-Scan Everything application menu entry", "Reset Database and Re-Scan Everything")
text: i18nc("@action:inmenu", "Reset Database and Re-Scan Everything")
icon.name: "edit-clear-all"
onTriggered: {
applicationMenu.close()
......@@ -50,7 +50,7 @@ Menu {
MenuSeparator {}
Menu {
title: i18n("Color Scheme")
title: i18nc("@action:inmenu this has child menu items", "Color Scheme")
Repeater {
model: ElisaApplication.colorSchemesModel
delegate: Kirigami.BasicListItem {
......
......@@ -36,7 +36,7 @@ Kirigami.Page {
&& songTitle.length === 0
&& fileUrl.toString().length === 0
title: i18nc("Title of the context view related to the currently playing track", "Now Playing")
title: i18nc("@title:window Title of the context view related to the currently playing track", "Now Playing")
padding: 0
property bool isWidescreen: mainWindow.width >= elisaTheme.viewSelectorSmallSizeThreshold
......@@ -66,7 +66,7 @@ Kirigami.Page {
id: showSidebarButton
objectName: 'showSidebarButton'
visible: Kirigami.Settings.isMobile
text: i18nc("open the sidebar", "Open sidebar")
text: i18nc("@action:button", "Open sidebar")
icon.name: "open-menu-symbolic"
onClicked: mainWindow.globalDrawer.open()
}
......@@ -101,7 +101,7 @@ Kirigami.Page {
checked: !persistentSettings.nowPlayingPreferLyric
display: topItem.isWidescreen ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly
icon.name: "documentinfo"
text: i18nc("One of the 'now playing' views", "Metadata")
text: i18nc("@option:radio One of the 'now playing' views", "Metadata")
visible: !contentLayout.wideMode
}
FlatButtonWithToolTip {
......@@ -112,14 +112,14 @@ Kirigami.Page {
checked: persistentSettings.nowPlayingPreferLyric
display: topItem.isWidescreen ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly
icon.name: "view-media-lyrics"
text: i18nc("One of the 'now playing' views", "Lyrics")
text: i18nc("@option:radio One of the 'now playing' views", "Lyrics")
visible: !contentLayout.wideMode
}
FlatButtonWithToolTip {
id: showPlaylistButton
visible: Kirigami.Settings.isMobile
text: i18nc("show the playlist", "Show Playlist")
text: i18nc("@action:button", "Show Playlist")
icon.name: "view-media-playlist"
display: topItem.isWidescreen ? AbstractButton.TextBesideIcon : AbstractButton.IconOnly
onClicked: {
......@@ -338,7 +338,7 @@ Kirigami.Page {
visible: active && status === Loader.Ready
sourceComponent: Kirigami.PlaceholderMessage {
text: i18n("No lyrics found")
text: i18nc("@info:placeholder", "No lyrics found")
icon.name: "view-media-lyrics"
}
}
......@@ -356,7 +356,7 @@ Kirigami.Page {
sourceComponent: Kirigami.PlaceholderMessage {
anchors.centerIn: parent
text: i18n("Nothing playing")
text: i18nc("@info:placeholder", "Nothing playing")
icon.name: "view-media-track"
}
}
......@@ -390,7 +390,7 @@ Kirigami.Page {
actions: [
Kirigami.Action {
text: i18n("Show In Folder")
text: i18nc("@action:button", "Show In Folder")
icon.name: 'document-open-folder'
visible: metaDataModel.fileUrl.toString() !== "" && !metaDataModel.fileUrl.toString().startsWith("http") && !metaDataModel.fileUrl.toString().startsWith("rtsp")
onTriggered: {
......
......@@ -36,7 +36,7 @@ RowLayout {
TextMetrics {
id: durationTextMetrics
text: i18nc("This is used to preserve a fixed width for the duration text.", "00:00:00")
text: i18nc("@info:placeholder This is used to preserve a fixed width for the duration text.", "00:00:00")
}
LabelWithToolTip {
......
......@@ -18,7 +18,7 @@ import org.kde.elisa 1.0
Window {
id: dialog
title: i18n("Configure")
title: i18nc("@title:window", "Configure")
visible: true
modality: Qt.ApplicationModal
......@@ -40,7 +40,7 @@ Window {
footer: QQC2.DialogButtonBox {
QQC2.Button {
text: i18n("OK")
text: i18nc("@action:button", "OK")
icon.name: 'dialog-ok-apply'
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
Accessible.onPressAction: onClicked
......@@ -51,7 +51,7 @@ Window {
}
QQC2.Button {
text: i18n("Apply")
text: i18nc("@action:button", "Apply")
icon.name: 'dialog-ok-apply'
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.ApplyRole
Accessible.onPressAction: onClicked
......@@ -61,7 +61,7 @@ Window {
onApplied: ElisaConfigurationDialog.save()
QQC2.Button {
text: i18n("Cancel")
text: i18nc("@action:button", "Cancel")
icon.name: 'dialog-cancel'
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole
Accessible.onPressAction: onClicked
......@@ -78,10 +78,10 @@ Window {
standardButtons: Dialogs.StandardButton.Save | Dialogs.StandardButton.Discard | Dialogs.StandardButton.Cancel
title: i18n("Warning")
title: i18nc("@title:window", "Warning")
icon: Dialogs.StandardIcon.Warning
text: i18n('You have unsaved changes. Do you want to apply the changes or discard them?')
text: i18nc("@info", 'You have unsaved changes. Do you want to apply the changes or discard them?')
onDiscard: {
ElisaConfigurationDialog.cancel()
......
......@@ -23,11 +23,11 @@ Kirigami.ApplicationWindow {
Connections {
target: ElisaApplication.mediaPlayListProxyModel
function onPlayListLoadFailed() {
showPassiveNotification(i18n("Loading failed"), 7000, i18n("Retry"), function() { loadPlaylistButton.clicked(); })
showPassiveNotification(i18nc("@label", "Loading failed"), 7000, i18nc("@action:button", "Retry"), function() { loadPlaylistButton.clicked(); })
}
function onDisplayUndoNotification() {
showPassiveNotification(i18n("Playlist cleared"), 7000, i18n("Undo"), function() { ElisaApplication.mediaPlayListProxyModel.undoClearPlayList(); })
showPassiveNotification(i18nc("@label", "Playlist cleared"), 7000, i18nc("@action:button", "Undo"), function() { ElisaApplication.mediaPlayListProxyModel.undoClearPlayList(); })
}
}
......@@ -70,7 +70,7 @@ Kirigami.ApplicationWindow {
width: persistentSettings.width
height: persistentSettings.height
title: ElisaApplication.manageHeaderBar.title ? i18nc("Window title", "%1 — Elisa", ElisaApplication.manageHeaderBar.title) : i18nc("Window title", "Elisa")
title: ElisaApplication.manageHeaderBar.title ? i18nc("@title:window", "%1 — Elisa", ElisaApplication.manageHeaderBar.title) : i18nc("@title:window", "Elisa")
Accessible.role: Accessible.Application
Accessible.name: title
......@@ -154,13 +154,13 @@ Kirigami.ApplicationWindow {
defaultSuffix: 'm3u8'
folder: StandardPaths.writableLocation(StandardPaths.MusicLocation)
nameFilters: [i18nc("file type (mime type) for m3u and m3u8 playlist file formats", "Playlist (*.m3u*)")]
nameFilters: [i18nc("@option file type (mime type) for m3u and m3u8 playlist file formats; do not translate *.m3u*", "Playlist (*.m3u*)")]
onAccepted:
{
if (fileMode === FileDialog.SaveFile) {
if (!ElisaApplication.mediaPlayListProxyModel.savePlayList(fileDialog.file)) {
showPassiveNotification(i18n("Saving failed"), 7000, i18n("Retry"), function() { savePlaylistButton.clicked(); })
showPassiveNotification(i18nc("@label", "Saving failed"), 7000, i18nc("@action:button", "Retry"), function() { savePlaylistButton.clicked(); })
}
} else {
ElisaApplication.mediaPlayListProxyModel.loadPlayList(fileDialog.file)
......
......@@ -234,7 +234,7 @@ FocusScope {
ToolTip.visible: hovered
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
ToolTip.text: i18nc("Show the file for this song in the file manager", "Show in folder")
ToolTip.text: i18nc("@action:button Show the file for this song in the file manager", "Show in folder")