Paul Vriens : transl: Better highlight issues in Dialog resource when comparing to English(US).
Alexandre Julliard
julliard at winehq.org
Fri Jul 17 09:16:35 CDT 2009
Module: tools
Branch: master
Commit: 298f63b842913c784ed32c8b2dc1162cd496a48c
URL: http://source.winehq.org/git/tools.git/?a=commit;h=298f63b842913c784ed32c8b2dc1162cd496a48c
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Fri Jul 17 10:59:15 2009 +0200
transl: Better highlight issues in Dialog resource when comparing to English(US).
---
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..cbb60a8 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)
More information about the wine-cvs
mailing list