Closed (fixed)
Project:
jQuery expander
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2011 at 16:25 UTC
Updated:
12 Dec 2012 at 15:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
mh86 commentedWe cannot use the t() function for dynamic strings. Instead a proper i18n field integration is needed.
Attached patch registers the expand and collapse text for translation using the i18n system. The only problem is that I've currently only registered the string for the 'default' view mode. Unfortunately I don't have the current view mode in hook_field_formatter_view() available. Alternatively we could use hook_field_attach_view_alter() (as i18n_field does), and loop over all possible fields and check the formatter, but that seems to be a little performance overhead.
Comment #2
amitaibuCommitted, thanks.
Comment #3
mh86 commentedSmall follow-up, current code throws a notice when a new text field has been created.
Comment #4
amitaibuCommitted, thanks.
Oh, and sorry to do it to you, but you now have commit access to the project ;)
Comment #5
iamcarrico commentedGosh---- that is mean of you Amitaibu! :-P
Comment #6
mh86 commentedyeah, commit access ;-)