Translate content type names displayed
aufumy - September 28, 2009 - 18:40
| Project: | Automatic Nodetitles |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Add t() around the display of content type names.
| Attachment | Size |
|---|---|
| auto_nodetitle_translate.patch | 1.05 KB |

#1
I have tried this, but it does not work.
#2
tomsm, could you please be more specific?
What was the specific issue, did the patch not apply, or?
If the patch applied, then do you have locale module enabled, and did you supply a translated version of the content type name?
#3
Yes, I have locale and i18n enabled. I changed my auto_nodetitle.module by adding the two t() functions:
t($types[$node->type]->name)andt($types[$node->type]->name)))I did not apply the patch, I just modified the module file. Is this ok?
I have set my auto node title pattern to: [type-name] [author-name] [dd]/[mm]/[yyyy]
With translation table I added a French and Dutch translation for my content type "Order". Normally [type-name] should be translated, right?
I also set the pattern to: Order [author-name] [dd]/[mm]/[yyyy]
I searched for all Order strings but did not find this pattern.
I also cleared the cache.
#4
I should not have used t() for translating variables. Instead this patch uses tt().
Also some commenting fixes.
What this fix does is, when you are creating a node in French, and you save the node without any title, it will use the node type name in French as the title.
#5
using a wrapper for tt(), function auto_nodetitle_tt()