Ejemplo n.º 1
0
            if (file_exists($langpath . "/" . $module . ".po")) {
                $author = $langrepo->get_last_author("po/" . $lang . "/" . $module . ".po");
                $authors = explode("\n", $author);
                if (file_exists($langDirectory . "/" . $lang . "/LC_MESSAGES/" . $module . ".po")) {
                    if (md5_file($langpath . "/" . $module . ".po") != md5_file($langDirectory . "/" . $lang . "/LC_MESSAGES/" . $module . ".po")) {
                        freepbx::out('need to update ' . $lang . " last authored by " . $authors[0], 1);
                        copy_po($langpath . "/" . $module . ".po", $langDirectory . "/" . $lang . "/LC_MESSAGES/" . $module . ".po");
                        make_mo($langDirectory . "/" . $lang . "/LC_MESSAGES/" . $module . ".po", $lang, $langRepoPath);
                        $repo->add();
                        $repo->commit_author("Updated " . $lang, $authors[0]);
                    } else {
                        freepbx::out('No Changes needed on ' . $lang, 1);
                    }
                } else {
                    freepbx::out('WARNING: Adding ' . $lang . ' for ' . $module . " last authored by " . $authors[0], 1);
                    add_language($lang, $langDirectory, $langRepoPath);
                    copy_po($langpath . "/" . $module . ".po", $langDirectory . "/" . $lang . "/LC_MESSAGES/" . $module . ".po");
                    make_mo($langDirectory . "/" . $lang . "/LC_MESSAGES/" . $module . ".po", $lang, $langRepoPath);
                    $repo->add();
                    $repo->commit_author("Updated " . $lang, $authors[0]);
                }
            }
        }
    } else {
        freepbx::out('WARNING: Module ' . $module . ' is missing. Attempting to checkout');
    }
    $repo->push('origin', 'master');
    $repo->checkout($ab);
}
class languages
{
Ejemplo n.º 2
0
function init_default_languages()
{
    $lv = <<<LANG
LANGUAGE                  Latviešu
FOOTER                    Veidojis <a href="http://spicausis.lv/">Einārs Lielmanis</a>, failu ielāde: <a href="http://inaflashuploader.com">in-a-flash</a>, krāsu gamma un grafiskie elementi: <a href="http://www.colourlovers.com/lover/doc%20w">doc w</a>.
CHANGE_SETTINGS           Mainīt iestatījumus
OWNER_TITLE               pārvaldīšana
OWNER_LOGIN               Saimnieka skats
OWNER_LOGOUT              Beigt darbu
LOGIN_BLOCKED             Pārāk daudz nepareizu minējumu. Autorizācija īslaicīgi bloķēta.
WRONG_PASSWORD            Parole nav pareiza.
LABEL_PASSWORD            Parole:
BUTTON_LOGIN              Autorizēties
SUCCESS_SINGLE            Paldies, fails ir saņemts.
SUCCESS_MULTIPLE          Paldies, faili ir saņemti.
LINK_ADD_MORE             Vai vēlies nosūtīt vēl kādu failu?
LINK_OWNER_UPLOAD         Vai vēlies pievienot kādu failu?
UPLOAD_LIMIT              %d MB ierobežojums
UPLOAD_YOUR_FILE          <strong>Pievieno</strong> savu failu:
LABEL_DESCRIPTION         Vieta nelielam aprakstam:
BUTTON_UPLOAD             <strong>Ielādē</strong> un nosūti failu
NO_FILES                  Nekas nav atsūtīts.
LINK_EDIT_DESCRIPTION     pielabot aprakstu
LINK_ADD_DESCRIPTION      pievienot aprakstu
LINK_ERASE                izdzēst
BUTTON_SAVE_EDIT          Saglabāt aprakstu
ERR_MISSING_STORAGE       Nav mapītes, kur glabāt failu, un nevaru to izveidot. Lūdzu, izveido mapīti <strong>%s</strong> un piešķir tai rakstīšanas tiesības.
ERR_READONLY_STORAGE      Nevaru neko ierakstīt mapītē <strong>%s</strong>. Lūdzu, piešķir tai rakstīšanas tiesības.
ERR_WRITE_FAILED          Neizdevās izveidot failu <strong>%s</strong>. Lūdzu, pārliecinies, ka mapītei ir rakstīšanas tiesības.
ERR_NO_FILE               <strong>Nav</strong> šāda faila.
DEFAULT_TITLE             failu <strong>pastkastīte</strong>
DEFAULT_INTRODUCTION      Izmantojot šo lapu, vari nosūtīt man savus failus.
LABEL_CFG_PASSWORD        Jaunā parole:
LABEL_CFG_TITLE           Lapas virsraksts:
LABEL_CFG_INTRODUCTION    Lapas ievadteksts:
LABEL_CFG_CUSTOM_CSS      Manuāli CSS pielāgojumi:
LABEL_CFG_LANGUAGE        Lapas valoda:
LABEL_CFG_STORAGE_LIMIT   Failiem atvēlētā vieta, MB
HINT_CFG_STORAGE_LIMIT    Cik vietas, megabaitos, atvēlēt failu krātuvei.<br />Šobrīd faili aizņem <strong>%.1f MB</strong>.
HINT_CFG_CUSTOM_CSS       CSS ir tehnoloģija, ar ko ir iespējams izmainīt lapas izskatu.<br />Piemēram, "body { background: red }" visai lapai piešķirs sarkanu fona krāsu.
BUTTON_CONFIG_SAVE        Saglabāt izmaiņas
LABEL_STOCK_INPUT         Pārslēgties uz vienkāršo faila ielādētāju — ja kaut kas nestrādā
ERR_NO_UPLOAD             Lūdzu, pievieno pašu failu.
ERR_TOO_BIG               Fails saņemts <strong>kļūdaini</strong>. Iespējams, ka tas ir <strong>par lielu?</strong>
ERR_BAD_UPLOAD            Fails saņemts <strong>kļūdaini</strong>.
ERR_CANNOT_MOVE           Nevaru pārvietot ielādēto failu uz <strong>%s</strong>.
ERR_DUPLICATE             Šāds fails te <strong>jau ir ielādēts</strong>, paldies.
ERR_EMPTY                 Ielādētais fails ir tukšs.
ERR_STORAGE_EXCEEDED      Diemžēl, pastkastītei ir beigusies atvēlētā diska vieta.
IAF_CLICK                 Noklikšķini, lai pievienotu failus!
IAF_UPLOADING             ...
IAF_COMPLETE              Ielādēts
IAF_PENDING               Gaida rindā
IAF_MAX                   Vairāk failus vienā reizē ielādēt nevar.
IAF_VALID                 Pieļaujamie faili
IAF_SIZE_FAILURE          Tik lielu failu nevaru ielādēt.
IAF_PROGRESS              Nosūtu (BYTES_LOADED / BYTES_TOTAL)
LANG;
    $en = <<<LANG
LANGUAGE                  English
FOOTER                    Written by <a href="http://bugpipe.org/">Einar Lielmanis</a>, <a href="http://inaflashuploader.com">In-A-Flash</a> upload widget, color scheme and images by <a href="http://www.colourlovers.com/lover/doc%20w">doc w</a>.
CHANGE_SETTINGS           Change settings
OWNER_TITLE               owner mode
OWNER_LOGIN               Owner mode
OWNER_LOGOUT              Logout
LOGIN_BLOCKED             Too many failed attempts: I've temporarily blocked the login form.
WRONG_PASSWORD            The password is incorrect.
LABEL_PASSWORD            Password:
BUTTON_LOGIN              Login
SUCCESS_SINGLE            Thank you, your file is received.
SUCCESS_MULTIPLE          Thank you, your files are received.
LINK_ADD_MORE             Would you like to send another file?
LINK_OWNER_UPLOAD         Would you like to upload a file?
UPLOAD_LIMIT              %d MB limit
UPLOAD_YOUR_FILE          <strong>Upload</strong> your file:
LABEL_DESCRIPTION         You can add a short description:
BUTTON_UPLOAD             <strong>Upload</strong> and send your file
NO_FILES                  Nothing received.
LINK_EDIT_DESCRIPTION     edit description
LINK_ADD_DESCRIPTION      add a description
LINK_ERASE                erase
BUTTON_SAVE_EDIT          Save description
ERR_MISSING_STORAGE       The storage folder is missing, and unable to create it. Create a folder <strong>«%s»</strong> and make it writable.
ERR_READONLY_STORAGE      The storage folder <strong>«%s»</strong> seems to be read-only. Make it writable, please.
ERR_WRITE_FAILED          Writing to a file <strong>«%s»</strong> failed. Please, check the folder permissions.
ERR_NO_FILE               No such file.
DEFAULT_TITLE             tiny <strong>file dropbox</strong>
DEFAULT_INTRODUCTION      Using this page, you can easily send me various files.
LABEL_CFG_PASSWORD        New password:
LABEL_CFG_TITLE           Page title:
LABEL_CFG_INTRODUCTION    Page introduction:
LABEL_CFG_LANGUAGE        Site language:
LABEL_CFG_STORAGE_LIMIT   Storage limit, MB:
LABEL_CFG_CUSTOM_CSS      Custom CSS overrides:
LABEL_STOCK_INPUT         Switch to non-flash file upload
HINT_CFG_CUSTOM_CSS       CSS is a technology which allows to change how the page looks.<br />As an example, specifying "body { background: red }" will make the background of the page turn red.
HINT_CFG_STORAGE_LIMIT    Maximum storage space, in megabytes, that the uploaded files may use.<br />Currently using <strong>%.1f MB</strong>.
BUTTON_CONFIG_SAVE        Saglabāt izmaiņas
BUTTON_CONFIG_SAVE        Save changes
ERR_NO_UPLOAD             You haven't attached any file.
ERR_TOO_BIG               There was a <strong>problem</strong> receiving your file. It is possible that it was <strong>too big</strong> for the server limits.
ERR_BAD_UPLOAD            There was a <strong>problem</strong> receiving your file.
ERR_CANNOT_MOVE           Cannot move the uploaded file to <strong>%s</strong>.
ERR_DUPLICATE             This file is <strong>already uploaded</strong>, thank you.
ERR_EMPTY                 The uploaded file is empty.
ERR_STORAGE_EXCEEDED      Sadly, the storage space is full.
IAF_CLICK                 Click here to upload your files.
IAF_UPLOADING             Uploading
IAF_COMPLETE              Upload complete.
IAF_PENDING               Upload pending...
IAF_MAX                   File maximum reached!
IAF_VALID                 Valid text
IAF_SIZE_FAILURE          Failed: size too big (must be <= MAX_FILE_SIZE).
IAF_PROGRESS              BYTES_LOADED / BYTES_TOTAL
LANG;
    add_language('lv', $lv);
    add_language('en', $en);
}
Ejemplo n.º 3
0
 function language_settings($para1 = "", $para2 = "", $para3 = "")
 {
     if (!$this->crud_model->admin_permission('language')) {
         redirect(base_url() . 'index.php/admin');
     }
     if ($para1 == 'add_lang') {
         $this->load->view('back/admin/language_add');
     } elseif ($para1 == 'lang_list') {
         //if($para2 !== ''){
         $this->db->order_by('word_id', 'desc');
         $page_data['words'] = $this->db->get('language')->result_array();
         $page_data['lang'] = $para2;
         $this->load->view('back/admin/language_list', $page_data);
         //}
     } elseif ($para1 == 'add_word') {
         $page_data['lang'] = $para2;
         $this->load->view('back/admin/language_word_add', $page_data);
     } elseif ($para1 == 'upd_trn') {
         $word_id = $para2;
         $translation = $this->input->post('translation');
         $language = $this->input->post('lang');
         $word = $this->db->get_where('language', array('word_id' => $word_id))->row()->word;
         add_translation($word, $language, $translation);
     } elseif ($para1 == 'do_add_word') {
         $language = $para2;
         $word = $this->input->post('word');
         add_lang_word($word);
     } elseif ($para1 == 'do_add_lang') {
         $language = $this->input->post('language');
         add_language($language);
     } elseif ($para1 == 'check_existed') {
         echo lang_check_exists($para2);
     } elseif ($para1 == 'lang_select') {
         $this->load->view('back/admin/language_select');
     } elseif ($para1 == 'dlt_lang') {
         $this->load->dbforge();
         $this->dbforge->drop_column('language', $para2);
     } elseif ($para1 == 'dlt_word') {
         $this->db->where('word_id', $para2);
         $this->db->delete('language');
     } else {
         $page_data['page_name'] = "language";
         $this->load->view('back/index', $page_data);
     }
 }