String is untranslatable: variable_get need to be wrapped by t function

gagarine - October 22, 2009 - 10:19
Project:Terms of Use
Version:6.x-1.9
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

"I agree with these terms" checkbox is in the string but is not translated... strange.

#1

gagarine - October 22, 2009 - 10:24
Status:active» needs review

Mmmh
I think is because on ligne 153

<?php
  $checkbox_label
= check_plain(variable_get('terms_of_use_checkbox_label', t('I agree with these terms.')));
?>

Need to be

<?php
  $checkbox_label
= check_plain(t(variable_get('terms_of_use_checkbox_label', 'I agree with these terms.')));
?>

#2

gagarine - October 22, 2009 - 10:27
Status:needs review» reviewed & tested by the community

Ok it test and it work.

#3

gagarine - October 31, 2009 - 10:02
Title:"I agree with these terms" checkbox is not translated » String is untranslatable: variable_get need to be wrapped by t function
Status:reviewed & tested by the community» patch (to be ported)

I found other string untranslatable and create a patch..

AttachmentSize
terms_of_use-t_wrap_variable_get.patch 3.09 KB

#4

Kars-T - November 10, 2009 - 15:37
Status:patch (to be ported)» duplicate

Hi gagarine,

thanks for your work but you must not use t() like this!
http://groups.drupal.org/node/15177

This has to be done by tt()
http://drupal.org/node/304002

And this issue is a duplicate of #299416: translations support

Please don't set your own patches to "reviewed" or "to be ported". A review has to be done by somebody else and to be ported is something a mainter should use.

#5

gagarine - November 11, 2009 - 23:13

Thanks you I learn something today :)

 
 

Drupal is a registered trademark of Dries Buytaert.