Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Eirea <geirea@gmail.com>2012-12-11 21:35:07 (GMT)
committer Gabriel Eirea <geirea@gmail.com>2012-12-11 21:35:07 (GMT)
commite37b2fe4d4b02b1c186006fef25e907447957690 (patch)
treedfc211f0d04a4df5a192c0a9201cd7e0ce946342
parentef418bf07fe6e4cc3fc23bd34b64f0d730b27c48 (diff)
Improved tutorial_book, translated help text, and some style changesHEADmaster
-rw-r--r--Toolbars.py60
-rw-r--r--abook.py19
-rw-r--r--textbook.py57
3 files changed, 106 insertions, 30 deletions
diff --git a/Toolbars.py b/Toolbars.py
index b1df153..2dc5c30 100644
--- a/Toolbars.py
+++ b/Toolbars.py
@@ -32,9 +32,15 @@ except ImportError:
print 'NO SE ESTA EN SUGAR.. SALIENDO'
sys.exit()
Fonts = Combo()
-Fonts.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8", "Monospace 12", "Monospace 24", "Times New Roman 8", "Times New Roman 12", "Times New Roman 24", "FreeSans 8", "FreeSans 12", "FreeSans 24"])
+Fonts.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8",
+ "Monospace 12", "Monospace 24", "Times New Roman 8",
+ "Times New Roman 12", "Times New Roman 24", "FreeSans 8",
+ "FreeSans 12", "FreeSans 24"])
Title_Tam = Combo()
-Title_Tam.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8", "Monospace 12", "Monospace 24", "Times New Roman 8", "Times New Roman 12", "Times New Roman 24", "FreeSans 8", "FreeSans 12", "FreeSans 24"])
+Title_Tam.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8",
+ "Monospace 12", "Monospace 24", "Times New Roman 8",
+ "Times New Roman 12", "Times New Roman 24", "FreeSans 8",
+ "FreeSans 12", "FreeSans 24"])
ColorLetra = ColorToolButton()
ColorTitle = ColorToolButton()
ColorFondo = ColorToolButton()
@@ -51,12 +57,13 @@ book_button = ToolButton("edit-p")
page_button = ToolButton("edit-c")
check_button = ToolButton("broken")
+
def Color_Toolbar(toolbar):
color_button = ToolbarButton(icon_name='color-preview')
color_toolbar = gtk.Toolbar()
- ColorContentLabel = gtk.Label(_('Color for content')) # Duda ¿Es content o context?
- ColorFondoLabel = gtk.Label(_('Color for page'))
- ColorTitleLabel = gtk.Label(_('Color for title'))
+ ColorContentLabel = gtk.Label(_('Text color'))
+ ColorFondoLabel = gtk.Label(_('Page color'))
+ ColorTitleLabel = gtk.Label(_('Title color'))
# Contenido del libro
Item = gtk.ToolItem()
Item.add(ColorContentLabel)
@@ -84,6 +91,8 @@ def Color_Toolbar(toolbar):
color_button.props.page = color_toolbar
color_toolbar.show_all()
toolbar.toolbar.insert(color_button, -1)
+
+
def Text_Toolbar(toolbar):
text_button = ToolbarButton(icon_name="format-text-size")
text_toolbar = gtk.Toolbar()
@@ -114,6 +123,8 @@ def Text_Toolbar(toolbar):
text_toolbar.show_all()
text_button.props.page = text_toolbar
toolbar.toolbar.insert(text_button, -1)
+
+
def Read_Toolbar(toolbar):
# read toolbar
read_button = ToolbarButton(icon_name="read")
@@ -146,6 +157,8 @@ def Read_Toolbar(toolbar):
tutorial.show()
credits.show()
toolbar.toolbar.insert(read_button, -1)
+
+
def Write_Toolbar(toolbar):
# write toolbar
write_button = ToolbarButton(icon_name="edit")
@@ -169,27 +182,28 @@ def Write_Toolbar(toolbar):
write_button.props.page = write_toolbar
write_toolbar.show_all()
toolbar.toolbar.insert(write_button, -1)
+
def Ayuda(toolbar):
Boton_Ayuda = Ayudas()
# Porfavor, traducir esto al ingles! #
- Boton_Ayuda.add_section(_("Crear un libro"))
- Boton_Ayuda.add_paragraph(_("Para crear un nuevo libro debes hacer click en el icono"),'edit')
- Boton_Ayuda.add_paragraph(_("Posterior a esto haz click en:"),'new')
- Boton_Ayuda.add_section(_("Editar un libro"))
- Boton_Ayuda.add_paragraph(_("Para editar el libro debes hacer click en"),'edit')
- Boton_Ayuda.add_paragraph(_("Luego haz click en:"),'edit-c')
- Boton_Ayuda.add_section(_("Editar las propiedades"))
- Boton_Ayuda.add_paragraph(_("Para editar las propiedades debes hacer click en"),'edit')
- Boton_Ayuda.add_paragraph(_("Despues haz click en:"),'edit-p')
- Boton_Ayuda.add_section(_("Leer un libro"))
- Boton_Ayuda.add_paragraph(_("Para leer un libro debes hacer click en:"),'read')
- Boton_Ayuda.add_paragraph(_("Si quieres ir a la primer página debes hacer click en:"),'home')
- Boton_Ayuda.add_paragraph(_("Si quieres cargar tu libro haz click en:"),'open-from-journal')
- Boton_Ayuda.add_paragraph(_("Si te interesan los créditos haz click en:"),'credits')
- Boton_Ayuda.add_section(_("Editar la 'letra'"))
- Boton_Ayuda.add_paragraph(_("Para editar la tipografía de un libro debes hacer click en:"),'format-text-size')
- Boton_Ayuda.add_paragraph(_("Si tu quieres editar el nombre de la tipografía deberas hacer click donde dice 'Purisa 8', se desplegara una lista de fuentes. Selecciona una"))
- Boton_Ayuda.add_paragraph(_("Si quieres editar el color haz click en:"), 'color-preview')
+ Boton_Ayuda.add_section(_("Creating a book"))
+ Boton_Ayuda.add_paragraph(_("To create a new book, click on"),'edit')
+ Boton_Ayuda.add_paragraph(_("Then click on"),'new')
+ Boton_Ayuda.add_section(_("Editing a book"))
+ Boton_Ayuda.add_paragraph(_("To edit the book, click on"),'edit')
+ Boton_Ayuda.add_paragraph(_("Then click on"),'edit-c')
+ Boton_Ayuda.add_section(_("Editing the book properties"))
+ Boton_Ayuda.add_paragraph(_("To edit the book properties, click on"),'edit')
+ Boton_Ayuda.add_paragraph(_("Then click on"),'edit-p')
+ Boton_Ayuda.add_section(_("Reading a book"))
+ Boton_Ayuda.add_paragraph(_("To read a book, click on"),'read')
+ Boton_Ayuda.add_paragraph(_("If you want to go to the first page, click on"),'home')
+ Boton_Ayuda.add_paragraph(_("If you want to load a book from the journal, click on"),'open-from-journal')
+ Boton_Ayuda.add_paragraph(_("If you want to read a tutorial and the credits, click on"),'credits')
+ Boton_Ayuda.add_section(_("Editing the text style"))
+ Boton_Ayuda.add_paragraph(_("To change the font size, click on"),'format-text-size')
+ Boton_Ayuda.add_paragraph(_("If you want to edit the font name, click on the text box (e.g., 'Purisa 8'); a font list will be displayed. Select one."))
+ Boton_Ayuda.add_paragraph(_("If you want to change the color, click on"), 'color-preview')
Boton_Ayuda.show()
toolbar.toolbar.insert(Boton_Ayuda, -1)
diff --git a/abook.py b/abook.py
index a4b96af..5ae0f1e 100644
--- a/abook.py
+++ b/abook.py
@@ -120,9 +120,12 @@ class AdventureBookActivity(activity.Activity):
self._book = empty_book()
self._start_book(Toolbars.ColorLetra.get_color())
+
def Home(self, widget, pspec):
self._restart_button_cb(None)
EventBox.modify_bg(gtk.STATE_NORMAL, Toolbars.ColorFondo.get_color())
+
+
def _clean_main_view(self):
for w in self._main_view.get_children():
@@ -205,6 +208,8 @@ class AdventureBookActivity(activity.Activity):
def _option_button_cb(self, widget, option):
self._current_page = option.get_page()
self._show_page(Toolbars.ColorLetra.get_color())
+
+
def _load_button_cb(self, widget):
chooser = ObjectChooser(parent=self)
@@ -236,14 +241,20 @@ class AdventureBookActivity(activity.Activity):
EventBox.modify_bg(gtk.STATE_NORMAL, Toolbars.ColorFondo.get_color())
# self._start_button_cb(widget)
+
+
def Credits(self, widget):
- self._book = credits_book()
+ self._book = tutorial_book() #credits_book()
self._start_book(Toolbars.ColorLetra.get_color())
EventBox.modify_bg(gtk.STATE_NORMAL, Toolbars.ColorFondo.get_color())
+
+
def Tutorial(self, widget):
self._book = tutorial_book()
self._start_book(Toolbars.ColorLetra.get_color())
EventBox.modify_bg(gtk.STATE_NORMAL, Toolbars.ColorFondo.get_color())
+
+
def _edit_book_button_cb(self, widget, Color):
Tam = pango.FontDescription('8')
Col = gtk.gdk.Color('#ff0000')
@@ -574,7 +585,8 @@ class AdventureBookActivity(activity.Activity):
pointed_to = True
if not pointed_to:
print "Page "+ p1.get_title() + " not referenced"
- msg_label = gtk.Label("Error: Page '"+ p1.get_title() + "' not referenced from any other page")
+ msg_label = gtk.Label("Error: Page '"+ p1.get_title() +
+ "' not referenced from any other page")
msg_label.modify_fg(gtk.STATE_NORMAL, Color)
msg_label.modify_font(Tam)
self._main_view.pack_start(msg_label)
@@ -583,7 +595,8 @@ class AdventureBookActivity(activity.Activity):
for p1 in self._book.get_pages():
for p in self._book.get_pages():
if p1.get_title() == p.get_title() and p1 != p:
- msg_label = gtk.Label("Error: Page title '"+ p1.get_title() + "' is not unique")
+ msg_label = gtk.Label("Error: Page title '"+ p1.get_title() +
+ "' is not unique")
msg_label.modify_fg(gtk.STATE_NORMAL, Color)
msg_label.modify_font(Tam)
self._main_view.pack_start(msg_label)
diff --git a/textbook.py b/textbook.py
index 26d0b6a..2b4c927 100644
--- a/textbook.py
+++ b/textbook.py
@@ -14,34 +14,80 @@ def tutorial_book():
p1 = cPage(_("What are Adventure Books?"))
mybook.add_page(p1)
- p1.set_text(_("""Adventure Books are books that allow the reader to choose between different alternatives."""))
+ p1.set_text(_("""Adventure Books are books that allow the reader to
+choose between different alternatives. Every page in an Adventure Book
+offers several options and depending on your choice the story follows
+in different directions.
+
+You can read an existing Adventure Book and if you want you can modify
+it and distribute among your friends. Or you can create a new Adventure
+Book from scratch."""))
p2 = cPage(_("How can I read an Adventure Book?"))
mybook.add_page(p2)
- p2.set_text(_("""Adventure Books can be read with the eyes."""))
+ p2.set_text(_("""To read an Adventure Book, first load it from the
+journal. A cover page with the title and author are displayed. You can
+press the 'Start reading' button to go to the first page.
+
+Every page has a text and one or more buttons with different choices.
+When you press a button, you go to the page corresponding to that option.
+If you want, you can go back to the first page with the button 'Start from
+the beginning'."""))
p3 = cPage(_("How can I create an Adventure Book?"))
mybook.add_page(p3)
- p3.set_text(_("""Adventure Books can be created with hard work."""))
+ p3.set_text(_("""Adventure Books can be created with the 'New book'
+button. Introduce the title, your name, and choose a license. (A license
+is a legal term that declares if you want your book to be copied
+and shared; please read more about licenses in the Creative Commons web
+page.)
+
+Press the 'Edit book contents' button to enter the text of your book. You
+have to create the pages for your book; for every page you have to add a
+title and a text, and then create as many options as choices you want to
+give the reader in that particular page. For every option, you have to
+define to which page the story is going to jump. Please give every page
+a different title so you won't get confused. If you want the story to
+jump to a page you haven't created yet, don't worry, you can define it
+later."""))
p4 = cPage(_("How can I modify an Adventure Book?"))
mybook.add_page(p4)
- p4.set_text(_("""Adventure Books can be modified fearlessly."""))
+ p4.set_text(_("""All Adventure Books can be modified. You simply select
+the 'Edit book contents' button and you can edit and modify all the pages in
+the book. After you're done, it's good to use the 'Check book for missing parts'
+button to verify that your book is correct; if there is an error it will show
+you where the problem is so you can correct it."""))
+
+ p5 = cPage(_("Credits"))
+ mybook.add_page(p5)
+ p5.set_text(_("""Authors:
+Gabriel Eirea <geirea@gmail.com>
+Ignacio Rodriguez <nachoel01@gmail.com>
+Thanks to: Flavio Danesse <fdanesse@gmail.com>
+
+¡Thanks for using this program! :)
+
+To continue create an empty book!"""))
o1 = cOption(_("How to read"),p2)
o2 = cOption(_("How to create"), p3)
o3 = cOption(_("How to modify"), p4)
+ o4 = cOption(_("Credits"), p5)
p1.add_option(o1)
p1.add_option(o2)
p1.add_option(o3)
+ p1.add_option(o4)
o4 = cOption(_("Return"), p1)
p2.add_option(o4)
p3.add_option(o4)
p4.add_option(o4)
+ p5.add_option(o4)
return mybook
+
def empty_book():
mybook = cBook(_("Title"))
@@ -53,6 +99,8 @@ def empty_book():
mybook.add_page(p1)
return mybook
+
+
def credits_book():
mybook = cBook(_("Credits"))
@@ -68,6 +116,7 @@ To continue create a empty book!"""))
mybook.add_page(p1)
return mybook
+
def print_text_book(mybook):
print "TITLE: " + mybook.get_title()