[Phpfreechat-svn] SF.net SVN: phpfreechat: [924] trunk/src/pfci18n.class.php
Status: Beta
Brought to you by:
kerphi
|
From: <ke...@us...> - 2007-01-05 23:13:23
|
Revision: 924
http://svn.sourceforge.net/phpfreechat/?rev=924&view=rev
Author: kerphi
Date: 2007-01-05 15:13:21 -0800 (Fri, 05 Jan 2007)
Log Message:
-----------
fix a problem with multiple translations on a single line
Modified Paths:
--------------
trunk/src/pfci18n.class.php
Modified: trunk/src/pfci18n.class.php
===================================================================
--- trunk/src/pfci18n.class.php 2007-01-05 23:10:22 UTC (rev 923)
+++ trunk/src/pfci18n.class.php 2007-01-05 23:13:21 UTC (rev 924)
@@ -140,8 +140,8 @@
$files = array_merge($files, glob(dirname(__FILE__)."/commands/*.php"));
$files = array_merge($files, glob(dirname(__FILE__)."/containers/*.php"));
$files = array_merge($files, glob(dirname(__FILE__)."/proxies/*.php"));
- $files = array_merge($files, glob(dirname(__FILE__)."/client/*.php"));
- $files = array_merge($files, glob(dirname(__FILE__)."/../themes/default/templates/*.php"));
+ $files = array_merge($files, glob(dirname(__FILE__)."/client/*.php"));
+ $files = array_merge($files, glob(dirname(__FILE__)."/../themes/default/*.php"));
$res = array();
foreach ( $files as $src_filename )
@@ -151,10 +151,13 @@
foreach( $lines as $l)
{
// the labels server side
- if( preg_match_all('/_pfc\("([^\"]*)"(\s*\,.*|)\)/', $l, $matches) )
+ if( preg_match_all('/_pfc\("([^\"]+)"/', $l, $matches) )
{
- echo "line: ".$line_nb."\t- ".$matches[1][0]."\n";
- $res[$matches[1][0]] = "// line ".$line_nb." in ".basename($src_filename);
+ foreach($matches[1] as $label)
+ {
+ echo "line: ".$line_nb."\t- ".$label."\n";
+ $res[$label] = "// line ".$line_nb." in ".basename($src_filename);
+ }
}
// the labels client side (JS)
if( preg_match_all('/"([^"]*)",\s\/\/\s_pfc/', $l, $matches) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|