translating cobalt?
nofuseto - April 16, 2009 - 19:59
| Project: | Cobalt |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Hugo Wetterberg |
| Status: | closed |
Jump to:
Description
...and:
2) How can I translate Cobalt?
I mean the strings:
View
Edit
Delete
Show etc...
Tried with "translate interface" with no chance, so I guess it's hardcoded somewhere, but I couldn't find the strings in your code. Or is it a Gears problem?
Thanks again for your work.

#1
Found them: in the js files. Anyway: is there a way to use drupal's tranlation framework instead of hardcoding the strings?
#2
There sure is. I will fix this and put out a new release.
#3
This is fixed in 6.x-1.1 which will be up shortly
#4
Great job hombre!
#5
testing version 1.1
now everything seems translatable... except the strings "Assign shortcut" and "Delete". I tried looking up the code, and following your diffs changed line 219 of /js/cobalt.js from:
'name': 'Assign shortcut',To:
'name': Drupal.t('Assign shortcut'),Everything seems to work fine (hope I didn't mess anything).
What puzzles me is I double checked the "Delete" strings in:
/js/cobalt.nodes.js
And
/js/cobalt.users.js
...
They are both wrapped in t()s, but I can't translate them.
#6
Thanks for testing out the new version (and for finding 'Assign shortcut'). Strange about the Deletes, it works fine when I've tested it, have you cleared cache properly?
#7
Weird... Flushed all caches in drupal and in my web browser, but Delete is still there...
Checked in Translate Interface, and it doesn't seem to find Cobalt's "Delete" strings. Locale output:
Delete
modules/user/user.module:1068; modules/user/user.pages.inc:324,257; modules/user/user.admin.inc:869; modules/upload/upload.module:517; modules/taxonomy/taxonomy.admin.inc:877,842,749,720,220,187; modules/system/system.module:1534; modules/profile/profile
While for example searching "Go to" i get:
Go to
sites/all/modules/cobalt/js/cobalt.menu.js
So "Delete" gets translated correctly everywhere Locale finds it, just not in Cobalt.
To be sure, I tried a fresh install, and there Locale finds Cobalt's "Delete" and translates it correctly! Locale output on fresh install:
Delete
includes/convert.inc:108,35; , includes/admin.inc:844,631,98; sites/all/modules/cobalt/js/cobalt.nodes.js; sites/all/modules/cobalt/js/cobalt.users.js
So I think the problem is that in my original site there is some module (got a bunch of them) that messes up with translations or Cobalt. Too specific issue, consider it closed.
BTW thanks again for your coding, still can't get used to flashing through Drupal so fast!
#8
Automatically closed -- issue fixed for 2 weeks with no activity.