diff options
author | Daniel Napora <napcok@gmail.com> | 2013-12-18 15:05:00 +0100 |
---|---|---|
committer | Daniel Napora <napcok@gmail.com> | 2013-12-18 15:05:00 +0100 |
commit | 317bec783161eff62cff054526304c97247e70e9 (patch) | |
tree | 46ee10092b1e3152a0a200a53df6ddc43eb65f9f /usr | |
parent | 4448a9405c01e1da9bf6a6a6b86e1a74ad155451 (diff) | |
download | mageiawelcome-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')
-rw-r--r-- | usr/share/mageiawelcome/css/style.css | 4 | ||||
-rw-r--r-- | usr/share/mageiawelcome/helpers.py | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/usr/share/mageiawelcome/css/style.css b/usr/share/mageiawelcome/css/style.css index c54bf4e..ca9fd31 100644 --- a/usr/share/mageiawelcome/css/style.css +++ b/usr/share/mageiawelcome/css/style.css @@ -88,8 +88,8 @@ ul.list li:hover {background:rgba(0, 0, 0, 0.2); } ul.list li h6 {margin:0;margin-top:6px;} ul.list li p.description {margin-top:0;} -ul.list li button.cmd,ul.list li button.inst {position:absolute; left:540px; top:28px;width:72px;float:right;} -ul.list li button.uninst {display:none;} +ul.list li button {position:absolute; left:520px; top:28px;float:right;}*/ + ul.list li.urpme {background:rgba(0, 0, 0, 0.4); background-image:url('../img/ok.png'); background-repeat:no-repeat; 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 |