Module: tools Branch: master Commit: 9f08477739cfe9dbb3765092929789a1465c09a7 URL: http://source.winehq.org/git/tools.git/?a=commit;h=9f08477739cfe9dbb37650929...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Tue Jul 21 18:01:03 2009 +0200
transl: Remove last references to the conf directory.
---
transl/php/lib.php | 25 ------------------------- transl/php/lib_res.php | 4 ++-- transl/php/resource.php | 2 +- 3 files changed, 3 insertions(+), 28 deletions(-)
diff --git a/transl/php/lib.php b/transl/php/lib.php index 48f1b65..4255905 100644 --- a/transl/php/lib.php +++ b/transl/php/lib.php @@ -93,19 +93,6 @@ function validate_id($id) return $id; }
-function get_raw_lang_name($id) -{ - static $lang_cache = array(); - if (empty($lang_cache[$id])) - { - global $DATAROOT; - - $name = file_get_contents("$DATAROOT/conf/$id"); - $lang_cache[$id] = $name; - } - return $lang_cache[$id]; -} - function get_lang_name($id) { return get_locale_name($id); @@ -154,18 +141,6 @@ function show_sublangs($id) echo "</div>"; }
-function has_lang_flag($id, $flag) -{ - return is_int(strpos(get_raw_lang_name($id), "[".$flag."]")); -} - -function is_lang_ignore_sublang($lang) -{ - if (!preg_match("/:00/", $lang)) - return FALSE; - return has_lang_flag($lang, "ignore-sublang"); -} - function get_lang_binid($lang) { if (!preg_match("/([0-9a-f]{3}):([0-9a-f]{2})/", $lang, $m)) diff --git a/transl/php/lib_res.php b/transl/php/lib_res.php index c62e3ce..c19087f 100644 --- a/transl/php/lib_res.php +++ b/transl/php/lib_res.php @@ -305,7 +305,7 @@ class ResFile return FALSE; }
- function loadResource($type, $name, $language, $ignore_sublang = FALSE) + function loadResource($type, $name, $language) { fseek($this->file, 0); $pos = 0; @@ -336,7 +336,7 @@ class ResFile $data = substr($data, $strpos); $header = unpack("VdataVersion/vmemoryOptions/vlanguage/Vversion/Vcharacteristics", $data);
- $curr_lang = ($ignore_sublang ? ($header["language"] & 0x3ff) : $header["language"]); /* check the ignore_sublang */ + $curr_lang = $header["language"]; if ($curr_lang == $language) { fseek($this->file, $pos + $headerSize); diff --git a/transl/php/resource.php b/transl/php/resource.php index 656d5bf..b88e30d 100644 --- a/transl/php/resource.php +++ b/transl/php/resource.php @@ -27,7 +27,7 @@ $compare = isset($_REQUEST['compare']); function load_resource(&$resources, $type, $id, $langid, &$res) { $file_type = $type & 0xff; /* wrc adds 0x100 for *EX resource*/ - $resdata = $resources->loadResource($file_type, $id, get_lang_binid($langid), is_lang_ignore_sublang($langid)); + $resdata = $resources->loadResource($file_type, $id, get_lang_binid($langid)); if (!$resdata) die("Resource not found in *.res file\n"); switch ($type)