Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Mar 13, 2014
1 parent 5dda5a5 commit 8c28fda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions var/Typecho/I18n/GetText.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private function load_tables()
$this->table_translations = $this->readintarray($this->total * 2);

if ($this->enable_cache) {
$this->cache_translations = array ();
$this->cache_translations = array ('' => NULL);
/* read all strings in the cache */
for ($i = 0; $i < $this->total; $i++) {
if ($this->table_originals[$i * 2 + 1] > 0) {
Expand Down Expand Up @@ -303,7 +303,7 @@ private function get_plural_forms()
} else {
$header = $this->get_translation_string(0);
}
if (eregi("plural-forms: ([^\n]*)\n", $header, $regs))
if (preg_match("/plural\-forms: ([^\n]*)\n/i", $header, $regs))
$expr = $regs[1];
else
$expr = "nplurals=2; plural=n == 1 ? 0 : 1;";
Expand Down

0 comments on commit 8c28fda

Please sign in to comment.