Translation of block subject missing

farbridges - October 2, 2008 - 10:08
Project:CCK Blocks
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Earl Grey
Status:fixed
Description

When using the i18ncontent module (part of i18n module), it is possible to translate the labels of fields of content types. These translations are not shown in the CCK Blocks, because the t() function is not used to display the block subject.

This minor change solves it:

<?php
 
/* original line 54, does not use t() on content label for block subject
  block['subject'] = $fields[$delta]['widget']['label'] ? $fields[$delta]['widget']['label'] : $delta;
  */

  // replace with this, using t():
 
$block['subject'] = t($fields[$delta]['widget']['label'] ? $fields[$delta]['widget']['label'] : $delta);
?>

#1

ali_b - October 2, 2009 - 13:57

THANKS

#2

Earl Grey - October 27, 2009 - 12:17
Version:6.x-1.1» 6.x-1.x-dev
Assigned to:Anonymous» Earl Grey
Status:active» needs review

Please test the attached patch. It will get into the -dev version, if it works.

AttachmentSize
cck-blocks-translatesubject-DEV-316166-3.patch 792 bytes

#3

Earl Grey - October 27, 2009 - 22:13

To make testing easier, this patch is contained in tomorrows -dev release.

#4

Earl Grey - November 24, 2009 - 20:24
Status:needs review» fixed

seems to be fixed, as there are no further comments.

 
 

Drupal is a registered trademark of Dries Buytaert.