Ticket #379 (new defect)

Opened 4 months ago

Last modified 4 months ago

error in utils/i18n.php

Reported by: mariuszekpl Assigned to: nobody
Priority: normal Milestone: 0.9.1
Component: core Version: 0.9.1
Severity: normal Keywords:
Cc: Patch Included: 0
Review Stage: reviewed

Description

I found small error in utils/i18n.php

I generate new en_GB.po and test it.

php utils/i18n.php
msgfmt --statistics languages/en_GB/LC_MESSAGES/en_GB.po

msgfmt return error: languages/en_GB/LC_MESSAGES/en_GB.po:2348: end-of-line within string

line languages/en_GB/LC_MESSAGES/en_GB.po:2348

#: mod/admin/lib/admin_spam.php:7:
msgid "Add regular expressions below, one per line, to block spam. For example
msgstr ""

Error is in function scan()

In code is

$_matches = preg_split('/,\s*"|,\s*\'/',$matches[1]);
$_line = $_matches[0];
$result[]= array('file'=>$_file,'string'=>$_line);

Why you used preg_split ??

A change code to

//$_matches = preg_split('/,\s*"|,\s*\'/',$matches[1]);
$_line = $matches[1];
$result[]= array('file'=>$_file,'string'=>$_line);

And now works OK :)

Change History

08/06/08 08:33:05 changed by misja

  • review_stage changed from unreviewed to reviewed.

Thanks for this. Could you attach your enhancements as a diff (svn diff)? This also applies to #380