diff options
author | xue <> | 2006-12-03 23:16:40 +0000 |
---|---|---|
committer | xue <> | 2006-12-03 23:16:40 +0000 |
commit | b69ca04f50ffd538239342f3bfd1e77ffc6156c0 (patch) | |
tree | bfd1a21d81ab196d3ae5a56dbdce708377af10b8 /framework/I18N/core | |
parent | ae4ad5ca39cbd338b65d2e20d8a3dc3ad228c128 (diff) |
Merge from 3.0 branch till 1550.
Diffstat (limited to 'framework/I18N/core')
-rw-r--r-- | framework/I18N/core/MessageSource_XLIFF.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/I18N/core/MessageSource_XLIFF.php b/framework/I18N/core/MessageSource_XLIFF.php index 79d4f38c..1f537932 100644 --- a/framework/I18N/core/MessageSource_XLIFF.php +++ b/framework/I18N/core/MessageSource_XLIFF.php @@ -287,7 +287,11 @@ class MessageSource_XLIFF extends MessageSource $xpath = new DomXPath($dom);
$body = $xpath->query('//body')->item(0);
- $count = $xpath->query('//trans-unit')->length;
+ $lastNodes = $xpath->query('//trans-unit[last()]');
+ if(($last=$lastNodes->item(0))!==null)
+ $count = intval($last->getAttribute('id'));
+ else
+ $count = 0;
//for each message add it to the XML file using DOM
foreach($messages as $message)
|