Simple Machines Community Forum

Customizing SMF => Building Your Community and other Forum Advice => Topic started by: Dr Web on October 16, 2021, 04:37:45 PM

Title: A few questions
Post by: Dr Web on October 16, 2021, 04:37:45 PM
I installed the portuguese_pt language, but the member labels were not totally translated.

I mean Newbie, Jr. Member, Member, Sr. Member, Hero Member, Administrator, Moderator, Visitor

Visitor and Moderator were translated. The others don't, so when I post there, on the left side where is the information of the member, I am identified as Administrator instead of Administrador.

You cannot view this attachment.

1 - What is the file where I can change these words to Portuguese?

2 - I attach an image where you can see on top right of the forum this: Membros: 2  •  Mensagens: 2  •  Tópicos: 1

How can I remove this?

3 - On the footer, next to the copyright link, you can see "Terms and Policies".

How can I translate this to Portuguese?

Thank you for any help 
Title: Re: A few questions
Post by: Diego Andrés on October 16, 2021, 05:02:07 PM
1- Those are likely default values stored in the database, so you need to edit each group from your admin in Admin > members > membergroups

2- There should be an option in the admin, maybe it's only for the Core theme? Might be in Theme Settings

3- I've never seen that. Could potentially be in the index.template.php if you want to remove it, or track down the text string so you can translate it.
Title: Re: A few questions
Post by: Dr Web on October 16, 2021, 05:06:31 PM
Thank you very much. I will follow your instructions.
Title: Re: A few questions
Post by: Dr Web on October 17, 2021, 06:39:09 AM
The first one was easy. I don't know how I didn't see it before. Lack of experience  :)

To resolve the second one, I deleted this code from the Settings.template.php and from the Settings.template.php~, because it was the only part I thought it had to do with it. It did not solve the problem.

array(
            'id' => 'number_recent_posts',
            'label' => $txt['number_recent_posts'],
            'description' => $txt['number_recent_posts_desc'],
            'type' => 'number',
        ),
        array(
            'id' => 'show_stats_index',
            'label' => $txt['show_stats_index'],
        ),
        array(
            'id' => 'show_latest_member',
            'label' => $txt['latest_members'],
        ),


So as it was only happening on the index page, I searched in other files, and I found this code on the BoardIndex.template.php and deleted it. It worked.

// Show some statistics if stat info is off.
    if (!$settings['show_stats_index'])
        echo '
    <p id="stats">
        ', $txt['members'], ': ', $context['common_stats']['total_members'], ' &nbsp;&#8226;&nbsp; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &nbsp;&#8226;&nbsp; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
        ', ($settings['show_latest_member'] ? '<br />' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
    </p>';

Now working on the last one.
Title: Re: A few questions
Post by: Kindred on October 17, 2021, 07:51:11 AM
Put the code back into settings.template.php

Terms and policies. In 2.1 is in index.<language>.php I believe
In 2.0 that would be a mod...
Title: Re: A few questions
Post by: Dr Web on October 17, 2021, 08:19:06 AM
Quote from: Kindred on October 17, 2021, 07:51:11 AMPut the code back into settings.template.php

Yes, I put it back into settings.template.php and settings.template.php~

Quote from: Kindred on October 17, 2021, 07:51:11 AMTerms and policies. In 2.1 is in index.<language>.php I believe
In 2.0 that would be a mod...

I have only these Mods installed, but the Terms and Policies was showing up before installing the Mods.

1.    Pretty URLs   
2.    Contact Page
3.      Ad Management   
4.    WYSIWYG Quick Reply

I already searched the file you suggest, but, I will look at it again in more detail.

Thanks.

Edited: I found it. It was there on the /Themes/default/languages/index.portuguese_pt-utf8.php

It was the only part that was not translated.

Thanks a lot.