I've downlaoded and installed your agenda module at my professional website
> (http://www.polealpha.com)
> I'd like to display French words in the block, but your module displays (as
> field names) :
> calendar
> start time
> end time
> link
> ...etc
>
> Can you tell me where I must translate the field names to display them in
> French ?
> I thank you very much,
> Kindest regards,
RVB

Comments

rvbcocardes’s picture

OK, I've changed the field names in agenda.module
in the // Build up information about the event
Example :
$event('end time') changed as $event('heure fin')
I've done this way each time I needed a word in French.

Of course, I've translated before all the module in French with potx.
All works fine, but it will be more difficult to update my module...

NiklasBr’s picture

Component: Miscellaneous » Code
Category: support » bug

I believe this is actually a bug. The strings that are also used as keys in the array that is themed are not wrapped in t(), changing line 42 in agenda-block.tpl.php to wrap it in t() should solve this issue:

-           <?php echo $event[$key]; ?>
+           <?php echo t($event[$key]); ?>
aidanlis’s picture

Category: bug » feature

You can't t() on variables. Not sure how to fix this.

aidanlis’s picture

Status: Active » Fixed

Okay I've written a translate wrapper that should work. It's in the next version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

matt_72’s picture

Title: Field names translation » Field names translation in Block output
Version: 6.x-1.7 » 7.x-1.0
Category: feature » bug
Status: Closed (fixed) » Needs review

Though I tried everything with an edited .po-translation file, translating it by hand, updating translation files, etc. I couldn't get the Block output for "start time", "end time" and "end date" to appear in German.
Now I found a workaround:
I edited the agenda.module file like this:

$t['end time'] = t('endzeit')

and accordingly for the other two strings and now it works. Be careful, only translate the strings after t('...'), not after $t.

I don't know whether this is really a bug concerning the translation import of the .po-file.

aidanlis’s picture

Status: Needs review » Fixed

All of the text is wrapped in t(), your problem is elsewhere.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.