Hi,

i translated content type names with Drupal translate interface, but i cannot see that translations if i switch to different languages while page "create new content" is open. Why?

Comments

eugen80’s picture

Version: 6.x-1.3 » 6.x-1.4

also names of content types (content_profile) are shown in wrong language if i go to "my account"

Andrey Zakharov’s picture

Subscribe

KCdev’s picture

StatusFileSize
new1.5 KB

You probably have created content types with _ in the machine name which get converted to - in the drupal path,
while the menu alteration i18ncontent_menu_alter() uses the third path argument ($arg[2]) as new title callback translation argument for the node type menu items.
Though the actual i18nstrings translation gets saved on the actual type machine name.

With node type example my_type_machinename:

in your db you will find your translations saved under nodetype:type:my_type_machinename:name
the translation callback function however searches for nodetype:type:my-type-machinename:name

I encountered the same problem but never really bothered with it until today.
Patch attached should fix the issue (it also narrows the iteration to existing node types instead of all menu items that could have node_add as page callback, so might break customizations that would rely on that).

PS: don't know if this fixes the issue on "My account" page you talk about.

KCdev’s picture

Version: 6.x-1.4 » 6.x-1.9
Category: support » bug
volobar’s picture

I do subscribe to the patch for translating names in "Create content" page, but there is still a problem on "My account" page (as reported at #1). My knowledge in Drupal is not enough to fix it..

kndr’s picture

Component: Code » Strings
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.25 KB

#3 works for me. Thanks! KCdev, I am attaching your patch with correct indenting (mentioned at http://drupal.org/coding-standards#indenting). I think it should be mentioned, that cache should be cleared if patch have been applied.

jose reyero’s picture

Status: Reviewed & tested by the community » Fixed

Looks good. Committed with some changes (panels compatibility code was already in). Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.