[PATCH] Better highlight issues in Dialog resource when comparing to English(US)

Paul Vriens Paul.Vriens.Wine at gmail.com
Fri Jul 17 03:59:15 CDT 2009


---
 transl/php/lib_res.php |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/transl/php/lib_res.php b/transl/php/lib_res.php
index 534e16d..b25827c 100644
--- a/transl/php/lib_res.php
+++ b/transl/php/lib_res.php
@@ -890,7 +890,18 @@ class DialogResource extends Resource
         return ($this_ctrl['id'] != $other_ctrl['id']) ||
                (($this_ctrl['style'] | $ignore_style) != ($other_ctrl['style'] | $ignore_style)) ||
                ($this_ctrl['exStyle'] != $other_ctrl['exStyle']) ||
-               !is_equal_unicode_or_id($this_ctrl['className'], $other_ctrl['className']);
+               (!is_equal_unicode_or_id($this_ctrl['className'], $other_ctrl['className'])) ||
+               // We should have either id's or text in both
+               (is_int($this_ctrl['text']) ^ is_int($other_ctrl['text'])) || 
+               // If it's an id they should be equal
+               (is_int($this_ctrl['text']) &&
+                !is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text'])) ||
+               // If either text is empty they should be equal
+               (!is_int($this_ctrl['text']) && ((count($this_ctrl['text']) == 0) || (count($other_ctrl['text']) == 0)) &&
+                !is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text'])) ||
+               // If we have text in both they should not be equal
+               (!is_int($this_ctrl['text']) && ((count($this_ctrl['text']) != 0) && (count($other_ctrl['text']) != 0)) &&
+                is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text']));
     }
 
     function dump($master_res = NULL)
-- 
1.6.0.6


--------------090709090701040803020601--



More information about the wine-patches mailing list