Closed (fixed)
Project:
Agenda
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2010 at 07:51 UTC
Updated:
18 Mar 2011 at 13:41 UTC
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
Comment #1
rvbcocardes commentedOK, 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...
Comment #2
NiklasBr commentedI 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:
Comment #3
aidanlis commentedYou can't t() on variables. Not sure how to fix this.
Comment #4
aidanlis commentedOkay I've written a translate wrapper that should work. It's in the next version.
Comment #6
matt_72 commentedThough 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.
Comment #7
aidanlis commentedAll of the text is wrapped in t(), your problem is elsewhere.