Compare commits

...

25 Commits

Author SHA1 Message Date
Tim Bentley 33a359d373 Fix missing players when processing service items
bzr-revno: 2570
2015-11-29 13:42:13 +00:00
Tim Bentley 1aa7ac6e35 Missed saving the Powerpoint 2015-11-28 15:29:17 +00:00
Tim Bentley c1b63189f3 Fix up missing players for Presentations and Media. 2015-11-28 15:28:43 +00:00
Tim Bentley 06d7060289 Remove \n for remotes posts to alerts to stop abends in maindisplay
bzr-revno: 2569
2015-11-16 21:02:56 +00:00
Tim Bentley 2c8020e58e needs new line 2015-11-15 09:00:26 +00:00
Tim Bentley b606aaeb7f fix crash for remote alerts and add tests 2015-11-15 08:55:13 +00:00
Tim Bentley 414e3a176f Release 2.2.1
bzr-revno: 2568
2015-10-30 20:36:08 +00:00
second@tgc.dk cf4c30458f Make the zionworx importer work under python3.
bzr-revno: 2567
2015-10-29 22:15:47 +01:00
Tomas Groth 36aa35b260 Make zionworx importer work with python3. 2015-10-28 21:50:32 +00:00
raoul@snyman.info 3285088814 [Media Players] Added better detection for VLC, with thanks to Tomas.
Note: I made a test, but this is untestable because of the hidden import inside the function.

lp:~raoul-snyman/openlp/ubuntu-vlc-bug (revision 2563)
[SUCCESS] https//ci.openlp.io/job/Branch-01-Pull/1162/
[SUCCESS] https//ci.openlp.io/job/Branch-02-Functional-Tests/1085/
[SUCCESS] https//ci.openlp.io/job/Branch-03-Interface-Tests/1026/
[SUCCESS] https//ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/873/
[SUCCESS] htt...

bzr-revno: 2566
2015-10-28 21:44:28 +00:00
second@tgc.dk 3393583d6d Implement a workaround for a PyInstaller 3.0 bug to load vlc.
bzr-revno: 2565
Fixes: https://launchpad.net/bugs/1507385
2015-10-28 21:43:54 +00:00
second@tgc.dk 6894f92927 Make OpenLP run on Python 3.3-3.5
bzr-revno: 2564
2015-10-28 21:42:51 +00:00
Tim Bentley 83d57d81af Fix translations
bzr-revno: 2563
2015-10-28 21:39:17 +00:00
Raoul Snyman 851af0b7a5 [Media Players] Added better detection for VLC, with thanks to Tomas. 2015-10-28 01:30:49 +02:00
Tim Bentley 43168d6f8a correct path 2015-10-24 07:03:51 +01:00
Tim Bentley 51bc55d217 Next one 2015-10-24 07:00:07 +01:00
Tim Bentley 41df272c9c Reset back as much as possible2 2015-10-23 18:31:38 +01:00
Tim Bentley 5110715075 Reset back as much as possible 2015-10-23 18:28:41 +01:00
Tomas Groth 8e6d1283f7 Implement a workaround for a PyInstaller 3.0 bug to load vlc. 2015-10-23 18:18:25 +01:00
Tim Bentley 419e8b17fe fix files 2015-10-20 17:42:05 +01:00
Tim Bentley 15ea46a606 fix paths 2015-10-20 17:25:48 +01:00
Tim Bentley 4f0f27296f fixed translations 2015-10-20 17:20:33 +01:00
Tomas Groth b4669e0bf6 pep8 fixes 2015-10-19 23:32:26 +01:00
Tomas Groth 7470205185 Make songselect import work on both python 3.3 and 3.5 2015-10-19 23:26:58 +01:00
Tomas Groth 568904a6cf Fixes for python 3.5. 2015-10-17 23:07:28 +01:00
20 changed files with 704 additions and 404 deletions

View File

@ -1 +1 @@
2.2
2.2.1

View File

@ -514,10 +514,15 @@ class MediaController(RegistryMixin, OpenLPMixin, RegistryProperties):
:param display: Which display to use
:param service_item: The ServiceItem containing the details to be played.
"""
used_players = get_media_players()[0]
used_players = get_media_players()
default_player = used_players[0]
if service_item.processor and service_item.processor != UiStrings().Automatic:
used_players = [service_item.processor.lower()]
# If no player, we can't play
# check to see if the player is usable else use the default one.
if not service_item.processor.lower() in used_players:
used_players = default_player
else:
used_players = [service_item.processor.lower()]
if not used_players:
return False
if controller.media_info.file_info.isFile():

View File

@ -107,6 +107,7 @@ def find_lib():
except OSError: # may fail
dll = ctypes.CDLL('libvlc.so.5')
elif sys.platform.startswith('win'):
ctypes.windll.kernel32.SetDllDirectoryW(None)
p = find_library('libvlc.dll')
if p is None:
try: # some registry settings

View File

@ -84,7 +84,9 @@ def get_vlc():
pass
if is_vlc_available:
try:
vlc_instance = vlc.Instance()
VERSION = vlc.libvlc_get_version().decode('UTF-8')
vlc_instance.release()
except:
VERSION = '0.0.0'
# LooseVersion does not work when a string contains letter and digits (e. g. 2.0.5 Twoflower).
@ -95,6 +97,9 @@ def get_vlc():
if is_vlc_available:
return vlc
else:
# The vlc module may have been imported. Remove it if it has.
if 'openlp.core.ui.media.vendor.vlc' in sys.modules:
del sys.modules['openlp.core.ui.media.vendor.vlc']
return None

View File

@ -48,7 +48,11 @@ class AlertsManager(OpenLPMixin, RegistryMixin, QtCore.QObject, RegistryProperti
:param message: The message text to be displayed
"""
if message:
self.display_alert(message[0])
text = message[0]
# remove line breaks as these crash javascript code on display
while '\n' in text:
text = text.replace('\n', ' ')
self.display_alert(text)
def display_alert(self, text=''):
"""

View File

@ -27,7 +27,6 @@ import re
import socket
import urllib.parse
import urllib.error
from html.parser import HTMLParseError
from bs4 import BeautifulSoup, NavigableString, Tag
@ -290,7 +289,7 @@ class BGExtract(RegistryProperties):
page_source = str(page_source, 'cp1251')
try:
soup = BeautifulSoup(page_source)
except HTMLParseError:
except Exception:
log.error('BeautifulSoup could not parse the Bible page.')
send_error_message('parse')
return None
@ -762,7 +761,7 @@ def get_soup_for_bible_ref(reference_url, header=None, pre_parse_regex=None, pre
try:
soup = BeautifulSoup(page_source)
CLEANER_REGEX.sub('', str(soup))
except HTMLParseError:
except Exception:
log.exception('BeautifulSoup could not parse the bible page.')
if not soup:
send_error_message('parse')

View File

@ -346,6 +346,12 @@ class MessageListener(object):
self.handler = self.media_item.find_controller_by_type(file)
if not self.handler:
return
else:
# the saved handler is not present so need to use one based on file suffix.
if not self.controllers[self.handler].available:
self.handler = self.media_item.find_controller_by_type(file)
if not self.handler:
return
if is_live:
controller = self.live_handler
else:

View File

@ -75,7 +75,8 @@ class ZionWorxImport(SongImport):
"""
Receive a CSV file (from a ZionWorx database dump) to import.
"""
with open(self.import_source, 'rb') as songs_file:
# Encoding should always be ISO-8859-1
with open(self.import_source, 'rt', encoding='ISO-8859-1') as songs_file:
field_names = ['SongNum', 'Title1', 'Title2', 'Lyrics', 'Writer', 'Copyright', 'Keywords',
'DefaultStyle']
songs_reader = csv.DictReader(songs_file, field_names)
@ -112,10 +113,10 @@ class ZionWorxImport(SongImport):
if line and not line.isspace():
verse += line + '\n'
elif verse:
self.add_verse(verse)
self.add_verse(verse, 'v')
verse = ''
if verse:
self.add_verse(verse)
self.add_verse(verse, 'v')
title = self.title
if not self.finish():
self.log_error(translate('SongsPlugin.ZionWorxImport', 'Record %d') % index +
@ -123,8 +124,7 @@ class ZionWorxImport(SongImport):
def _decode(self, str):
"""
Decodes CSV input to unicode, stripping all control characters (except new lines).
Strips all control characters (except new lines).
"""
# This encoding choice seems OK. ZionWorx has no option for setting the
# encoding for its songs, so we assume encoding is always the same.
return str(str, 'cp1252').translate(CONTROL_CHARS_MAP)
# ZionWorx has no option for setting the encoding for its songs, so we assume encoding is always the same.
return str.translate(CONTROL_CHARS_MAP)

View File

@ -23,10 +23,13 @@
The :mod:`~openlp.plugins.songs.lib.songselect` module contains the SongSelect importer itself.
"""
import logging
import sys
from http.cookiejar import CookieJar
from urllib.parse import urlencode
from urllib.request import HTTPCookieProcessor, URLError, build_opener
from html.parser import HTMLParser
if sys.version_info > (3, 4):
from html import unescape
from bs4 import BeautifulSoup, NavigableString
@ -129,11 +132,18 @@ class SongSelectImport(object):
if not search_results:
break
for result in search_results:
song = {
'title': self.html_parser.unescape(result.find('h3').string),
'authors': [self.html_parser.unescape(author.string) for author in result.find_all('li')],
'link': BASE_URL + result.find('a')['href']
}
if sys.version_info > (3, 4):
song = {
'title': unescape(result.find('h3').string),
'authors': [unescape(author.string) for author in result.find_all('li')],
'link': BASE_URL + result.find('a')['href']
}
else:
song = {
'title': self.html_parser.unescape(result.find('h3').string),
'authors': [self.html_parser.unescape(author.string) for author in result.find_all('li')],
'link': BASE_URL + result.find('a')['href']
}
if callback:
callback(song)
songs.append(song)
@ -167,7 +177,10 @@ class SongSelectImport(object):
if callback:
callback()
song['copyright'] = '/'.join([li.string for li in song_page.find('ul', 'copyright').find_all('li')])
song['copyright'] = self.html_parser.unescape(song['copyright'])
if sys.version_info > (3, 4):
song['copyright'] = unescape(song['copyright'])
else:
song['copyright'] = self.html_parser.unescape(song['copyright'])
song['ccli_number'] = song_page.find('ul', 'info').find('li').string.split(':')[1].strip()
song['verses'] = []
verses = lyrics_page.find('section', 'lyrics').find_all('p')
@ -180,9 +193,15 @@ class SongSelectImport(object):
else:
verse['lyrics'] += '\n'
verse['lyrics'] = verse['lyrics'].strip(' \n\r\t')
song['verses'].append(self.html_parser.unescape(verse))
if sys.version_info > (3, 4):
song['verses'].append(unescape(verse))
else:
song['verses'].append(self.html_parser.unescape(verse))
for counter, author in enumerate(song['authors']):
song['authors'][counter] = self.html_parser.unescape(author)
if sys.version_info > (3, 4):
song['authors'][counter] = unescape(author)
else:
song['authors'][counter] = self.html_parser.unescape(author)
return song
def save_song(self, song):

View File

@ -1,4 +1,5 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" sourcelanguage="" version="2.0">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="2.0" language="de" sourcelanguage="">
<context>
<name>AlertsPlugin</name>
<message>
@ -96,14 +97,14 @@ Möchten Sie dennoch fortfahren?</translation>
</message>
<message>
<location filename="openlp/plugins/alerts/forms/alertform.py" line="190"/>
<source>The alert text does not contain '&lt;&gt;'.
<source>The alert text does not contain &apos;&lt;&gt;&apos;.
Do you want to continue anyway?</source>
<translation>Der Hinweistext enthält nicht &apos;&lt;&gt;&apos;.
Möchten Sie dennoch fortfahren?</translation>
</message>
<message>
<location filename="openlp/plugins/alerts/forms/alertform.py" line="107"/>
<source>You haven't specified any text for your alert.
<source>You haven&apos;t specified any text for your alert.
Please type in some text before clicking New.</source>
<translation>Sie haben keinen Text für Ihren Hinweistext eingegeben.
Bitte geben Sie etwas ein.</translation>
@ -1778,7 +1779,10 @@ Bitte beachten Sie, dass Bibeltexte von Onlinebibeln bei Bedarf heruntergeladen
<message numerus="yes">
<location filename="openlp/plugins/custom/lib/mediaitem.py" line="186"/>
<source>Are you sure you want to delete the %n selected custom slide(s)?</source>
<translation><numerusform>Soll die markierte Sonderfolie wirklich gelöscht werden?</numerusform><numerusform>Sollen die markierten %n Sonderfolien wirklich gelöscht werden?</numerusform></translation>
<translation>
<numerusform>Soll die markierte Sonderfolie wirklich gelöscht werden?</numerusform>
<numerusform>Sollen die markierten %n Sonderfolien wirklich gelöscht werden?</numerusform>
</translation>
</message>
</context>
<context>
@ -2416,7 +2420,7 @@ OpenLP is free church presentation software, or lyrics projection software, used
Find out more about OpenLP: http://openlp.org/
OpenLP is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider volunteering by using the button below.</source>
<translation>OpenLP &lt;version&gt;&lt;revision&gt; - Open Lyrics Projection
<translation>OpenLP &lt;version&gt;&lt;revision&gt; - Open Source Lyrics Projection
OpenLP ist ein freies Programm für Präsentationen in Kirchen. Es können Liedtexte, Bibelverse, Videos, Bilder und Präsentationen (wenn Impress, PowerPoint oder der PowerPoint Viewer installiert sind) mittels Beamer und Computer angezeigt werden.
@ -2475,7 +2479,7 @@ Translators
%s
Japanese (ja)
%s
Norwegian Bokmål (nb)
Norwegian Bokm&#xe5;l (nb)
%s
Dutch (nl)
%s
@ -2531,44 +2535,65 @@ Paketierer
Übersetzer
Afrikaans (af)
%s
Deutsch (de)
Czech (cs)
%s
Englisch, Vereinigtes Königreich (en_GB)
Danish (da)
%s
Englisch, Südafrika (en_ZA)
German (de)
%s
Estnisch (et)
Greek (el)
%s
Französisch (fr)
English, United Kingdom (en_GB)
%s
Ungarisch (hu)
English, South Africa (en_ZA)
%s
Japanisch (ja)
Spanish (es)
%s
Norwegisch (nb)
Estonian (et)
%s
Niederländisch (nl)
Finnish (fi)
%s
Portugiesisch, Brasilien (pt_BR)
French (fr)
%s
Russisch (ru)
Hungarian (hu)
%s
Indonesian (id)
%s
Japanese (ja)
%s
Norwegian Bokmål (nb)
%s
Dutch (nl)
%s
Polish (pl)
%s
Portuguese, Brazil (pt_BR)
%s
Russian (ru)
%s
Swedish (sv)
%s
Tamil(Sri-Lanka) (ta_LK)
%s
Chinese(China) (zh_CN)
%s
Dokumentation
Documentation
%s
Erstellt mit
Built With
Python: http://www.python.org/
Qt4: http://qt.nokia.com/
Qt4: http://qt.io
PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro
Oxygen Icons: http://oxygen-icons.org/
Oxygen Icons: http://techbase.kde.org/Projects/Oxygen/
MuPDF: http://www.mupdf.com/
Danke
»Denn so sehr hat Gott die Welt geliebt,
Denn so sehr hat Gott die Welt geliebt,
daß er seinen eingeborenen Sohn
hingegeben hat, damit alle, die an ihn
glauben, nicht verloren gehen, sondern
ewiges Leben haben.« -- Johannes 3, 16
ewiges Leben haben. -- Johannes 3, 16
Als Letztes, aber nicht zuletzt, geht unser
Dank an Gott, unseren Vater, dafür, dass er
@ -2580,8 +2605,8 @@ Danke
</message>
<message>
<location filename="openlp/core/ui/aboutdialog.py" line="270"/>
<source>Copyright © 2004-2015 %s
Portions copyright © 2004-2015 %s</source>
<source>Copyright &#xa9; 2004-2015 %s
Portions copyright &#xa9; 2004-2015 %s</source>
<translation>Copyright © 2004-2015 %s
Teil-Copyright © 2004-2015 %s</translation>
</message>
@ -3927,7 +3952,7 @@ To cancel the First Time Wizard completely (and not start OpenLP), click the %s
<context>
<name>OpenLP.MainDisplay</name>
<message>
<location filename="openlp/core/ui/maindisplay.py" line="213"/>
<location filename="openlp/core/ui/maindisplay.py" line="227"/>
<source>OpenLP Display</source>
<translation>OpenLP-Anzeige</translation>
</message>
@ -6949,7 +6974,7 @@ Diese Dateien werden entfernt, wenn Sie mit dem Speichern fortfahren.</translati
</message>
<message>
<location filename="openlp/plugins/songs/lib/ui.py" line="37"/>
<source>©</source>
<source>&#xa9;</source>
<comment>Copyright symbol.</comment>
<translation>©</translation>
</message>
@ -9117,7 +9142,10 @@ Er wurde wegen einem fehlenden Python-Modul deaktiviert. Wenn Sie diesen Importe
<message numerus="yes">
<location filename="openlp/plugins/songs/lib/mediaitem.py" line="361"/>
<source>Are you sure you want to delete the %n selected song(s)?</source>
<translation><numerusform>Soll das markierte Lied wirklich gelöscht werden?</numerusform><numerusform>Sollen die markierten %n Lieder wirklich gelöscht werden?</numerusform></translation>
<translation>
<numerusform>Soll das markierte Lied wirklich gelöscht werden?</numerusform>
<numerusform>Sollen die markierten %n Lieder wirklich gelöscht werden?</numerusform>
</translation>
</message>
<message>
<location filename="openlp/plugins/songs/lib/mediaitem.py" line="128"/>
@ -9762,4 +9790,4 @@ Bitte &quot;JA&quot; wählen um das Passwort trotzdem zu speichern oder &quot;NE
<translation>Es wurden keine Duplikate gefunden.</translation>
</message>
</context>
</TS>
</TS>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="et" sourcelanguage="" version="2.0">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="2.0" language="et" sourcelanguage="">
<context>
<name>AlertsPlugin</name>
<message>
@ -96,14 +97,14 @@ Kas tahad siiski jätkata?</translation>
</message>
<message>
<location filename="openlp/plugins/alerts/forms/alertform.py" line="190"/>
<source>The alert text does not contain '&lt;&gt;'.
<source>The alert text does not contain &apos;&lt;&gt;&apos;.
Do you want to continue anyway?</source>
<translation>Teate tekst ei sisalda &apos;&lt;&gt;&apos; märke.
Kas tahad siiski jätkata?</translation>
</message>
<message>
<location filename="openlp/plugins/alerts/forms/alertform.py" line="107"/>
<source>You haven't specified any text for your alert.
<source>You haven&apos;t specified any text for your alert.
Please type in some text before clicking New.</source>
<translation>Sa pole oma teatele teksti lisanud.
Enne nupu Uus vajutamist sisesta mingi tekst.</translation>
@ -1777,7 +1778,10 @@ Pane tähele, et veebipiiblite salmid laaditakse internetist vajadusel, seega on
<message numerus="yes">
<location filename="openlp/plugins/custom/lib/mediaitem.py" line="186"/>
<source>Are you sure you want to delete the %n selected custom slide(s)?</source>
<translation><numerusform>Kas tahad kindlasti kustutada %n valitud kohandatud slaidi?</numerusform><numerusform>Kas tahad kindlasti kustutada %n valitud kohandatud slaidi?</numerusform></translation>
<translation>
<numerusform>Kas tahad kindlasti kustutada %n valitud kohandatud slaidi?</numerusform>
<numerusform>Kas tahad kindlasti kustutada %n valitud kohandatud slaidi?</numerusform>
</translation>
</message>
</context>
<context>
@ -2415,7 +2419,7 @@ OpenLP is free church presentation software, or lyrics projection software, used
Find out more about OpenLP: http://openlp.org/
OpenLP is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider volunteering by using the button below.</source>
<translation>OpenLP &lt;version&gt;&lt;revision&gt; - avatud lähtekoodiga laulusõnade kuvaja
<translation>OpenLP &lt;version&gt;&lt;revision&gt; - Open Source Lyrics Projection
OpenLP on tasuta kiriku esitlustarkvara või laulusõnade kuvaja, mis kuvab nii laule, piiblikohti, videoid, pilte ning isegi esitlusi (kui on paigaldatud Impress, PowerPoint või PowerPoint Viewer) kasutades selleks ainult arvutit ja projektorit.
@ -2474,7 +2478,7 @@ Translators
%s
Japanese (ja)
%s
Norwegian Bokmål (nb)
Norwegian Bokm&#xe5;l (nb)
%s
Dutch (nl)
%s
@ -2560,6 +2564,8 @@ Norra Bokmål (nb)
%s
Hollandi (nl)
%s
Poola (pl)
%s
Portugali, Brasiilia (pt_BR)
%s
Vene (ru)
@ -2575,11 +2581,11 @@ Dokumentatsioon
%s
Valmistamiseks kasutati
Python: http://www.python.org
Python: http://www.python.org/
Qt4: http://qt.io
PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro
Oxygeni ikoonid: http://oxygen-icons.org
MuPDF: http://www.mupdf.com
Oxygeni ikoonid: http://techbase.kde.org/Projects/Oxygen/
MuPDF: http://www.mupdf.com/
Lõputänu
&quot;Sest nõnda on Jumal maailma armastanud,
@ -2595,8 +2601,8 @@ vabastanud.</translation>
</message>
<message>
<location filename="openlp/core/ui/aboutdialog.py" line="270"/>
<source>Copyright © 2004-2015 %s
Portions copyright © 2004-2015 %s</source>
<source>Copyright &#xa9; 2004-2015 %s
Portions copyright &#xa9; 2004-2015 %s</source>
<translation>Autoriõigus © 2004-2015 %s
Osade autoriõigus © 2004-2015 %s</translation>
</message>
@ -3955,7 +3961,7 @@ Et katkestada esmakäivituse nõustaja täielikult (ja jätta OpenLP käivitamat
<context>
<name>OpenLP.MainDisplay</name>
<message>
<location filename="openlp/core/ui/maindisplay.py" line="213"/>
<location filename="openlp/core/ui/maindisplay.py" line="227"/>
<source>OpenLP Display</source>
<translation>OpenLP kuva</translation>
</message>
@ -5402,12 +5408,12 @@ Selle lõpuga fail ei ole toetatud</translation>
<message>
<location filename="openlp/core/ui/projector/manager.py" line="476"/>
<source>Delete projector (%s) %s?</source>
<translation type="unfinished"/>
<translation>Kas kustutada projektor (%s) %s?</translation>
</message>
<message>
<location filename="openlp/core/ui/projector/manager.py" line="478"/>
<source>Are you sure you want to delete this projector?</source>
<translation type="unfinished"/>
<translation>Kas tahad kindlasti kustutada selle projektori?</translation>
</message>
</context>
<context>
@ -6978,7 +6984,7 @@ Need failid eemaldatakse, kui sa otsustad siiski salvestada.</translation>
</message>
<message>
<location filename="openlp/plugins/songs/lib/ui.py" line="37"/>
<source>©</source>
<source>&#xa9;</source>
<comment>Copyright symbol.</comment>
<translation>©</translation>
</message>
@ -9143,7 +9149,10 @@ Palun eralda salmid tühikutega.</translation>
<message numerus="yes">
<location filename="openlp/plugins/songs/lib/mediaitem.py" line="361"/>
<source>Are you sure you want to delete the %n selected song(s)?</source>
<translation><numerusform>Kas tahad kindlasti kustutada %n valitud laulu?</numerusform><numerusform>Kas tahad kindlasti kustutada %n valitud laulu?</numerusform></translation>
<translation>
<numerusform>Kas tahad kindlasti kustutada %n valitud laulu?</numerusform>
<numerusform>Kas tahad kindlasti kustutada %n valitud laulu?</numerusform>
</translation>
</message>
<message>
<location filename="openlp/plugins/songs/lib/mediaitem.py" line="128"/>
@ -9786,4 +9795,4 @@ Palun eralda salmid tühikutega.</translation>
<translation>Andmebaasist ei leitud ühtegi dubleerivat laulu.</translation>
</message>
</context>
</TS>
</TS>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_TW" sourcelanguage="" version="2.0">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="2.0" language="zh_TW" sourcelanguage="">
<context>
<name>AlertsPlugin</name>
<message>
@ -95,14 +96,14 @@ Do you want to continue anyway?</source>
</message>
<message>
<location filename="openlp/plugins/alerts/forms/alertform.py" line="190"/>
<source>The alert text does not contain '&lt;&gt;'.
<source>The alert text does not contain &apos;&lt;&gt;&apos;.
Do you want to continue anyway?</source>
<translation>&apos;&lt;&gt;&apos;
</translation>
</message>
<message>
<location filename="openlp/plugins/alerts/forms/alertform.py" line="107"/>
<source>You haven't specified any text for your alert.
<source>You haven&apos;t specified any text for your alert.
Please type in some text before clicking New.</source>
<translation>
</translation>
@ -1777,7 +1778,9 @@ Please note that verses from Web Bibles will be downloaded on demand and so an I
<message numerus="yes">
<location filename="openlp/plugins/custom/lib/mediaitem.py" line="186"/>
<source>Are you sure you want to delete the %n selected custom slide(s)?</source>
<translation><numerusform> %n ?</numerusform></translation>
<translation>
<numerusform> %n ?</numerusform>
</translation>
</message>
</context>
<context>
@ -2417,13 +2420,13 @@ OpenLP is free church presentation software, or lyrics projection software, used
Find out more about OpenLP: http://openlp.org/
OpenLP is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider volunteering by using the button below.</source>
<translation>OpenLP &lt;version&gt;&lt;revision&gt; -
<translation>OpenLP &lt;version&gt;&lt;revision&gt; - Open Source Lyrics Projection
OpenLP是一個免費的教會講道軟體或歌詞投影軟體使(?Impress, PowerPoint或PowerPoint Viewer)
OpenLP is free church presentation software, or lyrics projection software, used to display slides of songs, Bible verses, videos, images, and even presentations (if Impress, PowerPoint or PowerPoint Viewer is installed) for church worship using a computer and a data projector.
查詢更多OpenLP訊息: http://openlp.org/
Find out more about OpenLP: http://openlp.org/
OpenLP是由志願者編寫及維護</translation>
OpenLP is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider volunteering by using the button below.</translation>
</message>
<message>
<location filename="openlp/core/ui/aboutdialog.py" line="663"/>
@ -2447,6 +2450,88 @@ Testers
Packagers
%s
Translators
Afrikaans (af)
%s
Czech (cs)
%s
Danish (da)
%s
German (de)
%s
Greek (el)
%s
English, United Kingdom (en_GB)
%s
English, South Africa (en_ZA)
%s
Spanish (es)
%s
Estonian (et)
%s
Finnish (fi)
%s
French (fr)
%s
Hungarian (hu)
%s
Indonesian (id)
%s
Japanese (ja)
%s
Norwegian Bokm&#xe5;l (nb)
%s
Dutch (nl)
%s
Polish (pl)
%s
Portuguese, Brazil (pt_BR)
%s
Russian (ru)
%s
Swedish (sv)
%s
Tamil(Sri-Lanka) (ta_LK)
%s
Chinese(China) (zh_CN)
%s
Documentation
%s
Built With
Python: http://www.python.org/
Qt4: http://qt.io
PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro
Oxygen Icons: http://techbase.kde.org/Projects/Oxygen/
MuPDF: http://www.mupdf.com/
Final Credit
&quot;For God so loved the world that He gave
His one and only Son, so that whoever
believes in Him will not perish but inherit
eternal life.&quot; -- John 3:16
And last but not least, final credit goes to
God our Father, for sending His Son to die
on the cross, setting us free from sin. We
bring this software to you for free because
He has set us free.</source>
<translation>Project Lead
%s
Developers
%s
Contributors
%s
Testers
%s
Packagers
%s
Translators
Afrikaans (af)
%s
@ -2513,94 +2598,12 @@ Final Credit
God our Father, for sending His Son to die
on the cross, setting us free from sin. We
bring this software to you for free because
He has set us free.</source>
<translation>
%s
%s
%s
%s
%s
Afrikaans (af)
%s
Czech (cs)
%s
Danish (da)
%s
German (de)
%s
Greek (el)
%s
English, United Kingdom (en_GB)
%s
English, South Africa (en_ZA)
%s
Spanish (es)
%s
Estonian (et)
%s
Finnish (fi)
%s
French (fr)
%s
Hungarian (hu)
%s
Indonesian (id)
%s
Japanese (ja)
%s
Norwegian Bokmål (nb)
%s
Dutch (nl)
%s
Polish (pl)
%s
Portuguese, Brazil (pt_BR)
%s
Russian (ru)
%s
Swedish (sv)
%s
Tamil(Sri-Lanka) (ta_LK)
%s
Chinese(China) (zh_CN)
%s
Chinese(Taiwan) (zh_TW)
%s
%s
Python: http://www.python.org/
Qt4: http://qt.io
PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro
Oxygen Icons: http://techbase.kde.org/Projects/Oxygen/
MuPDF: http://www.mupdf.com/
-
&quot;For God so loved the world that He gave
His one and only Son, so that whoever
believes in Him will not perish but inherit
eternal life.&quot; -- John 3:16
&quot;
&quot;-- :16
使</translation>
He has set us free.</translation>
</message>
<message>
<location filename="openlp/core/ui/aboutdialog.py" line="270"/>
<source>Copyright © 2004-2015 %s
Portions copyright © 2004-2015 %s</source>
<source>Copyright &#xa9; 2004-2015 %s
Portions copyright &#xa9; 2004-2015 %s</source>
<translation>Copyright © 2004-2015 %s © 2004-2015 %s</translation>
</message>
</context>
@ -3952,7 +3955,7 @@ To cancel the First Time Wizard completely (and not start OpenLP), click the %s
<context>
<name>OpenLP.MainDisplay</name>
<message>
<location filename="openlp/core/ui/maindisplay.py" line="213"/>
<location filename="openlp/core/ui/maindisplay.py" line="227"/>
<source>OpenLP Display</source>
<translation>OpenLP </translation>
</message>
@ -5399,12 +5402,12 @@ Suffix not supported</source>
<message>
<location filename="openlp/core/ui/projector/manager.py" line="476"/>
<source>Delete projector (%s) %s?</source>
<translation type="unfinished"/>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="openlp/core/ui/projector/manager.py" line="478"/>
<source>Are you sure you want to delete this projector?</source>
<translation type="unfinished"/>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -6975,7 +6978,7 @@ These files will be removed if you continue to save.</source>
</message>
<message>
<location filename="openlp/plugins/songs/lib/ui.py" line="37"/>
<source>©</source>
<source>&#xa9;</source>
<comment>Copyright symbol.</comment>
<translation>©</translation>
</message>
@ -9136,7 +9139,9 @@ Please enter the verses separated by spaces.</source>
<message numerus="yes">
<location filename="openlp/plugins/songs/lib/mediaitem.py" line="361"/>
<source>Are you sure you want to delete the %n selected song(s)?</source>
<translation><numerusform> %n </numerusform></translation>
<translation>
<numerusform> %n </numerusform>
</translation>
</message>
<message>
<location filename="openlp/plugins/songs/lib/mediaitem.py" line="128"/>
@ -9779,4 +9784,4 @@ Please enter the verses separated by spaces.</source>
<translation></translation>
</message>
</context>
</TS>
</TS>

View File

@ -25,7 +25,7 @@ Package to test the openlp.core.ui.media.vlcplayer package.
import os
import sys
from datetime import datetime, timedelta
from unittest import TestCase
from unittest import TestCase, skip
from openlp.core.common import Registry
from openlp.core.ui.media import MediaState, MediaType
@ -50,6 +50,22 @@ class TestVLCPlayer(TestCase, TestMixin):
del sys.modules['openlp.core.ui.media.vendor.vlc']
MockDateTime.revert()
@skip('No way to test this')
@patch('openlp.core.ui.media.vlcplayer.vlc')
def get_vlc_fails_and_removes_module_test(self, mocked_vlc):
"""
Test that when the VLC import fails, it removes the module from sys.modules
"""
# GIVEN: We're on OS X and we don't have the VLC plugin path set
mocked_vlc.Instance.side_effect = NameError
mocked_vlc.libvlc_get_version.return_value = b'0.0.0'
# WHEN: An checking if the player is available
get_vlc()
# THEN: The extra environment variable should be there
self.assertNotIn('openlp.core.ui.media.vendor.vlc', sys.modules)
@patch('openlp.core.ui.media.vlcplayer.is_macosx')
def fix_vlc_22_plugin_path_test(self, mocked_is_macosx):
"""
@ -74,10 +90,6 @@ class TestVLCPlayer(TestCase, TestMixin):
"""
# GIVEN: We're not on OS X and we don't have the VLC plugin path set
mocked_is_macosx.return_value = False
if 'VLC_PLUGIN_PATH' in os.environ:
del os.environ['VLC_PLUGIN_PATH']
if 'openlp.core.ui.media.vendor.vlc' in sys.modules:
del sys.modules['openlp.core.ui.media.vendor.vlc']
# WHEN: An checking if the player is available
get_vlc()

View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2015 OpenLP Developers #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################

View File

@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2015 OpenLP Developers #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
"""
This module contains tests for the CSV Bible importer.
"""
import os
import json
from unittest import TestCase
from tests.functional import MagicMock, patch
from openlp.core.common.registry import Registry
from openlp.plugins.alerts.lib.alertsmanager import AlertsManager
class TestAlertManager(TestCase):
def setUp(self):
"""
Create the UI
"""
Registry.create()
def remove_message_text_test(self):
"""
Test that Alerts are not triggered with empty strings
"""
# GIVEN: A valid Alert Manager
alert_manager = AlertsManager(None)
alert_manager.display_alert = MagicMock()
# WHEN: Called with an empty string
alert_manager.alert_text('')
# THEN: the display should not have been triggered
self.assertFalse(alert_manager.display_alert.called, 'The Alert should not have been called')
def trigger_message_text_test(self):
"""
Test that Alerts are triggered with a text string
"""
# GIVEN: A valid Alert Manager
alert_manager = AlertsManager(None)
alert_manager.display_alert = MagicMock()
# WHEN: Called with an empty string
alert_manager.alert_text(['This is a string'])
# THEN: the display should have been triggered
self.assertTrue(alert_manager.display_alert.called, 'The Alert should have been called')
def line_break_message_text_test(self):
"""
Test that Alerts are triggered with a text string but line breaks are removed
"""
# GIVEN: A valid Alert Manager
alert_manager = AlertsManager(None)
alert_manager.display_alert = MagicMock()
# WHEN: Called with an empty string
alert_manager.alert_text(['This is \n a string'])
# THEN: the display should have been triggered
self.assertTrue(alert_manager.display_alert.called, 'The Alert should have been called')
alert_manager.display_alert.assert_called_once_with('This is a string')

View File

@ -22,14 +22,19 @@
"""
This module contains tests for the ZionWorx song importer.
"""
import os
from unittest import TestCase
from tests.functional import MagicMock, patch
from tests.helpers.songfileimport import SongImportTestHelper
from openlp.plugins.songs.lib.importers.zionworx import ZionWorxImport
from openlp.plugins.songs.lib.importers.songimport import SongImport
from openlp.core.common import Registry
TEST_PATH = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..', '..', 'resources', 'zionworxsongs'))
class TestZionWorxImport(TestCase):
"""
@ -54,3 +59,18 @@ class TestZionWorxImport(TestCase):
# THEN: The importer should be an instance of SongImport
self.assertIsInstance(importer, SongImport)
class TestZionWorxFileImport(SongImportTestHelper):
def __init__(self, *args, **kwargs):
self.importer_class_name = 'ZionWorxImport'
self.importer_module_name = 'zionworx'
super(TestZionWorxFileImport, self).__init__(*args, **kwargs)
def test_song_import(self):
"""
Test that loading an ZionWorx file works correctly on various files
"""
self.file_import(os.path.join(TEST_PATH, 'zionworx.csv'),
self.load_external_result_data(os.path.join(TEST_PATH, 'zionworx.json')))

View File

@ -0,0 +1,45 @@
"1","Crown Him With Many Crowns",,"Crown him with many crowns,
The Lamb upon His throne;
Hark, how the heavenly anthem drowns
All music but its own!
Awake, my soul, and sing
Of Him who died for thee,
And hail Him as thy matchless King
Through all eternity.
Crown Him the Lord of life,
Who triumphed o'er the grave
And rose victorious in the strife
For those He came to save:
His glories now we sing,
Who died and rose on high,
Who died eternal life to bring
And lives that death may die.
Crown Him the Lord of love;
Behold His hands and side,
Those wounds yet visible above
In beauty glorified:
No angel in the sky
Can fully bear that sight,
But downward bends His burning eye
At mysteries so bright.
Crown Him the Lord of peace,
Whose power a sceptre sways
From pole to pole, that wars may cease,
And all be prayer and praise:
His reign shall know no end,
And round His piercèd feet
Fair flowers of paradise extend
Their fragrance ever sweet.
Crown Him the Lord of years,
The Potentate of time,
Creator of the rolling spheres,
Ineffably sublime!
All hail, Redeemer, hail!
For Thou hast died for me;
Thy praise shall never, never fail
Throughout eternity.
","Matthew Bridges","Public Domain",,
1 1 Crown Him With Many Crowns Crown him with many crowns, The Lamb upon His throne; Hark, how the heavenly anthem drowns All music but its own! Awake, my soul, and sing Of Him who died for thee, And hail Him as thy matchless King Through all eternity. Crown Him the Lord of life, Who triumphed o'er the grave And rose victorious in the strife For those He came to save: His glories now we sing, Who died and rose on high, Who died eternal life to bring And lives that death may die. Crown Him the Lord of love; Behold His hands and side, Those wounds yet visible above In beauty glorified: No angel in the sky Can fully bear that sight, But downward bends His burning eye At mysteries so bright. Crown Him the Lord of peace, Whose power a sceptre sways From pole to pole, that wars may cease, And all be prayer and praise: His reign shall know no end, And round His piercèd feet Fair flowers of paradise extend Their fragrance ever sweet. Crown Him the Lord of years, The Potentate of time, Creator of the rolling spheres, Ineffably sublime! All hail, Redeemer, hail! For Thou hast died for me; Thy praise shall never, never fail Throughout eternity. Matthew Bridges Public Domain

View File

@ -0,0 +1,30 @@
{
"authors": [
"Matthew Bridges"
],
"copyright": "Public Domain",
"title": "Crown Him With Many Crowns",
"verse_order_list": [],
"verses": [
[
"Crown him with many crowns,\nThe Lamb upon His throne;\nHark, how the heavenly anthem drowns\nAll music but its own!\nAwake, my soul, and sing\nOf Him who died for thee,\nAnd hail Him as thy matchless King\nThrough all eternity.\n",
"v"
],
[
"Crown Him the Lord of life,\nWho triumphed o'er the grave\nAnd rose victorious in the strife\nFor those He came to save:\nHis glories now we sing,\nWho died and rose on high,\nWho died eternal life to bring\nAnd lives that death may die.\n",
"v"
],
[
"Crown Him the Lord of love;\nBehold His hands and side,\nThose wounds yet visible above\nIn beauty glorified:\nNo angel in the sky\nCan fully bear that sight,\nBut downward bends His burning eye\nAt mysteries so bright.\n",
"v"
],
[
"Crown Him the Lord of peace,\nWhose power a sceptre sways\nFrom pole to pole, that wars may cease,\nAnd all be prayer and praise:\nHis reign shall know no end,\nAnd round His piercèd feet\nFair flowers of paradise extend\nTheir fragrance ever sweet.\n",
"v"
],
[
"Crown Him the Lord of years,\nThe Potentate of time,\nCreator of the rolling spheres,\nIneffably sublime!\nAll hail, Redeemer, hail!\nFor Thou hast died for me;\nThy praise shall never, never fail\nThroughout eternity.\n",
"v"
]
]
}

View File

@ -50,7 +50,8 @@ TAGS = [
['2.1.4', '2532'],
['2.1.5', '2543'],
['2.1.6', '2550'],
['2.2', '2562']
['2.2', '2562'],
['2.2.1', '2568']
]
# Depending on the repository, we sometimes have the 2.0.x tags in the repo too. They come up with a revision number of
# "?", which I suspect is due to the fact that we're using shared repositories. This regular expression matches all