Move playlist text to messages.py
This commit is contained in:
parent
4e4e3e44c4
commit
05d3818440
@ -134,6 +134,8 @@ en = {
|
|||||||
|
|
||||||
"invalid-seek-value" : u"Invalid seek value",
|
"invalid-seek-value" : u"Invalid seek value",
|
||||||
"invalid-offset-value" : u"Invalid offset value",
|
"invalid-offset-value" : u"Invalid offset value",
|
||||||
|
"cannot-find-file-for-playlist-switch-error " : u"Could not find file {} for playlist switch!", # Filename
|
||||||
|
"cannot-add-duplicate-error" : u"Could not add second entry for '{}' to the playlist as no duplicates are allowed.", #Filename
|
||||||
|
|
||||||
"switch-file-not-found-error" : u"Could not switch to file '{0}'. Syncplay looks in the folder of the currently playing file and specified media directories.", # File not found
|
"switch-file-not-found-error" : u"Could not switch to file '{0}'. Syncplay looks in the folder of the currently playing file and specified media directories.", # File not found
|
||||||
"folder-search-timeout-error" : u"The search for media in '{}' was aborted as it took too long. This will occur if you select a folder with too many sub-folders in your list of media folders to search through. Until Syncplay is restarted only the directory of the currently open file will be checked.", #Folder
|
"folder-search-timeout-error" : u"The search for media in '{}' was aborted as it took too long. This will occur if you select a folder with too many sub-folders in your list of media folders to search through. Until Syncplay is restarted only the directory of the currently open file will be checked.", #Folder
|
||||||
@ -230,7 +232,8 @@ en = {
|
|||||||
|
|
||||||
"contact-label" : "Feel free to e-mail <a href=\"mailto:dev@syncplay.pl\"><nobr>dev@syncplay.pl</nobr></a>, chat via the <a href=\"https://webchat.freenode.net/?channels=#syncplay\"><nobr>#Syncplay IRC channel</nobr></a> on irc.freenode.net, <a href=\"https://github.com/Uriziel/syncplay/issues\"><nobr>raise an issue</nobr></a> via GitHub, <a href=\"https://www.facebook.com/SyncplaySoftware\"><nobr>like us on Facebook</nobr></a>, <a href=\"https://twitter.com/Syncplay/\"><nobr>follow us on Twitter</nobr></a>, or visit <a href=\"http://syncplay.pl/\"><nobr>http://syncplay.pl/</nobr></a>",
|
"contact-label" : "Feel free to e-mail <a href=\"mailto:dev@syncplay.pl\"><nobr>dev@syncplay.pl</nobr></a>, chat via the <a href=\"https://webchat.freenode.net/?channels=#syncplay\"><nobr>#Syncplay IRC channel</nobr></a> on irc.freenode.net, <a href=\"https://github.com/Uriziel/syncplay/issues\"><nobr>raise an issue</nobr></a> via GitHub, <a href=\"https://www.facebook.com/SyncplaySoftware\"><nobr>like us on Facebook</nobr></a>, <a href=\"https://twitter.com/Syncplay/\"><nobr>follow us on Twitter</nobr></a>, or visit <a href=\"http://syncplay.pl/\"><nobr>http://syncplay.pl/</nobr></a>",
|
||||||
|
|
||||||
"joinroom-menu-label" : "Join room",
|
"joinroom-label" : "Join room",
|
||||||
|
"joinroom-menu-label" : u"Join room {}",
|
||||||
"seektime-menu-label" : "Seek to time",
|
"seektime-menu-label" : "Seek to time",
|
||||||
"undoseek-menu-label" : "Undo seek",
|
"undoseek-menu-label" : "Undo seek",
|
||||||
"play-menu-label" : "Play",
|
"play-menu-label" : "Play",
|
||||||
@ -267,6 +270,21 @@ en = {
|
|||||||
"userguide-menu-label" : "Open user &guide",
|
"userguide-menu-label" : "Open user &guide",
|
||||||
"update-menu-label" : "Check for &update",
|
"update-menu-label" : "Check for &update",
|
||||||
|
|
||||||
|
"removefromplaylist-menu-label" : u"Remove from playlist",
|
||||||
|
"shuffleplaylist-menuu-label" : u"Shuffle playlist",
|
||||||
|
"undoplaylist-menu-label" : u"Undo last change to playlist",
|
||||||
|
"addfilestoplaylist-menu-label" : u"Add file(s) to bottom of playlist",
|
||||||
|
"addurlstoplaylist-menu-label" : u"Add URL(s) to bottom of playlist",
|
||||||
|
|
||||||
|
"addusersfiletoplaylist-menu-label" : u"Add {} file to playlist", # item owner indicator
|
||||||
|
"addusersstreamstoplaylist-menu-label" : u"Add {} stream to playlist", # item owner indicator
|
||||||
|
"openusersstream-menu-label" : u"Open {} stream", # [username]'s
|
||||||
|
"openusersfile-menu-label" : u"Open {} file", # [username]'s
|
||||||
|
"item-is-yours-indicator" : u"your", # Goes with addusersfiletoplaylist/addusersstreamstoplaylist
|
||||||
|
"item-is-others-indicator" : u"{}'s", # username - goes with addusersfiletoplaylist/addusersstreamstoplaylist
|
||||||
|
|
||||||
|
"playlist-instruction-item-message" : u"Drag file here to add it to the shared playlist.",
|
||||||
|
|
||||||
"setoffset-msgbox-label" : "Set offset",
|
"setoffset-msgbox-label" : "Set offset",
|
||||||
"offsetinfo-msgbox-label" : "Offset (see http://syncplay.pl/guide/ for usage instructions):",
|
"offsetinfo-msgbox-label" : "Offset (see http://syncplay.pl/guide/ for usage instructions):",
|
||||||
|
|
||||||
@ -465,7 +483,7 @@ ru = {
|
|||||||
"vlc-interface-oldversion-warning" : u"Внимание: Syncplay обнаружил, что старая версия модуля интерфейса Syncplay для VLC уже установлена в директорию VLC. Пожалуйста, обратитесь к Руководству Пользователя Syncplay (http://syncplay.pl/guide/) за инструкциями о том, как установить syncplay.lua.",
|
"vlc-interface-oldversion-warning" : u"Внимание: Syncplay обнаружил, что старая версия модуля интерфейса Syncplay для VLC уже установлена в директорию VLC. Пожалуйста, обратитесь к Руководству Пользователя Syncplay (http://syncplay.pl/guide/) за инструкциями о том, как установить syncplay.lua.",
|
||||||
"vlc-interface-not-installed" : u"Внимание: Модуль интерфейса Syncplay для VLC не обнаружен в директории VLC. По существу, если Вы используете VLC 2.0, то VLC будет использовать модуль syncplay.lua из директории Syncplay, но в таком случае другие пользовательские скрипты и расширения интерфейса не будут работать. Пожалуйста, обратитесь к Руководству Пользователя Syncplay (http://syncplay.pl/guide/) за инструкциями о том, как установить syncplay.lua.",
|
"vlc-interface-not-installed" : u"Внимание: Модуль интерфейса Syncplay для VLC не обнаружен в директории VLC. По существу, если Вы используете VLC 2.0, то VLC будет использовать модуль syncplay.lua из директории Syncplay, но в таком случае другие пользовательские скрипты и расширения интерфейса не будут работать. Пожалуйста, обратитесь к Руководству Пользователя Syncplay (http://syncplay.pl/guide/) за инструкциями о том, как установить syncplay.lua.",
|
||||||
"media-player-latency-warning": u"Внимание: У Вашего проигрывателя слишком большой отклик ({} секунд). Если Вы замечаете проблемы с синхронизацией, то закройте ресурсоемкие приложения, а если это не помогло - попробуйте другой проигрыватель.", # Seconds to respond
|
"media-player-latency-warning": u"Внимание: У Вашего проигрывателя слишком большой отклик ({} секунд). Если Вы замечаете проблемы с синхронизацией, то закройте ресурсоемкие приложения, а если это не помогло - попробуйте другой проигрыватель.", # Seconds to respond
|
||||||
"mpv-unresponsive-error": u"mpv has not responded for {} seconds so appears to have malfunctioned. Please restart Syncplay.", # Seconds to respond # TODO: Translate to Russian
|
"mpv-unresponsive-error": u"mpv has not responded for {} seconds so appears to have malfunctioned. Please restart Syncplay.", # Seconds to respond # TODO: Translate into Russian
|
||||||
|
|
||||||
# Client prompts
|
# Client prompts
|
||||||
"enter-to-exit-prompt" : u"Для выхода нажмите Enter\n",
|
"enter-to-exit-prompt" : u"Для выхода нажмите Enter\n",
|
||||||
@ -505,6 +523,8 @@ ru = {
|
|||||||
|
|
||||||
"invalid-seek-value" : u"Некорректное значение для перемотки",
|
"invalid-seek-value" : u"Некорректное значение для перемотки",
|
||||||
"invalid-offset-value" : u"Некорректное смещение",
|
"invalid-offset-value" : u"Некорректное смещение",
|
||||||
|
"cannot-find-file-for-playlist-switch-error " : u"Could not find file {} for playlist switch!", # Filename # TODO: Translate into Russian
|
||||||
|
"cannot-add-duplicate-error" : u"Could not add second entry for '{}' to the playlist as no duplicates are allowed.", #Filename # TODO: Translate into Russian
|
||||||
|
|
||||||
"switch-file-not-found-error" : u"Невозможно переключиться на файл '{0}'. Syncplay looks in the folder of the currently playing file and specified media directories.", # File not found # TODO: Translate last part into Russian
|
"switch-file-not-found-error" : u"Невозможно переключиться на файл '{0}'. Syncplay looks in the folder of the currently playing file and specified media directories.", # File not found # TODO: Translate last part into Russian
|
||||||
"folder-search-timeout-error" : u"The search for media in '{}' was aborted as it took too long. This will occur if you select a folder with too many sub-folders in your list of media folders to search through. Until Syncplay is restarted only the directory of the currently open file will be checked.", #Folder # TODO: Translate into Russian
|
"folder-search-timeout-error" : u"The search for media in '{}' was aborted as it took too long. This will occur if you select a folder with too many sub-folders in your list of media folders to search through. Until Syncplay is restarted only the directory of the currently open file will be checked.", #Folder # TODO: Translate into Russian
|
||||||
@ -602,7 +622,8 @@ ru = {
|
|||||||
|
|
||||||
"contact-label" : u"Есть идея, нашли ошибку или хотите оставить отзыв? Пишите на <a href=\"mailto:dev@syncplay.pl\">dev@syncplay.pl</a>, в <a href=\"https://webchat.freenode.net/?channels=#syncplay\">IRC канал #Syncplay</a> на irc.freenode.net или <a href=\"https://github.com/Uriziel/syncplay/issues\">задавайте вопросы через GitHub</a>. Кроме того, заходите на <a href=\"http://syncplay.pl/\">http://syncplay.pl/</a> за инорфмацией, помощью и обновлениями!",
|
"contact-label" : u"Есть идея, нашли ошибку или хотите оставить отзыв? Пишите на <a href=\"mailto:dev@syncplay.pl\">dev@syncplay.pl</a>, в <a href=\"https://webchat.freenode.net/?channels=#syncplay\">IRC канал #Syncplay</a> на irc.freenode.net или <a href=\"https://github.com/Uriziel/syncplay/issues\">задавайте вопросы через GitHub</a>. Кроме того, заходите на <a href=\"http://syncplay.pl/\">http://syncplay.pl/</a> за инорфмацией, помощью и обновлениями!",
|
||||||
|
|
||||||
"joinroom-menu-label" : u"Зайти в комнату",
|
"joinroom-label" : u"Зайти в комнату",
|
||||||
|
"joinroom-menu-label" : u"Зайти в комнату {}",
|
||||||
"seektime-menu-label" : u"Перемотать",
|
"seektime-menu-label" : u"Перемотать",
|
||||||
"undoseek-menu-label" : u"Отменить перемотку",
|
"undoseek-menu-label" : u"Отменить перемотку",
|
||||||
"play-menu-label" : u"Play",
|
"play-menu-label" : u"Play",
|
||||||
@ -639,6 +660,21 @@ ru = {
|
|||||||
"userguide-menu-label" : u"&Руководство Пользователя",
|
"userguide-menu-label" : u"&Руководство Пользователя",
|
||||||
"update-menu-label" : u"Проверить &обновления",
|
"update-menu-label" : u"Проверить &обновления",
|
||||||
|
|
||||||
|
"removefromplaylist-menu-label" : u"Remove from playlist", # TODO: Translate into Russian
|
||||||
|
"shuffleplaylist-menuu-label" : u"Shuffle playlist", # TODO: Translate into Russian
|
||||||
|
"undoplaylist-menu-label" : u"Undo last change to playlist", # TODO: Translate into Russian
|
||||||
|
"addfilestoplaylist-menu-label" : u"Add file(s) to bottom of playlist", # TODO: Translate into Russian
|
||||||
|
"addurlstoplaylist-menu-label" : u"Add URL(s) to bottom of playlist", # TODO: Translate into Russian
|
||||||
|
|
||||||
|
"addusersfiletoplaylist-menu-label" : u"Add {} file to playlist", # item owner indicator # TODO: Translate into Russian
|
||||||
|
"addusersstreamstoplaylist-menu-label" : u"Add {} stream to playlist", # item owner indicator # TODO: Translate into Russian
|
||||||
|
"openusersstream-menu-label" : u"Open {} stream", # [username]'s # TODO: Translate into Russian
|
||||||
|
"openusersfile-menu-label" : u"Open {} file", # [username]'s # TODO: Translate into Russian
|
||||||
|
"item-is-yours-indicator" : u"your", # Goes with addusersfiletoplaylist/addusersstreamstoplaylist # TODO: Translate into Russian
|
||||||
|
"item-is-others-indicator" : u"{}'s", # username - goes with addusersfiletoplaylist/addusersstreamstoplaylist # TODO: Translate into Russian
|
||||||
|
|
||||||
|
"playlist-instruction-item-message" : u"Drag file here to add it to the shared playlist.", # TODO: Translate into Russian
|
||||||
|
|
||||||
"setoffset-msgbox-label" : u"Установить смещение",
|
"setoffset-msgbox-label" : u"Установить смещение",
|
||||||
"offsetinfo-msgbox-label" : u"Смещение (см. инструкцию на странице http://syncplay.pl/guide/):",
|
"offsetinfo-msgbox-label" : u"Смещение (см. инструкцию на странице http://syncplay.pl/guide/):",
|
||||||
|
|
||||||
@ -704,7 +740,7 @@ ru = {
|
|||||||
"seektime-msgbox-label" : u"Перемотать к определенному моменту времени (указывать в секундах или мин:сек). Используйте +/-, чтобы перемотать вперед/назад относительно настоящего момента.",
|
"seektime-msgbox-label" : u"Перемотать к определенному моменту времени (указывать в секундах или мин:сек). Используйте +/-, чтобы перемотать вперед/назад относительно настоящего момента.",
|
||||||
"ready-tooltip" : u"Показывает, готовы ли Вы к просмотру или нет.",
|
"ready-tooltip" : u"Показывает, готовы ли Вы к просмотру или нет.",
|
||||||
"autoplay-tooltip" : u"Автоматическое воспроизведение, когда все пользователи с индикаторами готовности будут готовы и присутствует достаточное число пользователей.",
|
"autoplay-tooltip" : u"Автоматическое воспроизведение, когда все пользователи с индикаторами готовности будут готовы и присутствует достаточное число пользователей.",
|
||||||
"switch-to-file-tooltip" : u"Double click to switch to {}", # Filename # TODO: Translate to Russian
|
"switch-to-file-tooltip" : u"Double click to switch to {}", # Filename # TODO: Translate into Russian
|
||||||
|
|
||||||
# In-userlist notes (GUI)
|
# In-userlist notes (GUI)
|
||||||
"differentsize-note" : u"Размер файла не совпадает!",
|
"differentsize-note" : u"Размер файла не совпадает!",
|
||||||
@ -877,6 +913,8 @@ de = {
|
|||||||
|
|
||||||
"invalid-seek-value" : u"Ungültige Zeitangabe",
|
"invalid-seek-value" : u"Ungültige Zeitangabe",
|
||||||
"invalid-offset-value" : u"Ungültiger Offset-Wert",
|
"invalid-offset-value" : u"Ungültiger Offset-Wert",
|
||||||
|
"cannot-find-file-for-playlist-switch-error " : u"Could not find file {} for playlist switch!", # Filename # TODO: Translate into German
|
||||||
|
"cannot-add-duplicate-error" : u"Could not add second entry for '{}' to the playlist as no duplicates are allowed.", #Filename # TODO: Translate into German
|
||||||
|
|
||||||
"switch-file-not-found-error" : u"Konnte nicht zur Datei '{0}' wechseln. Syncplay sucht im Ordner der aktuellen Datei und angegebenen Medien-Verzeichnissen.", # File not found, folder it was not found in
|
"switch-file-not-found-error" : u"Konnte nicht zur Datei '{0}' wechseln. Syncplay sucht im Ordner der aktuellen Datei und angegebenen Medien-Verzeichnissen.", # File not found, folder it was not found in
|
||||||
"folder-search-timeout-error" : u"Die Suche nach Mediendateien in '{}' wurde abgebrochen weil sie zu lange gedauert hat. Dies tritt auf, wenn ein zu durchsuchender Medienordner zu viele Unterordner hat. Syncplay wird bis zum Neustart nur noch das Verzeichnis der aktuellen Datei durchsuchen.", #Folder
|
"folder-search-timeout-error" : u"Die Suche nach Mediendateien in '{}' wurde abgebrochen weil sie zu lange gedauert hat. Dies tritt auf, wenn ein zu durchsuchender Medienordner zu viele Unterordner hat. Syncplay wird bis zum Neustart nur noch das Verzeichnis der aktuellen Datei durchsuchen.", #Folder
|
||||||
@ -972,7 +1010,8 @@ de = {
|
|||||||
|
|
||||||
"contact-label" : u"Du hast eine Idee, einen Bug gefunden oder möchtest Feedback geben? Sende eine E-Mail an <a href=\"mailto:dev@syncplay.pl\">dev@syncplay.pl</a>, chatte auf dem <a href=\"https://webchat.freenode.net/?channels=#syncplay\">#Syncplay IRC-Kanal</a> auf irc.freenode.net oder <a href=\"https://github.com/Uriziel/syncplay/issues\">öffne eine Fehlermeldung auf GitHub</a>. Außerdem findest du auf <a href=\"http://syncplay.pl/\">http://syncplay.pl/</a> weitere Informationen, Hilfestellungen und Updates.",
|
"contact-label" : u"Du hast eine Idee, einen Bug gefunden oder möchtest Feedback geben? Sende eine E-Mail an <a href=\"mailto:dev@syncplay.pl\">dev@syncplay.pl</a>, chatte auf dem <a href=\"https://webchat.freenode.net/?channels=#syncplay\">#Syncplay IRC-Kanal</a> auf irc.freenode.net oder <a href=\"https://github.com/Uriziel/syncplay/issues\">öffne eine Fehlermeldung auf GitHub</a>. Außerdem findest du auf <a href=\"http://syncplay.pl/\">http://syncplay.pl/</a> weitere Informationen, Hilfestellungen und Updates.",
|
||||||
|
|
||||||
"joinroom-menu-label" : u"Raum beitreten",
|
"joinroom-label" : u"Raum beitreten",
|
||||||
|
"joinroom-menu-label" : u"Raum beitreten {}",
|
||||||
"seektime-menu-label" : u"Spule zu Zeit",
|
"seektime-menu-label" : u"Spule zu Zeit",
|
||||||
"undoseek-menu-label" : u"Rückgängig",
|
"undoseek-menu-label" : u"Rückgängig",
|
||||||
"play-menu-label" : u"Wiedergabe",
|
"play-menu-label" : u"Wiedergabe",
|
||||||
@ -1009,6 +1048,21 @@ de = {
|
|||||||
"userguide-menu-label" : u"&Benutzerhandbuch öffnen",
|
"userguide-menu-label" : u"&Benutzerhandbuch öffnen",
|
||||||
"update-menu-label" : u"auf &Aktualisierung prüfen",
|
"update-menu-label" : u"auf &Aktualisierung prüfen",
|
||||||
|
|
||||||
|
"removefromplaylist-menu-label" : u"Remove from playlist", # TODO: Translate into German
|
||||||
|
"shuffleplaylist-menuu-label" : u"Shuffle playlist", # TODO: Translate into German
|
||||||
|
"undoplaylist-menu-label" : u"Undo last change to playlist", # TODO: Translate into German
|
||||||
|
"addfilestoplaylist-menu-label" : u"Add file(s) to bottom of playlist", # TODO: Translate into German
|
||||||
|
"addurlstoplaylist-menu-label" : u"Add URL(s) to bottom of playlist", # TODO: Translate into German
|
||||||
|
|
||||||
|
"addusersfiletoplaylist-menu-label" : u"Add {} file to playlist", # item owner indicator # TODO: Translate into German
|
||||||
|
"addusersstreamstoplaylist-menu-label" : u"Add {} stream to playlist", # item owner indicator # TODO: Translate into German
|
||||||
|
"openusersstream-menu-label" : u"Open {} stream", # [username]'s # TODO: Translate into German
|
||||||
|
"openusersfile-menu-label" : u"Open {} file", # [username]'s # TODO: Translate into German
|
||||||
|
"item-is-yours-indicator" : u"your", # Goes with addusersfiletoplaylist/addusersstreamstoplaylist # TODO: Translate into German
|
||||||
|
"item-is-others-indicator" : u"{}'s", # username - goes with addusersfiletoplaylist/addusersstreamstoplaylist # TODO: Translate into German
|
||||||
|
|
||||||
|
"playlist-instruction-item-message" : u"Drag file here to add it to the shared playlist.", # TODO: Translate into German
|
||||||
|
|
||||||
"setoffset-msgbox-label" : u"Offset einstellen",
|
"setoffset-msgbox-label" : u"Offset einstellen",
|
||||||
"offsetinfo-msgbox-label" : u"Offset (siehe http://syncplay.pl/guide/ für eine Anleitung [Englisch]):",
|
"offsetinfo-msgbox-label" : u"Offset (siehe http://syncplay.pl/guide/ für eine Anleitung [Englisch]):",
|
||||||
|
|
||||||
|
|||||||
@ -604,17 +604,17 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
firstFile = item.sibling(item.row(), 0).data()
|
firstFile = item.sibling(item.row(), 0).data()
|
||||||
if self._syncplayClient.userlist.currentUser.file is None or firstFile <> self._syncplayClient.userlist.currentUser.file["name"]:
|
if self._syncplayClient.userlist.currentUser.file is None or firstFile <> self._syncplayClient.userlist.currentUser.file["name"]:
|
||||||
if isURL(firstFile):
|
if isURL(firstFile):
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), u"Open stream", lambda: self.openFile(firstFile))
|
menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), getMessage("openstreamurl-menu-label"), lambda: self.openFile(firstFile))
|
||||||
else:
|
else:
|
||||||
pathFound = MainWindow.FileSwitchManager.findFilepath(firstFile)
|
pathFound = MainWindow.FileSwitchManager.findFilepath(firstFile)
|
||||||
if pathFound:
|
if pathFound:
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), u"Open file", lambda: self.openFile(pathFound))
|
menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), getMessage("openmedia-menu-label"), lambda: self.openFile(pathFound))
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "delete.png"), u"Remove from playlist", lambda: self.deleteSelectedPlaylistItems())
|
menu.addAction(QtGui.QPixmap(resourcespath + "delete.png"), getMessage("removefromplaylist-menu-label"), lambda: self.deleteSelectedPlaylistItems())
|
||||||
menu.addSeparator()
|
menu.addSeparator()
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "arrow_switch.png"), u"Shuffle playlist", lambda: self.shufflePlaylist())
|
menu.addAction(QtGui.QPixmap(resourcespath + "arrow_switch.png"), getMessage("shuffleplaylist-menuu-label"), lambda: self.shufflePlaylist())
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "arrow_undo.png"), u"Undo last change to playlist", lambda: self.undoPlaylistChange())
|
menu.addAction(QtGui.QPixmap(resourcespath + "arrow_undo.png"), getMessage("undoplaylist-menu-label"), lambda: self.undoPlaylistChange())
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "film_add.png"), u"Add file(s) to bottom of playlist", lambda: self.OpenAddFilesToPlaylistDialog())
|
menu.addAction(QtGui.QPixmap(resourcespath + "film_add.png"),getMessage("addfilestoplaylist-menu-label"), lambda: self.OpenAddFilesToPlaylistDialog())
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "world_add.png"), u"Add URL(s) to bottom of playlist", lambda: self.OpenAddURIsToPlaylistDialog())
|
menu.addAction(QtGui.QPixmap(resourcespath + "world_add.png"), getMessage("addurlstoplaylist-menu-label"), lambda: self.OpenAddURIsToPlaylistDialog())
|
||||||
menu.exec_(self.playlist.viewport().mapToGlobal(position))
|
menu.exec_(self.playlist.viewport().mapToGlobal(position))
|
||||||
|
|
||||||
|
|
||||||
@ -633,32 +633,32 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
menu = QtGui.QMenu()
|
menu = QtGui.QMenu()
|
||||||
username = item.sibling(item.row(), 0).data()
|
username = item.sibling(item.row(), 0).data()
|
||||||
if username == self._syncplayClient.userlist.currentUser.username:
|
if username == self._syncplayClient.userlist.currentUser.username:
|
||||||
shortUsername = "your" # TODO: Use messages.py
|
shortUsername = getMessage("item-is-yours-indicator")
|
||||||
elif len(username) < 15:
|
elif len(username) < 15:
|
||||||
shortUsername = u"{}'s".format(username)
|
shortUsername = getMessage("item-is-others-indicator").format(username)
|
||||||
else:
|
else:
|
||||||
shortUsername = "{}'s...".format(username[0:12])
|
shortUsername = u"{}...".format(getMessage("item-is-others-indicator").format(username[0:12])) # TODO: Enforce username limits in client and server
|
||||||
|
|
||||||
filename = item.sibling(item.row(), 3).data()
|
filename = item.sibling(item.row(), 3).data()
|
||||||
while item.parent().row() != -1:
|
while item.parent().row() != -1:
|
||||||
item = item.parent()
|
item = item.parent()
|
||||||
roomToJoin = item.sibling(item.row(), 0).data()
|
roomToJoin = item.sibling(item.row(), 0).data()
|
||||||
if roomToJoin <> self._syncplayClient.getRoom():
|
if roomToJoin <> self._syncplayClient.getRoom():
|
||||||
menu.addAction(u"Join room {}".format(roomToJoin), lambda: self.joinRoom(roomToJoin))
|
menu.addAction(getMessage("joinroom-menu-label").format(roomToJoin), lambda: self.joinRoom(roomToJoin))
|
||||||
elif username and filename and filename <> getMessage("nofile-note"):
|
elif username and filename and filename <> getMessage("nofile-note"):
|
||||||
if self.config['sharedPlaylistEnabled'] and not self.isItemInPlaylist(filename):
|
if self.config['sharedPlaylistEnabled'] and not self.isItemInPlaylist(filename):
|
||||||
if isURL(filename):
|
if isURL(filename):
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "world_add.png"), u"Add {} stream to playlist".format(shortUsername), lambda: self.addStreamToPlaylist(filename))
|
menu.addAction(QtGui.QPixmap(resourcespath + "world_add.png"),getMessage("addusersstreamstoplaylist-menu-label").format(shortUsername), lambda: self.addStreamToPlaylist(filename))
|
||||||
else:
|
else:
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "film_add.png"), u"Add {} file to playlist".format(shortUsername), lambda: self.addStreamToPlaylist(filename))
|
menu.addAction(QtGui.QPixmap(resourcespath + "film_add.png"), getMessage("addusersfiletoplaylist-menu-label").format(shortUsername), lambda: self.addStreamToPlaylist(filename))
|
||||||
|
|
||||||
if self._syncplayClient.userlist.currentUser.file is None or filename <> self._syncplayClient.userlist.currentUser.file["name"]:
|
if self._syncplayClient.userlist.currentUser.file is None or filename <> self._syncplayClient.userlist.currentUser.file["name"]:
|
||||||
if isURL(filename):
|
if isURL(filename):
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), u"Open {} stream".format(shortUsername), lambda: self.openFile(filename))
|
menu.addAction(QtGui.QPixmap(resourcespath + "world_go.png"), getMessage("openusersstream-menu-label").format(shortUsername), lambda: self.openFile(filename))
|
||||||
else:
|
else:
|
||||||
pathFound = MainWindow.FileSwitchManager.findFilepath(filename)
|
pathFound = MainWindow.FileSwitchManager.findFilepath(filename)
|
||||||
if pathFound:
|
if pathFound:
|
||||||
menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), u"Open {} file".format(shortUsername), lambda: self.openFile(pathFound))
|
menu.addAction(QtGui.QPixmap(resourcespath + "film_go.png"), getMessage("openusersfile-menu-label").format(shortUsername), lambda: self.openFile(pathFound))
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
menu.exec_(self.listTreeView.viewport().mapToGlobal(position))
|
menu.exec_(self.listTreeView.viewport().mapToGlobal(position))
|
||||||
@ -707,7 +707,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
if pathFound:
|
if pathFound:
|
||||||
self._syncplayClient._player.openFile(pathFound)
|
self._syncplayClient._player.openFile(pathFound)
|
||||||
else:
|
else:
|
||||||
self._syncplayClient.ui.showErrorMessage(u"Could not find file {} for playlist switch!".format(filename))
|
self._syncplayClient.ui.showErrorMessage(getMessage("cannot-find-file-for-playlist-switch-error").format(filename))
|
||||||
|
|
||||||
def roomClicked(self, item):
|
def roomClicked(self, item):
|
||||||
username = item.sibling(item.row(), 0).data()
|
username = item.sibling(item.row(), 0).data()
|
||||||
@ -986,7 +986,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
playlistItems = []
|
playlistItems = []
|
||||||
for playlistItem in xrange(self.playlist.count()):
|
for playlistItem in xrange(self.playlist.count()):
|
||||||
playlistItemText = self.playlist.item(playlistItem).text()
|
playlistItemText = self.playlist.item(playlistItem).text()
|
||||||
if playlistItemText <> u"Drag file here to add it to the shared playlist.":
|
if playlistItemText <> getMessage("playlist-instruction-item-message"):
|
||||||
playlistItems.append(playlistItemText)
|
playlistItems.append(playlistItemText)
|
||||||
return playlistItems
|
return playlistItems
|
||||||
|
|
||||||
@ -1054,7 +1054,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
window.roomInput = QtGui.QLineEdit()
|
window.roomInput = QtGui.QLineEdit()
|
||||||
window.roomInput.returnPressed.connect(self.joinRoom)
|
window.roomInput.returnPressed.connect(self.joinRoom)
|
||||||
window.roomButton = QtGui.QPushButton(QtGui.QIcon(self.resourcespath + 'door_in.png'),
|
window.roomButton = QtGui.QPushButton(QtGui.QIcon(self.resourcespath + 'door_in.png'),
|
||||||
getMessage("joinroom-menu-label"))
|
getMessage("joinroom-label"))
|
||||||
window.roomButton.pressed.connect(self.joinRoom)
|
window.roomButton.pressed.connect(self.joinRoom)
|
||||||
window.roomLayout = QtGui.QHBoxLayout()
|
window.roomLayout = QtGui.QHBoxLayout()
|
||||||
window.roomFrame = QtGui.QFrame()
|
window.roomFrame = QtGui.QFrame()
|
||||||
@ -1085,7 +1085,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
|
|
||||||
self.addPlaybackLayout(window)
|
self.addPlaybackLayout(window)
|
||||||
|
|
||||||
window.playlistGroup = self.PlaylistGroupBox(u"Enable shared playlists")
|
window.playlistGroup = self.PlaylistGroupBox(getMessage("sharedplaylistenabled-label"))
|
||||||
window.playlistGroup.setCheckable(True)
|
window.playlistGroup.setCheckable(True)
|
||||||
window.playlistGroup.toggled.connect(self.changePlaylistEnabledState)
|
window.playlistGroup.toggled.connect(self.changePlaylistEnabledState)
|
||||||
window.playlistLayout = QtGui.QHBoxLayout()
|
window.playlistLayout = QtGui.QHBoxLayout()
|
||||||
@ -1108,7 +1108,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
self.playlistUpdateTimer.start(0.1, True)
|
self.playlistUpdateTimer.start(0.1, True)
|
||||||
noteFont = QtGui.QFont()
|
noteFont = QtGui.QFont()
|
||||||
noteFont.setItalic(True)
|
noteFont.setItalic(True)
|
||||||
playlistItem = QtGui.QListWidgetItem(u"Drag file here to add it to the shared playlist.")
|
playlistItem = QtGui.QListWidgetItem(getMessage("playlist-instruction-item-message"))
|
||||||
playlistItem.setFont(noteFont)
|
playlistItem.setFont(noteFont)
|
||||||
window.playlist.addItem(playlistItem)
|
window.playlist.addItem(playlistItem)
|
||||||
playlistItem.setFont(noteFont)
|
playlistItem.setFont(noteFont)
|
||||||
@ -1448,7 +1448,7 @@ class MainWindow(QtGui.QMainWindow):
|
|||||||
|
|
||||||
def noPlaylistDuplicates(self, filename):
|
def noPlaylistDuplicates(self, filename):
|
||||||
if self.isItemInPlaylist(filename):
|
if self.isItemInPlaylist(filename):
|
||||||
self.showErrorMessage(u"Could not add second entry for '{}' to the playlist as no duplicates are allowed.".format(filename))
|
self.showErrorMessage(getMessage("cannot-add-duplicate-error").format(filename))
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user