aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/CommandLineOptions/StatusOption/translations/status_plugin_sr_BA.ts
blob: 8f4ac2eea6880a81386983ef8dabfc7ace996e13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="sr_BA">
<context>
    <name>StatusOption</name>
    <message>
        <location filename="../statusoption.cpp" line="32"/>
        <source>Print playback status</source>
        <translation>Испиши стање пуштања</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="34"/>
        <source>Print formatted track name (example: qmmp --nowplaying &quot;%t - %a&quot;)</source>
        <translation>Испиши форматирано име нумере (на примјер: qmmp --nowplaying &quot;%t - %a&quot;)</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="35"/>
        <source>Print --nowplaying syntax</source>
        <translation>Испиши --nowplaying синтаксу</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="88"/>
        <source>Syntax:</source>
        <translation>Синтакса:</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="89"/>
        <source>%p - artist</source>
        <translation>%p - извођач</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="90"/>
        <source>%a - album</source>
        <translation>%a - албум</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="91"/>
        <source>%aa - album artist</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="92"/>
        <source>%t - title</source>
        <translation>%t - наслов</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="93"/>
        <source>%n - track</source>
        <translation>%n - нумера</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="94"/>
        <source>%NN - 2-digit track</source>
        <translation>%NN - двоцифрени бр. нумере</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="95"/>
        <source>%g - genre</source>
        <translation>%g - жанр</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="96"/>
        <source>%c - comment</source>
        <translation>%c - коментар</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="97"/>
        <source>%C - composer</source>
        <translation>%C - композитор</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="98"/>
        <source>%D - disc number</source>
        <translation>%D - број диска</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="99"/>
        <source>%f - file name</source>
        <translation>%f - име фајла</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="100"/>
        <source>%F - full path</source>
        <translation>%F - пуна путања</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="101"/>
        <source>%y - year</source>
        <translation>%y - година</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="102"/>
        <source>%l - duration</source>
        <translation>%l - дужина</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="103"/>
        <source>%{bitrate} - bitrate</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="104"/>
        <source>%{samplerate} - sample rate</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="105"/>
        <source>%{channels} - number of channels</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="106"/>
        <source>%{samplesize} - bits per sample</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="107"/>
        <source>%{format} - format name</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="108"/>
        <source>%{decoder} - decoder name</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="109"/>
        <source>%{filesize} - file size</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="110"/>
        <source>%if(A&amp;B&amp;C,D,E) - condition</source>
        <translation>%if(A&amp;B&amp;C,D,E) - услов</translation>
    </message>
    <message>
        <location filename="../statusoption.cpp" line="111"/>
        <source>%dir(n) - directory name located on n levels above</source>
        <translation type="unfinished"></translation>
    </message>
</context>
</TS>
d">selectPlayList(PlayListModel *model) { if(model != m_selected && m_models.contains(model)) { PlayListModel *prev = m_selected; m_selected = model; emit selectedPlayListChanged(model, prev); emit playListsChanged(); } } void PlayListManager::selectPlayList(int i) { if(i > m_models.count() - 1) return; selectPlayList(playListAt(i)); } void PlayListManager::selectPlayList(const QString &name) { int index = playListNames().indexOf(name); if(index >= 0) selectPlayList(playListAt(index)); } void PlayListManager::selectNextPlayList() { int i = m_models.indexOf(m_selected); i++; if( i >= 0 && i < m_models.size()) selectPlayList(i); } void PlayListManager::selectPreviousPlayList() { int i = m_models.indexOf(m_selected); i--; if( i >= 0 && i < m_models.size()) selectPlayList(i); } void PlayListManager::activatePlayList(PlayListModel *model) { if(model != m_current && m_models.contains(model)) { PlayListModel *prev = m_current; m_current = model; emit currentPlayListChanged(model, prev); emit playListsChanged(); } } void PlayListManager::activatePlayList(int index) { activatePlayList(playListAt(index)); } void PlayListManager::activateSelectedPlayList() { activatePlayList(selectedPlayList()); } PlayListModel *PlayListManager::createPlayList(const QString &name) { PlayListModel *model = new PlayListModel (name.isEmpty() ? tr("Playlist") : name, this); QString pl_name = model->name(); if(playListNames().contains(pl_name)) { int i = 0; forever { i++; if(!playListNames().contains(pl_name + QString(" (%1)").arg(i))) { pl_name = pl_name + QString(" (%1)").arg(i); break; } } model->setName(pl_name); } m_models.append(model); connect(model, SIGNAL(nameChanged(QString)), SIGNAL(playListsChanged())); connect(model, SIGNAL(listChanged(int)), SLOT(onListChanged(int))); emit playListAdded(m_models.indexOf(model)); selectPlayList(model); return model; } void PlayListManager::removePlayList(PlayListModel *model) { if(m_models.count() < 2 || !m_models.contains(model)) return; int i = m_models.indexOf(model); if(m_current == model) { m_current = m_models.at((i > 0) ? (i - 1) : (i + 1)); emit currentPlayListChanged(m_current, model); } if(m_selected == model) { m_selected = m_models.at((i > 0) ? (i - 1) : (i + 1)); emit selectedPlayListChanged(m_selected, model); } m_models.removeAt(i); model->deleteLater(); emit playListRemoved(i); emit playListsChanged(); } void PlayListManager::removePlayList(int index) { removePlayList(playListAt(index)); } void PlayListManager::move(int i, int j) { if(i < 0 || j < 0 || i == j) return; if(i < m_models.count() && j < m_models.count()) { m_models.move(i,j); emit playListMoved(i,j); emit playListsChanged(); } } int PlayListManager::count() const { return m_models.count(); } int PlayListManager::indexOf(PlayListModel *model) const { return m_models.indexOf(model); } PlayListModel *PlayListManager::playListAt(int i) const { if(i >= 0 && i < m_models.count()) return m_models.at(i); return nullptr; } PlayListHeaderModel *PlayListManager::headerModel() { return m_header; } void PlayListManager::readPlayLists() { Qmmp::MetaData metaKey; Qmmp::TrackProperty propKey; QString line, key, value; int current = 0, pl = 0; QList <PlayListTrack *> tracks; QFile file(Qmmp::configDir() + "/playlist.txt"); file.open(QIODevice::ReadOnly); QByteArray array = file.readAll(); file.close(); QBuffer buffer(&array); buffer.open(QIODevice::ReadOnly); while (!buffer.atEnd()) { line = QString::fromUtf8(buffer.readLine().constData()).trimmed(); int s = line.indexOf("="); if (s < 0) continue; key = line.left(s); value = line.right(line.size() - s - 1); if(key == "current_playlist") pl = value.toInt(); else if(key == "playlist") { if(!m_models.isEmpty() && !tracks.isEmpty()) { m_models.last()->add(tracks); m_models.last()->setCurrent(tracks.at(qBound(0, current, tracks.count()-1))); } tracks.clear(); current = 0; m_models << new PlayListModel(value, this); } else if (key == "current") { current = value.toInt(); } else if (key == "file") { tracks << new PlayListTrack(); tracks.last()->setPath(value); } else if (tracks.isEmpty()) continue; else if (key == "duration") tracks.last()->setDuration(value.toInt()); else if (key == "length") tracks.last()->setDuration(value.toInt() * 1000); else if((metaKey = m_metaKeys.value(key, Qmmp::UNKNOWN)) != Qmmp::UNKNOWN) tracks.last()->setValue(metaKey, value); else if((propKey = m_propKeys.value(key, Qmmp::UNKNOWN_PROPERTY)) != Qmmp::UNKNOWN_PROPERTY) tracks.last()->setValue(propKey, value); } buffer.close(); if(m_models.isEmpty()) { m_models << new PlayListModel(tr("Playlist"),this); } else if(!tracks.isEmpty()) { m_models.last()->add(tracks); m_models.last()->setCurrent(tracks.at(qBound(0, current, tracks.count()-1))); } if(pl < 0 || pl >= m_models.count()) pl = 0; m_selected = m_models.at(pl); m_current = m_models.at(pl); for(const PlayListModel *model : qAsConst(m_models)) { connect(model, SIGNAL(nameChanged(QString)), SIGNAL(playListsChanged())); connect(model, SIGNAL(listChanged(int)), SLOT(onListChanged(int))); } } void PlayListManager::writePlayLists() { qDebug("PlayListManager: saving playlists..."); QString value; QString plFilePath = Qmmp::configDir() + "/playlist.txt"; QSaveFile plFile(plFilePath); if(!plFile.open(QIODevice::WriteOnly)) { qDebug("PlayListManager: error: %s", qPrintable(plFile.errorString())); return; } plFile.write(QString("current_playlist=%1\n").arg(m_models.indexOf(m_current)).toUtf8()); for(const PlayListModel *model : qAsConst(m_models)) { plFile.write(QString("playlist=%1\n").arg(model->name()).toUtf8()); if(model->isEmpty()) continue; const QList<PlayListItem *> items = model->items(); plFile.write(QString("current=%1\n").arg(model->indexOfTrack(model->currentIndex())).toUtf8()); for(PlayListItem *m : qAsConst(items)) { if(m->isGroup()) continue; PlayListTrack *t = dynamic_cast<PlayListTrack *>(m); plFile.write(QString("file=%1\n").arg(t->path()).toUtf8()); for(QHash<QString, Qmmp::MetaData>::const_iterator it = m_metaKeys.constBegin(); it != m_metaKeys.constEnd(); ++it) { if(!(value = t->value(it.value())).isEmpty()) plFile.write(QString("%1=%2\n").arg(it.key()).arg(value).toUtf8()); } for(QHash<QString, Qmmp::TrackProperty>::const_iterator it = m_propKeys.constBegin(); it != m_propKeys.constEnd(); ++it) { if(!(value = t->value(it.value())).isEmpty()) plFile.write(QString("%1=%2\n").arg(it.key()).arg(value).toLatin1()); } if(t->duration() > 0) plFile.write(QString("duration=%1\n").arg(t->duration()).toLatin1()); } } plFile.commit(); } void PlayListManager::onListChanged(int flags) { if((flags & PlayListModel::STRUCTURE) && m_ui_settings->autoSavePlayList()) m_timer->start(); } void PlayListManager::clear() { m_selected->clear(); } void PlayListManager::clearSelection() { m_selected->clearSelection(); } void PlayListManager::removeSelected() { m_selected->removeSelected(); } void PlayListManager::removeUnselected() { m_selected->removeUnselected(); } void PlayListManager::removeTrack (int i) { m_selected->removeTrack(i); } void PlayListManager::removeTrack (PlayListTrack *track) { m_selected->removeTrack(track); } void PlayListManager::invertSelection() { m_selected->invertSelection(); } void PlayListManager::selectAll() { m_selected->selectAll(); } void PlayListManager::showDetails() { m_selected->showDetails(); } void PlayListManager::add(const QList<PlayListTrack *> &tracks) { m_selected->add(tracks); } void PlayListManager::add(const QString &path) { m_selected->add(path); } void PlayListManager::add(const QStringList &paths) { m_selected->add(paths); } void PlayListManager::randomizeList() { m_selected->randomizeList(); } void PlayListManager::reverseList() { m_selected->reverseList(); } void PlayListManager::sortSelection(PlayListModel::SortMode mode) { m_selected->sortSelection(mode); } void PlayListManager::sort(PlayListModel::SortMode mode) { m_selected->sort(mode); } void PlayListManager::addToQueue() { m_selected->addToQueue(); } void PlayListManager::removeInvalidTracks() { m_selected->removeInvalidTracks(); } void PlayListManager::removeDuplicates() { m_selected->removeDuplicates(); } void PlayListManager::refresh() { m_selected->refresh(); } void PlayListManager::clearQueue() { m_selected->clearQueue(); } void PlayListManager::stopAfterSelected() { m_selected->stopAfterSelected(); }