1
Description: Fix language selections
2
Origin: http://git.ojuba.org/cgit/monajat/commit/?id=e24c17ab572e5c56c14c8f3af465382ede61091b
3
Author: Muayyad Alsadi مؤيد السعدي <alsadi@ojuba.org>
6
--- a/monajat/applet.py
7
+++ b/monajat/applet.py
9
from monajat import Monajat
10
from utils import init_dbus
11
import locale, gettext
18
def on_message(self, bus, message):
22
if t == gst.MESSAGE_EOS:
23
if self.change_play_status: self.change_play_status()
24
self.gst_player.set_state(gst.STATE_NULL)
26
return gtk.Dialog.run(self, *a, **kw)
29
+ locale_re=re.compile('^[a-z]+_[A-Z]+$', re.I)
30
skip_auto_fn=os.path.expanduser('~/.monajat-applet-skip-auto')
35
kw=self.conf_to_prayer_args()
36
self.prayer=itl.PrayerTimes(**kw)
37
- l=filter(lambda i: i.startswith('ar_') and "_" in i and '.' not in i, locale.locale_alias.keys())
38
+ l=filter(lambda i: i.startswith(self.m.lang+'_') and self.locale_re.match(i), locale.locale_alias.keys())
41
l=l+"_"+c.upper()+".UTF-8"