The node/add paths for content types that contain an underscore replace those underscores with a hyphen "-". If your content type is named test_content_type, the node/add path becomes: node/add/test-content-type. The i18ncontent module doesn't correctly reverse this replacement when creating translated menu items, the symptom of which is that content types containing underscores will not display as translated in the interface, even though a translation for them exists in the database.
Steps to re-create and test the attached patch:
1. Enable the following modules:
Locale
String Translation
Content Type Translation
2. Apply this patch, so you don't get burned by extra whitespace in your exported .po files in step 6
http://drupal.org/node/384794#comment-2356492
3. Add a content type with a "Type" field value containing an underscore (e.g. test_content_type)
4. Enable a non-English language (e.g. German) and configure path-based language negotiation.
5. Go to "translate interface" admin area (admin/build/translate) and export the "Content type" text group for your newly-configured language.
6. Translate with test strings and re-import.
7. Navigate to de/node/add and verify that both in the expanded Navigation menu and in the list of content types on the page, the name of your content type with the underscore is not translated.
8. Apply the patch attached to this issue.
9. Visit admin/build/modules to force a re-build of the menu router cache.
9. Re-load de/node/add and verify that your test content type's name is now translated in the menu and in the list of content types in the page's content.
| Comment | File | Size | Author |
|---|---|---|---|
| i18ncontent.module.patch | 616 bytes | bdurbin |
Comments
Comment #1
bdurbin commentedMoving to ready for review.
Comment #2
logicing commentedI can confirm the bug on i18n 6.x-1.6 and 6.x-1.7 too.
That patch fixes it as expected (tested on i18n 6.x-1.7), thanks bdurbin!
Comment #3
gaëlgThis seems to be fixed in 6.x-1.10