Scratchpad:Implementation of Parts and Translations

From OpenLP

Jump to: navigation, search

This is a suggestion, how to implement support for parts, translations and -literations. Currently this are my (M²j) own ideas. There is not jet any feedback from a core developer. Feel invited to make your suggestions.

I'm looking forward to hear your suggestions and ideas.

Contents

Songs plugin

The two basic options to define languages in floationg text are per line definition and block definition. I think blockwise definition is more smooth to read. But I didn't find any nice method to define grouping in blockwise definition. So here is a suggestion for linewise definition:

This are the rules:

Some simple example:

---[verse:1]---
Nearerm my God, to Thee, nearer to Thee!
+#de: Näher, mein Gott, zu dir, näher zu dir.
E'en though it be a cross that raiseth me.
+#de: Drückt mich auch Kummer hier, drohet man mir,
still al my song shall be, nearermy God to Thee,
+#de: soll doch trotz Kreutz und Pein dies meine Losung sein:
nearer my God to Thee, nerer to Thee.
+#de: Näher, mein Gott, zu dir, näher zu dir!
---[verse:2]---
Though like the wanderer, The sun gone down,
+#de: Bricht mir, wie Jakob, dort Nacht auch herein,

Also one more complicated:

@men: And I will love and adore Him,
+@men#de: Und ich will ihm lieben und anbeten,
+@women: You are Alpha, Omega,
+@women#de: Du bist der Erste und Letzte,
+@women: Beginning and End,
+@women#de: Anfang und Ende,
@men: an I will bow down before Him.
+@men#de: und ich will mich vor ihm verbeugen.
+@women: You’re my Saviour, Messiah,
+@women#de: Du bist mein Retter, Messias,
+@women: Redeemer and Friend.
+@women#de: Erlöser und Freund.
You’re my Prince of Peace,
+#de: Du bist mein Friedensprinz
and I will live my life for You.
+#de: und ich will für dich leben.

I think the syntax @men: is quite intuitive and still offers much flexibility. As we just check the character in the first column all texts (or HTML tags) are possible if you put a space in the first column.

Still there is the question, if the part tags are equal to displayed part labels. If not: How can we define them in the GUI. Part labels would be nice to display them just once each slide instead of every line.

The Songs plugin has to assign parts, translations and -literations to textClasses. If they aren't assigned, they are not displayed.

Themes

A theme should consist out of a set of areas, textClasses and general properties.

General properties are covering background and slide transition properties.

A area defines:

A textClass defines:

The required textClasses are main and footer. Other classes can be added on a dynamic base. Undefined parameters will be derived from main.

The song plugin defines a textClass for each string. According to the area of this textClass it is layouted on the screen.

If more than one textClass is assigned to a area, the text gets stacked in the order the lines are received from the songs plugin. Later this might get enhanced by enabling translations in blocks on a area level for example.

If the song plugin links to a invalid textClass, the text is displayed by the main class.

This changes the theme XML format. My first draft would just enhance it, but I think as long we are alpha software, this is the better way.

Other ideas

Display

I have a small sample implementation of the rendering in Qt/C++ using QPainter (Screenshot). It has to be discussed, if it should be implemented in QtWebKit.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox