[Pieforms-commit] SF.net SVN: pieforms: [227] pieforms-php5/trunk/src/pieform.php
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2007-12-12 21:40:56
|
Revision: 227 http://pieforms.svn.sourceforge.net/pieforms/?rev=227&view=rev Author: oracleshinoda Date: 2007-12-12 13:40:54 -0800 (Wed, 12 Dec 2007) Log Message: ----------- Apply patch from Mahara to make pieforms handle the case where a language string is asked for in a language we don't have a string for more gracefully. As reported by Nicolas Martignoni Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2007-12-08 01:20:39 UTC (rev 226) +++ pieforms-php5/trunk/src/pieform.php 2007-12-12 21:40:54 UTC (rev 227) @@ -1252,7 +1252,10 @@ $function = 'pieform_' . $plugin . '_' . $pluginname . '_i18n'; if (function_exists($function)) { $strings = $function(); - return $strings[$this->data['language']][$key]; + if (isset($strings[$this->data['language']][$key])) { + return $strings[$this->data['language']][$key]; + } + return '[[' . $key . '/' . $this->data['language'] . ']]'; } // We don't recognise this string This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |