Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By kalin_s on
I used extractor.php to generate .pot files for several addon modules. The review module has only 26 strings to be translated, so I translated them all.
The description for the review content type is always in english:
Review
Reviews are articles with a numeric rating.
review.module:15, ;84
The strings are translated when searching for them with "Manage strings".
I uploaded the .po again with enabled existing strings replacement option, exported and imported the whole translation several times.
Disabled/cleared cache in browser and Drupal did not help either.
What else could be wrong?
Comments
problem with module code?
This function generates the listing:
http://api.drupal.org/api/5/function/node_add
And after looking at this example code:
http://api.drupal.org/api/5/function/hook_node_info
I can only assume that that problem is that whoever wrote the module did not t() the description of the content type?
Also, the node type data is saved to the database- try going to the node type in question and hitting "reset to defaults" if you're sure you have the translation in place now.
---
Work: BioRAFT
The code
This is the code - t() is used. But I'm not a coder, so can't see if anything is wrong. I'll try to compare the code with the documentation for hook_help/hook_info.
reset to default
So, the t() seems to be there- eliminating that possible issue.
Ok, so my suggestion would be to go into this content type and reset to defaults.
Or, it might work to go to the modules page and hit submit, since this may rebuild the list of content types.
This seems like a semi-bug since, as far as I can tell from the code, because the description is now editable and saved to the DB, it will only get translated when the the content type is first enabled.
---
Work: BioRAFT
Check po edit
There are two plurals in the paragraph. If the plural settings in P.O edit are incorrect then it will show these in red. If you translate anything shown in red and export it then it will not respond to the gettext() function.
If you are doing this by hand then you may have to experiment a bit with the plural settings in the po file.
Hiveminds Magazine
http://www.hiveminds.co.uk
for web publishers and community builders CMS Demo Matrix
Coming soon!Drupal Support | Drupal Sweden
No red (unfortunately)
The plural settings I used are the same with the rest of the modules. poEdit did not give any red coloured strings.
Thanks for the advice for the plurals, it could be a lifesaver someday :)
Experimental i18nstrings module
Now everything works. Gracias, Jose!
Download it from http://drupal.org/project/i18n