JavaScript Support through Drupal.t()

Manuel Garcia - February 5, 2009 - 14:17
Project:String Overrides
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Just a quick question here, does this module handle translatable strings from js files that use the Drupal.t() function?

I am testing it and it doesn't look like it's replacing it... so I was just looking to clarify this before I throw my computer out the window hehe :)

Thanks!

#1

Rob Loach - February 5, 2009 - 16:14
Title:Does this module handle Drupal.t() ?» JavaScript Support through Drupal.t()

No it doesn't, but that is definitely a good idea. Would it just send all the strings set in String Overrides to Drupal.locale.strings? How does Locale do it? What if there was an additional String Overrides tab for JavaScript strings?

#2

Manuel Garcia - February 5, 2009 - 18:02

I opened up locale.module and found this function which looks like it's how its being done: locale_update_js_files().
I then ran a find in files for that function on the whole of drupal, and found _locale_invalidate_js() in locale.inc.

As far as how string overrides should step in I'm afraid it's passed my knowledge... perhaps we should harass someone in #drupal ?

I think having another tab for JavaScript strings would make sense, since this would probably work differently. Again, just guessing here...

Hope this helps -- thanks for caring!

#3

Manuel Garcia - February 14, 2009 - 22:23
Category:support request» feature request

#5

Rob Loach - June 26, 2009 - 23:50
Status:active» needs work
 
 

Drupal is a registered trademark of Dries Buytaert.