Where can I change the name of the addbutton for advanced forums.
Standard the botton has the name 'New topic' and in front a +. My name is a mix of two languages "new onderwerp". I want to change this but I did not found where to change this name. My site is bilingual and I can not find this in stringtranslation. I tried to override it, but without succes. Can somebody help me?

Comments

troky’s picture

Category: task » support
Status: Needs work » Fixed

Button text is defined in theme.inc @ line 56

        'text' => t('New @node_type', array('@node_type' => $item['name'])),

... so you need to translate 'topic' string somewhere, not whole line ('New @node_type').

clcl’s picture

Thanks for the replay. I have founded theme.inc in the module advanced forum and at line 56 I indeed found 'text' => t('New @node_type', array('@node_type' => $item['name'])),

So the name of the @node_type has to be changed.In fact I have some broken languages links due to changing the default language. And now I see for the button 'New onderwerp' in place of 'New topic' of for the dutch language 'Nieuw onderwerp'.
Changing in MySQL? Do you think I can find the node_type in the database MySQL somewhere? I checked almost everywhere, but I do not know what to change, neither where to change. At the table node-type I saw that the settings are correct or better that these settings are like I have in another site where I did not change from language and where there is nothing broken.
String translations?
In the string translations I did a search for New, Onderwerp, New onderwerp, but it is not a string. I really 'm glad that you answered my questions.

Translate 'topic' string somewhere, canyou help me with this? I do not know what you mean by that?
Do I have to add another line? And what must I put in that line?

Thanks for helping me!

clcl’s picture

Hi Troky,
In the mean time I did change this line:
'text' => t('New @node_type', array('@node_type' => $item['name'])),
in:
'text' => t('New topic', array('@node_type' => $item['name'])),

And then I see that I have 'New topic' on the buttons. And that is what you mented bij not the whole line I suppose?
Is it possible to change the @node_type value at the database? I can maybe reset the broken links for the languages?

Thanks in advanced!

troky’s picture

'topic' node_type should be defined in core Forum module.

clcl’s picture

Troky,
Here is what I did:
- I installed and enabled the Localization update module.
- Then I uploaded the .po files for drupal 7.22 (admin/config/regional/translate/import, choose the .po files to upload and save) and this for the dutch language and for the french language. Strange but my .po files were not at profiles standard translations
- Since the advanced forum depend the core forum module. I uninstalled the advanced forummodule,
- I adapted the title name for the label from the core forum module contenttype ( admin/structure/types/manage/forum)
- Then I activated the advanced forummodule again and saw that the localization update module did updated the language for the advanced forum module.

Now I have for my dutch content 'Nieuw onderwerp', and for my French content ' Nouveau onderwerp'.
And when I change in theme.inc the line 56 to 'text' => t('New topic', array('@node_type' => $item['name'])),
I have for the two languages 'New topic'. I would love that the button was "Nieuw topic" and "Nouveau topic".

I looked also to find where the name 'onderwerp' comes from. In the forum module I read $type->title_label at line 733. This means that the node_type 's name is (if I am right) the title_label. But I changed my title_label to topic in place of onderwerp. But it did not help.

Can I do something more? I'm not so comfortable in changing something in the code.

Thanks in advanced!

clcl’s picture

Troky, thanks to your posts I have found a solution for the problem.
I searched in the string translation for 'New @node-type' and then adapted the languages there.

Status: Fixed » Closed (fixed)

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