projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replacing tabs with spaces
[squirrelmail.git]
/
class
/
l10n
/
gettext.class.php
diff --git
a/class/l10n/gettext.class.php
b/class/l10n/gettext.class.php
index cc1278c706748ccf2f9bf558c89acabec7404ef1..bb9c6422bae95ccab07a30cb50f8cafb79f4535e 100644
(file)
--- a/
class/l10n/gettext.class.php
+++ b/
class/l10n/gettext.class.php
@@
-21,7
+21,7
@@
* @package squirrelmail
* @subpackage i18n
*/
* @package squirrelmail
* @subpackage i18n
*/
-
+
/**
* Class that uses parsed translation input objects
* @package squirrelmail
/**
* Class that uses parsed translation input objects
* @package squirrelmail
@@
-57,9
+57,9
@@
class gettext_reader {
$byte[$i]=ord($this->STREAM->read(1));
}
//print sprintf("pos: %d\n",$this->STREAM->currentpos());
$byte[$i]=ord($this->STREAM->read(1));
}
//print sprintf("pos: %d\n",$this->STREAM->currentpos());
- if ($this->BYTEORDER == 0)
+ if ($this->BYTEORDER == 0)
return (int)(($byte[0]) | ($byte[1]<<8) | ($byte[2]<<16) | ($byte[3]<<24));
return (int)(($byte[0]) | ($byte[1]<<8) | ($byte[2]<<16) | ($byte[3]<<24));
- else
+ else
return (int)(($byte[3]) | ($byte[2]<<8) | ($byte[1]<<16) | ($byte[0]<<24));
}
return (int)(($byte[3]) | ($byte[2]<<8) | ($byte[1]<<16) | ($byte[0]<<24));
}
@@
-161,7
+161,7
@@
class gettext_reader {
$data = $this->STREAM->read($length);
return (string)$data;
}
$data = $this->STREAM->read($length);
return (string)$data;
}
-
+
/**
* binary search for string
* @param string $string
/**
* binary search for string
* @param string $string
@@
-190,7
+190,7
@@
class gettext_reader {
if ($cmp == 0) {
$this->_HASHED[$string] = $half;
return $half;
if ($cmp == 0) {
$this->_HASHED[$string] = $half;
return $half;
- } elseif ($cmp<0)
+ } elseif ($cmp<0)
return $this->find_string($string,$start,$half);
else
return $this->find_string($string,$half,$end);
return $this->find_string($string,$start,$half);
else
return $this->find_string($string,$half,$end);
@@
-203,11
+203,11
@@
class gettext_reader {
* @return string translated string
*/
function translate($string) {
* @return string translated string
*/
function translate($string) {
- if ($this->error > 0) return $string;
+
if ($this->error > 0) return $string;
$num = $this->find_string($string, 0, $this->total);
if ($num == -1)
return $string;
$num = $this->find_string($string, 0, $this->total);
if ($num == -1)
return $string;
- else
+ else
return $this->get_translation_number($num);
}
return $this->get_translation_number($num);
}
@@
-220,7
+220,7
@@
class gettext_reader {
// this is true, right?
// cache header field for plural forms
// this is true, right?
// cache header field for plural forms
- if (isset($this->pluralheader) && is_string($this->pluralheader))
+ if (isset($this->pluralheader) && is_string($this->pluralheader))
return $this->pluralheader;
else {
$header = $this->get_translation_number(0);
return $this->pluralheader;
else {
$header = $this->get_translation_number(0);
@@
-266,7
+266,7
@@
class gettext_reader {
$result=-1;
} else {
// find out the appropriate form
$result=-1;
} else {
// find out the appropriate form
- $select = $this->select_string($number);
+ $select = $this->select_string($number);
// this should contains all strings separated by NULLs
$result = $this->find_string($single.chr(0).$plural,0,$this->total);
// this should contains all strings separated by NULLs
$result = $this->find_string($single.chr(0).$plural,0,$this->total);