openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #12529
[Merge] lp:~m2j/openlp/work into lp:openlp
m2j has proposed merging lp:~m2j/openlp/work into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~m2j/openlp/work/+merge/80390
name placeholders in extensive string substitutions
add uno to the dependency check
--
https://code.launchpad.net/~m2j/openlp/work/+merge/80390
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/work into lp:openlp.
=== modified file 'openlp/core/lib/htmlbuilder.py'
--- openlp/core/lib/htmlbuilder.py 2011-10-16 08:25:27 +0000
+++ openlp/core/lib/htmlbuilder.py 2011-10-25 20:43:43 +0000
@@ -47,14 +47,14 @@
overflow: hidden;
}
body {
- %s;
+ %(background_css)s;
}
.size {
position: absolute;
left: 0px;
top: 0px;
- width: %spx;
- height: %spx;
+ width: %(width)spx;
+ height: %(height)spx;
}
#black {
z-index: 8;
@@ -73,14 +73,14 @@
#video2 {
z-index: 3;
}
-%s
+%(css_additions)s
#footer {
position: absolute;
z-index: 6;
- %s
+ %(footer_css)s
}
/* lyric css */
-%s
+%(lyrics_css)s
sup {
font-size: 0.6em;
vertical-align: top;
@@ -92,7 +92,7 @@
var timer = null;
var video_timer = null;
var current_video = '1';
- var transition = %s;
+ var transition = %(transitions)s;
function show_video(state, path, volume, loop){
// Note, the preferred method for looping would be to use the
@@ -173,7 +173,7 @@
break;
}
}
- %s
+ %(js_additions)s
function show_image(src){
var img = document.getElementById('image');
img.src = src;
@@ -275,14 +275,14 @@
</script>
</head>
<body>
-<img id="bgimage" class="size" %s />
-<img id="image" class="size" %s />
+<img id="bgimage" class="size" %(bgimage_src)s />
+<img id="image" class="size" %(image_src)s />
<video id="video1" class="size" style="visibility:hidden" autobuffer preload>
</video>
<video id="video2" class="size" style="visibility:hidden" autobuffer preload>
</video>
-%s
-%s
+%(html_additions)s
+%(lyrics_html)s
<div id="footer" class="footer"></div>
<div id="black" class="size"></div>
</body>
@@ -335,17 +335,20 @@
css_additions += plugin.getDisplayCss()
js_additions += plugin.getDisplayJavaScript()
html_additions += plugin.getDisplayHtml()
- html = HTMLSRC % (build_background_css(item, width, height),
- width, height,
- css_additions,
- build_footer_css(item, height),
- build_lyrics_css(item, webkitvers),
- u'true' if theme and theme.display_slide_transition and islive \
- else u'false',
- js_additions,
- bgimage_src, image_src,
- html_additions,
- build_lyrics_html(item, webkitvers))
+ html = HTMLSRC % {
+ u'background_css': build_background_css(item, width, height),
+ u'width': width,
+ u'height': height,
+ u'css_additions': css_additions,
+ u'footer_css': build_footer_css(item, height),
+ u'lyrics_css': build_lyrics_css(item, webkitvers),
+ u'transitions': u'true' if theme and theme.display_slide_transition \
+ and islive else u'false',
+ u'js_additions': js_additions,
+ u'bgimage_src': bgimage_src,
+ u'image_src': image_src,
+ u'html_additions': html_additions,
+ u'lyrics_html':build_lyrics_html(item, webkitvers)}
return html
def webkit_version():
@@ -430,21 +433,21 @@
z-index: 5;
position: absolute;
display: table;
- %s
+ %(table)s
}
.lyricscell {
display: table-cell;
word-wrap: break-word;
- %s
+ %(lyrics)s
}
.lyricsmain {
-%s
+%(main)s
}
.lyricsoutline {
-%s
+%(outline)s
}
.lyricsshadow {
-%s
+%(shadow)s
}
"""
theme = item.themedata
@@ -487,7 +490,8 @@
lyricsmain += u' text-shadow: %s %spx %spx;' % \
(theme.font_main_shadow_color, theme.font_main_shadow_size,
theme.font_main_shadow_size)
- lyrics_css = style % (lyricstable, lyrics, lyricsmain, outline, shadow)
+ lyrics_css = style % {u'table': lyricstable, u'lyrics': lyrics,
+ u'main': lyricsmain, u'outline': outline, u'shadow': shadow}
return lyrics_css
def build_lyrics_outline_css(theme, is_shadow=False):
@@ -592,12 +596,12 @@
Service Item to be processed.
"""
style = u"""
- left: %spx;
- bottom: %spx;
- width: %spx;
- font-family: %s;
- font-size: %spt;
- color: %s;
+ left: %(left)spx;
+ bottom: %(bottom)spx;
+ width: %(width)spx;
+ font-family: %(font)s;
+ font-size: %(size)spt;
+ color: %(color)s;
text-align: left;
white-space: nowrap;
"""
@@ -605,9 +609,9 @@
if not theme or not item.footer:
return u''
bottom = height - int(item.footer.y()) - int(item.footer.height())
- lyrics_html = style % (item.footer.x(), bottom,
- item.footer.width(), theme.font_footer_name,
- theme.font_footer_size, theme.font_footer_color)
+ lyrics_html = style % {u'left': item.footer.x(), u'bottom': bottom,
+ u'width': item.footer.width(), u'font': theme.font_footer_name,
+ u'size': theme.font_footer_size, u'color': theme.font_footer_color}
return lyrics_html
def build_alert_css(alertTab, width):
@@ -618,16 +622,17 @@
Details from the Alert tab for fonts etc
"""
style = u"""
- width: %spx;
- vertical-align: %s;
- font-family: %s;
- font-size: %spt;
- color: %s;
- background-color: %s;
+ width: %(width)spx;
+ vertical-align: %(valign)s;
+ font-family: %(font)s;
+ font-size: %(size)spt;
+ color: %(color)s;
+ background-color: %(bgcolor)s;
"""
if not alertTab:
return u''
align = VerticalType.Names[alertTab.location]
- alert = style % (width, align, alertTab.font_face, alertTab.font_size,
- alertTab.font_color, alertTab.bg_color)
+ alert = style % {u'width': width, u'valign': align,
+ u'font': alertTab.font_face, u'size': alertTab.font_size,
+ u'color': alertTab.font_color, u'bgcolor': alertTab.bg_color}
return alert
=== modified file 'scripts/check_dependencies.py'
--- scripts/check_dependencies.py 2011-10-04 16:02:45 +0000
+++ scripts/check_dependencies.py 2011-10-25 20:43:43 +0000
@@ -73,6 +73,7 @@
'BeautifulSoup',
'mako',
'migrate',
+ 'uno',
]
Follow ups