summaryrefslogtreecommitdiffstats
path: root/usr/share/mageiawelcome/helpers.py
diff options
context:
space:
mode:
authorDaniel Napora <napcok@gmail.com>2013-12-18 15:05:00 +0100
committerDaniel Napora <napcok@gmail.com>2013-12-18 15:05:00 +0100
commit317bec783161eff62cff054526304c97247e70e9 (patch)
tree46ee10092b1e3152a0a200a53df6ddc43eb65f9f /usr/share/mageiawelcome/helpers.py
parent4448a9405c01e1da9bf6a6a6b86e1a74ad155451 (diff)
downloadmageiawelcome-317bec783161eff62cff054526304c97247e70e9.tar
mageiawelcome-317bec783161eff62cff054526304c97247e70e9.tar.gz
mageiawelcome-317bec783161eff62cff054526304c97247e70e9.tar.bz2
mageiawelcome-317bec783161eff62cff054526304c97247e70e9.tar.xz
mageiawelcome-317bec783161eff62cff054526304c97247e70e9.zip
make launch and install button translateable
Diffstat (limited to 'usr/share/mageiawelcome/helpers.py')
-rw-r--r--usr/share/mageiawelcome/helpers.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr/share/mageiawelcome/helpers.py b/usr/share/mageiawelcome/helpers.py
index 4f5c1dc..7bcf8b2 100644
--- a/usr/share/mageiawelcome/helpers.py
+++ b/usr/share/mageiawelcome/helpers.py
@@ -3,6 +3,12 @@
import csv
import os
+import gettext
+
+gettext.install("mageiawelcome")
+
+install = _("Install")
+launch = _("Launch")
def get_desktop_name(x):
return {
@@ -43,16 +49,16 @@ def get_listapp():
if (r[5] == 'false'):
start_btn = ""
else:
- start_btn = "<button class='cmd small pill green' data-run='"+ r[5] + "'><i class='icon-ok-sign'> </i> Launch</button>"
+ start_btn = "<button class='cmd small green' data-run='"+ r[5] + "'><i class='icon-ok-sign'> </i>" + launch +"</button>"
if (r[6] != ''):
label = "<span class='label red'>" + r[6] + "</span>"
else:
label = ""
if ( is_installed(r[1]) != 0):# NOT INSTALLED
listapp += "<li class='" + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'><input type='checkbox' datasrc='" + r[1] +"'></div> \
-<h6>" + r[2] + "</h6><p class=description>" + r[4] + "</p>" + start_btn + label + "<button class='inst small pill' data-rpm='" + r[1] + "'><i class='icon-circle-arrow-down'> </i> Install</button></li>"
+<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label + "<button class='inst small' data-rpm='" + r[1] + "'><i class='icon-circle-arrow-down'> </i>" + install +"</button></li>"
else: # INSTALLED
listapp += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'></div> \
-<h6>" + r[2] + "</h6><p class=description>" + r[4] + "</p>" + start_btn + label + "<button class='uninst small pill red' data-rpm='" + r[1] + "'><i class='icon-minus-sign'> </i> remove</button></li>"
+<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + start_btn + label + "</li>"
return listapp
\ No newline at end of file