[drupal-devel] [drupal:unconed] /includes common.inc

Dries Buytaert dries at buytaert.net
Fri May 27 09:28:19 UTC 2005


On 27 May 2005, at 10:16, Stefan Nagtegaal wrote:

>> Log message:
>>   - #23700: Fix some broken t()'s in common.inc
>>
>> Links:
>>   http://cvs.drupal.org/diff.php?path=drupal/includes/ 
>> common.inc&old=1.448&new=1.449
>>
>
> Ehmmm.... Maybe it is me, but didn't we agreed that we use  
> meaningfull variable names?
> So:
> -      watchdog('php', t("Could not convert XML encoding '%s' to  
> UTF-8.", $encoding), WATCHDOG_WARNING);
> +      watchdog('php', t("Could not convert XML encoding '%s' to  
> UTF-8.", array('%s' => $encoding)), WATCHDOG_WARNING);
>
> and:
> -    watchdog('php', t("Unsupported encoding '%s'. Please install  
> iconv, GNU recode or mbstring for PHP.", $encoding), WATCHDOG_ERROR);
> +    watchdog('php', t("Unsupported encoding '%s'. Please install  
> iconv, GNU recode or mbstring for PHP.", array('%s' => $encoding)),  
> WATCHDOG_ERROR);
>
>
> Had to be something like:
>
> -      watchdog('php', t("Could not convert XML encoding '%s' to  
> UTF-8.", $encoding), WATCHDOG_WARNING);
> +      watchdog('php', t("Could not convert XML encoding '% 
> encoding' to UTF-8.", array('%encoding' => $encoding)),  
> WATCHDOG_WARNING);
>
> -    watchdog('php', t("Unsupported encoding '%s'. Please install  
> iconv, GNU recode or mbstring for PHP.", $encoding), WATCHDOG_ERROR);
> +    watchdog('php', t("Unsupported encoding '%encoding'. Please  
> install iconv, GNU recode or mbstring for PHP.", array('%encoding'  
> => $encoding)), WATCHDOG_ERROR);
>

And shouldn't we use theme('placeholder')?

--
Dries Buytaert  ::  http://www.buytaert.net/





More information about the drupal-devel mailing list