Commit e55b210e authored by SrishAkaTux's avatar SrishAkaTux

Translatable strings for all activities|

parent 221b79ed
...@@ -71,8 +71,8 @@ class BrailleChar: ...@@ -71,8 +71,8 @@ class BrailleChar:
y=y, y=y,
width=width, width=width,
height=height, height=height,
stroke_color=self.stroke, stroke_color = self.stroke,
fill_color=self.fill, fill_color = self.fill,
line_width=2.0) line_width=2.0)
......
...@@ -39,9 +39,9 @@ CIRCLE_STROKE = "blue" ...@@ -39,9 +39,9 @@ CIRCLE_STROKE = "blue"
MAP_STROKE = "black" MAP_STROKE = "black"
MAP_FILL = "light blue" MAP_FILL = "light blue"
braille_desc = _("A system of writing for the blinds that uses characters made of raised dots.\n\n" braille_intro = _("A system of writing for the blinds that uses characters made of raised dots.")
"The braille Cell is composed of 6 dot cells organized in form of two vertical columns with 3 dots" braille_desc = _("The braille cell is composed of 6 dot cells organized in form of two vertical columns"
"{1,2,3} side by side on left and 3 dots side by side on right {4,5,6}") " with 3 dots {1,2,3} side by side on left and 3 dots side by side on right {4,5,6}")
#Array Declaration #Array Declaration
letter_arr_one = ['A','B','C','D','E','F','G'] letter_arr_one = ['A','B','C','D','E','F','G']
...@@ -177,16 +177,26 @@ class Gcompris_braille_alphabets: ...@@ -177,16 +177,26 @@ class Gcompris_braille_alphabets:
font="Sans 15", font="Sans 15",
anchor=gtk.ANCHOR_CENTER, anchor=gtk.ANCHOR_CENTER,
text=_("Braille : Unlocking the Code")) text=_("Braille : Unlocking the Code"))
#Braille Intro
goocanvas.Text(parent=self.rootitem,
x=520,
y=200,
fill_color="dark blue",
font="Sans 15",
width = 400,
anchor=gtk.ANCHOR_CENTER,
text=braille_intro)
#Braille Description #Braille Description
goocanvas.Text(parent=self.rootitem, goocanvas.Text(parent=self.rootitem,
x=520, x=520,
y=260, y=300,
fill_color="dark blue", fill_color="dark blue",
font="Sans 15", font="Sans 15",
width = 400, width = 400,
anchor=gtk.ANCHOR_CENTER, anchor=gtk.ANCHOR_CENTER,
text=braille_desc) text=braille_desc)
#TUX svghandle #TUX svghandle
svghandle = gcompris.utils.load_svg("braille_alphabets/braille_tux.svgz") svghandle = gcompris.utils.load_svg("braille_alphabets/braille_tux.svgz")
self.tuxitem = goocanvas.Svg( self.tuxitem = goocanvas.Svg(
......
...@@ -122,7 +122,7 @@ class Gcompris_dicey_dicey: ...@@ -122,7 +122,7 @@ class Gcompris_dicey_dicey:
goocanvas.Text(parent = self.rootitem, goocanvas.Text(parent = self.rootitem,
x=400.0, x=400.0,
y=100.0, y=100.0,
text="Dicey - Dicey", text=_("Dicey - Dicey"),
fill_color="black", fill_color="black",
anchor = gtk.ANCHOR_CENTER, anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER, alignment = pango.ALIGN_CENTER,
...@@ -139,7 +139,7 @@ class Gcompris_dicey_dicey: ...@@ -139,7 +139,7 @@ class Gcompris_dicey_dicey:
ok = goocanvas.Svg(parent = self.rootitem, ok = goocanvas.Svg(parent = self.rootitem,
svg_handle = gcompris.skin.svg_get(), svg_handle = gcompris.skin.svg_get(),
svg_id = "#OK", svg_id = "#OK",
tooltip = "Click to confirm your selection of dots" tooltip = _("Click to confirm your selection of dots")
) )
ok.translate(40,-30) ok.translate(40,-30)
ok.connect("button_press_event", self.ok_event,level) ok.connect("button_press_event", self.ok_event,level)
...@@ -231,7 +231,7 @@ class Gcompris_dicey_dicey: ...@@ -231,7 +231,7 @@ class Gcompris_dicey_dicey:
goocanvas.Text(parent = self.rootitem, goocanvas.Text(parent = self.rootitem,
x=300.0, x=300.0,
y=358.0, y=358.0,
text="Choose an operator to indicate the question mark", text = _("Choose an operator to indicate the question mark"),
anchor = gtk.ANCHOR_CENTER, anchor = gtk.ANCHOR_CENTER,
font='SANS 12') font='SANS 12')
......
...@@ -119,7 +119,7 @@ class Gcompris_louis_braille: ...@@ -119,7 +119,7 @@ class Gcompris_louis_braille:
goocanvas.Text(parent = self.rootitem, goocanvas.Text(parent = self.rootitem,
x=350.0, x=350.0,
y=33, y=33,
text="Arrange the sequence of story", text = _("Arrange the sequence of story"),
fill_color="blue", fill_color="blue",
anchor = gtk.ANCHOR_CENTER, anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER, alignment = pango.ALIGN_CENTER,
...@@ -128,7 +128,7 @@ class Gcompris_louis_braille: ...@@ -128,7 +128,7 @@ class Gcompris_louis_braille:
ok = goocanvas.Svg(parent = self.rootitem, ok = goocanvas.Svg(parent = self.rootitem,
svg_handle = gcompris.skin.svg_get(), svg_handle = gcompris.skin.svg_get(),
svg_id = "#OK", svg_id = "#OK",
tooltip = "Click to confirm your sequence" tooltip = _("Click to confirm your sequence")
) )
ok.translate(200,15) ok.translate(200,15)
ok.connect("button_press_event", self.ok_event) ok.connect("button_press_event", self.ok_event)
...@@ -159,7 +159,7 @@ class Gcompris_louis_braille: ...@@ -159,7 +159,7 @@ class Gcompris_louis_braille:
goocanvas.Text(parent = self.rootitem, goocanvas.Text(parent = self.rootitem,
x=350.0, x=350.0,
y=(index - 9) * 37.8, y=(index - 9) * 37.8,
text=str(self.dataset.get(str(NUMBER_SEQUENCE[index - 11][0]),"story")), text=str(self.dataset.get(str(NUMBER_SEQUENCE[index - 11][0]),"_story")),
fill_color="black", fill_color="black",
anchor = gtk.ANCHOR_CENTER, anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER, alignment = pango.ALIGN_CENTER,
...@@ -220,7 +220,7 @@ class Gcompris_louis_braille: ...@@ -220,7 +220,7 @@ class Gcompris_louis_braille:
ok = goocanvas.Svg(parent = self.rootitem, ok = goocanvas.Svg(parent = self.rootitem,
svg_handle = gcompris.skin.svg_get(), svg_handle = gcompris.skin.svg_get(),
svg_id = "#PREVIOUS", svg_id = "#PREVIOUS",
tooltip = "Click to move to previous story page" tooltip = _("Click to move to previous story page")
) )
ok.translate(-300,50) ok.translate(-300,50)
ok.connect("button_press_event", self.previous_event, self.gcomprisBoard.level) ok.connect("button_press_event", self.previous_event, self.gcomprisBoard.level)
...@@ -230,7 +230,7 @@ class Gcompris_louis_braille: ...@@ -230,7 +230,7 @@ class Gcompris_louis_braille:
ok = goocanvas.Svg(parent = self.rootitem, ok = goocanvas.Svg(parent = self.rootitem,
svg_handle = gcompris.skin.svg_get(), svg_handle = gcompris.skin.svg_get(),
svg_id = "#NEXT", svg_id = "#NEXT",
tooltip = "Click to move to next story page" tooltip = _("Click to move to next story page")
) )
ok.translate(75,-58) ok.translate(75,-58)
ok.connect("button_press_event", self.next_event, self.gcomprisBoard.level) ok.connect("button_press_event", self.next_event, self.gcomprisBoard.level)
...@@ -246,9 +246,7 @@ class Gcompris_louis_braille: ...@@ -246,9 +246,7 @@ class Gcompris_louis_braille:
20, 50, LOUIS_BRAILLE_NAME[index] ,COLOR_ON, COLOR_OFF, 20, 50, LOUIS_BRAILLE_NAME[index] ,COLOR_ON, COLOR_OFF,
CIRCLE_FILL, CIRCLE_FILL,True,False ,False, None) CIRCLE_FILL, CIRCLE_FILL,True,False ,False, None)
#Checking for newline in activity.desktop story = self.dataset.get(str(level),"_story")
story = self.dataset.get(str(level),"story")
story = story.replace("\\n", "\n")
#Rectangle for YEAR #Rectangle for YEAR
goocanvas.Rect(parent=self.rootitem, goocanvas.Rect(parent=self.rootitem,
...@@ -264,7 +262,7 @@ class Gcompris_louis_braille: ...@@ -264,7 +262,7 @@ class Gcompris_louis_braille:
goocanvas.Text(parent = self.rootitem, goocanvas.Text(parent = self.rootitem,
x=420.0, x=420.0,
y=395.0, y=395.0,
text=str(self.dataset.get(str(level),"year")), text=str(self.dataset.get(str(level),"_year")),
fill_color="black", fill_color="black",
anchor = gtk.ANCHOR_CENTER, anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER, alignment = pango.ALIGN_CENTER,
...@@ -283,12 +281,13 @@ class Gcompris_louis_braille: ...@@ -283,12 +281,13 @@ class Gcompris_louis_braille:
#Displaying the STORY #Displaying the STORY
goocanvas.Text(parent = self.rootitem, goocanvas.Text(parent = self.rootitem,
x=433.0, x=400.0,
y=455.0, y=455.0,
text=str(story), text=str(story),
fill_color="black", fill_color="black",
anchor = gtk.ANCHOR_CENTER, anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER, alignment = pango.ALIGN_CENTER,
width = 700,
font = 'SANS 17' font = 'SANS 17'
) )
......
[1] [1]
year = 1809 _year = 1809
story = Born January 4th at Coupvary near Paris in France. _story = Born January 4th at Coupvary near Paris in France.
image = louis_braille/louis.jpg image = louis_braille/louis.jpg
[2] [2]
year = 1812 _year = 1812
story = Louis Braille injured his left eye with a stitching awl \n from his fathers workshop. _story = Louis Braille injured his left eye with a stitching awl from his fathers workshop.
image = louis_braille/workshop.jpg image = louis_braille/workshop.jpg
[3] [3]
year = 1812 _year = 1812
story = At the age of three Louis became blind due to \n sympathetic ophthalmia. _story = At the age of three Louis became blind due to sympathetic ophthalmia.
image = louis_braille/fireplace.jpg image = louis_braille/fireplace.jpg
[4] [4]
year = 1819 _year = 1819
story = At the age of 10 he was sent to Paris to study \n at the Royal Institute for Blind Youth. _story = At the age of 10 he was sent to Paris to study at the Royal Institute for Blind Youth.
image = louis_braille/rnib.jpg image = louis_braille/rnib.jpg
[5] [5]
year = 1820 _year = 1820
story = He began to impress his classmates and began to \n play piano and the organ. _story = He began to impress his classmates and began to play piano and the organ.
image = louis_braille/piano.jpg image = louis_braille/piano.jpg
[6] [6]
year = 1821 _year = 1821
story = Charles Barbier, a french soldier visited school and shared \n invention of night writing ,a code of 12 raised dots \n that let soldiers share secret information on battlefield. _story = Charles Barbier, a french soldier visited school and shared invention of night writing ,a code of 12 raised dots that let soldiers share secret information on battlefield.
image = louis_braille/night_printing.jpg image = louis_braille/night_printing.jpg
[7] [7]
year = 1824 _year = 1824
story = Louis trimmed Barbier's 12 dots into 6 and \n invented Braille. _story = Louis trimmed Barbier's 12 dots into 6 and invented Braille.
image = louis_braille/braile.jpg image = louis_braille/braile.jpg
[8] [8]
year = 1828 _year = 1828
story = He became a professor after graduating and secretly \n taught his method. _story = He became a professor after graduating and secretly taught his method.
image = louis_braille/teach.jpg image = louis_braille/teach.jpg
[9] [9]
year = 1837 _year = 1837
story = He revised and extended braille to include mathematics,\n symbols, punctuations and music notations. _story = He revised and extended braille to include mathematics, symbols, punctuations and music notations.
image = louis_braille/chart.png image = louis_braille/chart.png
[10] [10]
year = 1852 _year = 1852
story = He died of tuberculosis.He is burried in the Pantheon \n in Paris.A monument is erected to honor him. _story = He died of tuberculosis.He is burried in the Pantheon in Paris.A monument is erected to honor him.
image = louis_braille/statue.jpg image = louis_braille/statue.jpg
[11] [11]
year = After his Death _year = After his Death
story = Braille got accepted as a world wide standard.Louis proved\nif you have motivation you can do incredible things. _story = Braille got accepted as a world wide standard.Louis proved if you have motivation you can do incredible things.
image = louis_braille/braille_ball.jpg image = louis_braille/braille_ball.jpg
[12] [12]
story = Born January 4th at Coupvary near Paris in France. _story = Born January 4th at Coupvary near Paris in France.
[13] [13]
story = Louis Braille injured his left eye with a stitching awl from his fathers workshop. _story = Louis Braille injured his left eye with a stitching awl from his fathers workshop.
[14] [14]
story = At the age of three Louis became blind due to sympathetic ophthalmia. _story = At the age of three Louis became blind due to sympathetic ophthalmia.
[15] [15]
story = At the age of 10 he was sent to Paris to study at the Royal Institute for Blind Youth. _story = At the age of 10 he was sent to Paris to study at the Royal Institute for Blind Youth.
[16] [16]
story = He began to impress his classmates and began to play piano and the organ. _story = He began to impress his classmates and began to play piano and the organ.
[17] [17]
story = Charles Barbier, a french soldier visited school and shared invention of night writing. _story = Charles Barbier, a french soldier visited school and shared invention of night writing.
[18] [18]
story = Louis trimmed Barbier's 12 dots into 6 and invented Braille. _story = Louis trimmed Barbier's 12 dots into 6 and invented Braille.
[19] [19]
story = He became a professor after graduating and secretly taught his method. _story = He became a professor after graduating and secretly taught his method.
[20] [20]
story = He revised and extended braille to include mathematics,symbols, punctuations and music notations. _story = He revised and extended braille to include mathematics,symbols, punctuations and music notations.
[21] [21]
story = He died of tuberculosis.He is burried in the Pantheon in Paris.A monument is erected to honor him. _story = He died of tuberculosis.He is burried in the Pantheon in Paris.A monument is erected to honor him.
[22] [22]
story = Braille got accepted as a world wide standard.Louis proved if you have motivation you can do incredible things. _story = Braille got accepted as a world wide standard.Louis proved if you have motivation you can do incredible things.
\ No newline at end of file
...@@ -38,32 +38,32 @@ CIRCLE_STROKE = "black" ...@@ -38,32 +38,32 @@ CIRCLE_STROKE = "black"
CELL_WIDTH = 30 CELL_WIDTH = 30
RHYMES_RIDDLES_LIST = [ RHYMES_RIDDLES_LIST = [
[ # Level 1 [ # Level 1
["What goes up white and comes down \n" "yellow and white?","egg"], [_("What goes up white and comes down yellow and white?"),"egg"],
["What rises and waves all day?","flag"], [_("What rises and waves all day?"),"flag"],
["What has two wheels and speeds up \n " "hills for a hike?","bike"], [_("What has two wheels and speeds up hills for a hike?"),"bike"],
["What hides in shoes and crosses \n" "the street?","feet"], [_("What hides in shoes and crosses the street?"),"feet"],
["What falls from the sky without \n" "hurting your brain?","rain"] [_("What falls from the sky without hurting your brain?"),"rain"]
], ],
[# Level 2 [# Level 2
["This is a word which rhymes with cat, It \n" "grows on your head because it's a :","hat"], [_("This is a word which rhymes with cat, It grows on your head because it's a :"),"hat"],
["I'm useful for journey when you are going\n"" far, I need lots of petrol because I'm a :","car"], [_("I'm useful for journey when you are going far, I need lots of petrol because I'm a :"),"car"],
["This is a word which rhymes with up.\n""You can drink out of me because I'm a :","cup"], [_("This is a word which rhymes with up.You can drink out of me because I'm a :"),"cup"],
["This is a word which rhymes with bake,\n""I'm nice to eat because I'm a : ","cake"], [_("This is a word which rhymes with bake, I'm nice to eat because I'm a : "),"cake"],
["This is a word which rhymes with spoon,\n""I shine at night because I'm a :","moon"] [_("This is a word which rhymes with spoon, I shine at night because I'm a :"),"moon"]
], ],
[# Level 3 [# Level 3
["A never ending circle,a brightly shiny \n""thing,It's on my fourth finger because its a :","ring"], [_("A never ending circle,a brightly shiny thing,It's on my fourth finger because its a :"),"ring"],
["The more I dry,The wetter I get","towel"], [_("The more I dry,The wetter I get"),"towel"],
["What has roots as nobody sees, Is taller than \n""trees,up it goes and yet never grows","mountain"], [_("What has roots as nobody sees, Is taller than trees,up it goes and yet never grows"),"mountain"],
["You hear my sound you feel me when I \n""move,But see me when you never will","wind"], [_("You hear my sound you feel me when I move,But see me when you never will"),"wind"],
["You'll find us near ponds or sitting on logs, we\n"" jump and we cloak because we are : ","frogs"] [_("You'll find us near ponds or sitting on logs, we jump and we cloak because we are : "),"frogs"]
], ],
[# Level 4 [# Level 4
["What do you get when you put a car and a\n"" pet together?","carpet"], [_("What do you get when you put a car and a pet together?"),"carpet"],
["What can speak in every language , but \n""never went to school ?","echo"], [_("What can speak in every language , but never went to school ?"),"echo"],
["What's expensive and floats through the room?","perfume"], [_("What's expensive and floats through the room?"),"perfume"],
["What got loose and spoiled the race","shoelace"], [_("What got loose and spoiled the race"),"shoelace"],
["Some fly, some sting, some hide in rugs","bugs"] [_("Some fly, some sting, some hide in rugs"),"bugs"]
] ]
] ]
class Gcompris_rhymes_riddles: class Gcompris_rhymes_riddles:
...@@ -126,12 +126,13 @@ class Gcompris_rhymes_riddles: ...@@ -126,12 +126,13 @@ class Gcompris_rhymes_riddles:
def rhymes_rhymes(self, level): def rhymes_rhymes(self, level):
goocanvas.Text(parent = self.rootitem, goocanvas.Text(parent = self.rootitem,
x=290.0, x=270.0,
y=270.0, y=270.0,
text=RHYMES_RIDDLES_LIST[level - 1][self.counter][0], text=RHYMES_RIDDLES_LIST[level - 1][self.counter][0],
fill_color="black", fill_color="black",
anchor = gtk.ANCHOR_CENTER, anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER, alignment = pango.ALIGN_CENTER,
width = 500 ,
font = 'SANS 17' font = 'SANS 17'
) )
str = RHYMES_RIDDLES_LIST[level - 1][self.counter][1] str = RHYMES_RIDDLES_LIST[level - 1][self.counter][1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment