| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/LanguageSelector/ |
Upload File : |
ó
S¯/Oc @ s@ d d l Z d d l Z d d l Z e e d „ Z d „ Z d S( iÿÿÿÿNc
C s) x"| D]} t j d t d t j j | ƒ ƒ } t } t j j | ƒ r× t j | t j ƒ r× xv t | ƒ D]e } | j
ƒ } | r¡ | j | ƒ r¡ t } | } n | rà | | k rà t } | } n | j
| ƒ qk Wn | rô | rô | j
| ƒ n | j ƒ t j | j | ƒ t j | d ƒ q Wd S( sY find all strings that startswith findString and replace them with
setString
t deletet diri¤ N( t tempfilet NamedTemporaryFilet Falset ost patht dirnamet existst accesst R_OKt opent stript
startswitht Truet writet flusht renamet namet chmod(
t
findStringt setStringt file_listR
t appendt fnamet outt foundStringt linet tmp( ( s: /usr/lib/python2.7/dist-packages/LanguageSelector/utils.pyt find_string_and_replace s(
c C s2 | j d ƒ d } t j d | g ƒ } | j ƒ S( s9 generate locale name for LC_* environment variables
t :i s) /usr/share/language-tools/language2locale( t splitt
subprocesst check_outputt rstrip( t languaget
first_elemt locale( ( s: /usr/lib/python2.7/dist-packages/LanguageSelector/utils.pyt language2locale( s ( R R R R R R&