AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Closed] Just reached 10K posts, but stat display is strange

12 Posts
4 Users
0 Reactions
3,343 Views
Posts: 72
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@le-bear)
Estimable Member
Joined: 9 years ago
[#50618]

This week-end, my forum went pass 10 000 posts. But the display is a bit strange.

What can I do to improve that ?

 2023 11 14 12 33 35 10 000 Messages Annonces Generales Forum Le Bear CNC et 6 pages de plus P

11 Replies
Posts: 72
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@le-bear)
Estimable Member
Joined: 9 years ago

I found the place where that number is formatted:

/wp-content/plugins/wpforo/includes/functions.php:function wpforo_print_number
and modified it by commenting out the nested if statements. now I have what I wanted.


1 Reply
RealAct
(@realact)
Joined: 8 years ago

Reputable Member
Posts: 239
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@le-bear I believe you really wouldn't need to modify the code for that. You could change that in the “WPForo Phrases” area.


Posts: 995
Moderator
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@martin)
Support Team
Joined: 10 years ago

@le-bear,

This is a translation issue. The phrase is incorrectly translated. The {number} should not be translated, this is a key for the number conversion. Now it's translated in the translation file and the functions cannot detect to replace it. You should install Loco Translate plugin and find it in the translation file, then change the translated {numéro} to {number}


Posts: 72
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@le-bear)
Estimable Member
Joined: 9 years ago

You're right, it's a translation issue. So, what I did finally, was to NOT translate that word in this function, because it should not be. I don't know if "number" is used in another context in which "numéro" would be correct, but if it is the case, what I did preserve the translation in other places.

if( $n > 1000000000000 ) {
		$number = round( ( $n / 1000000000000 ), 1 ) . ' ' . str_replace( '{number}', '', '{number}T' );
	} else if( $n > 1000000000 ) {
		$number = round( ( $n / 1000000000 ), 1 ) . ' ' . str_replace( '{number}', '', '{number}B' );
	} else if( $n > 1000000 ) {
		$number = round( ( $n / 1000000 ), 1 ) . ' ' . str_replace( '{number}', '', '{number}M' );
	} else if( $n > 10000 ){
                $number = round( ( $n / 1000 ), 1 ) . ' ' . str_replace( '{number}', '', '{number}K' );
        }
        $number = ( $number ) ? $number : number_format( $n );

Now, I understand this little modification could be overwritten by an update, so is there a way to put that somewhere else ? An even better solution would be to incorporate this change to WPForo to make this "problem" disappear for good.


Posts: 72
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@le-bear)
Estimable Member
Joined: 9 years ago

Posted by: @martin

The phrase is incorrectly translated.

Sorry, in fact, the phrase is CORRECTLY translated. Thing is, it's translated in a function where it should NOT be. In my book the word for that is "bug".

 


1 Reply
Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10723
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@le-bear,

Martin means that the {number} should not be translated in the plugin .PO/.MO files. You should install the Loco Translate plugin, open the language file you use for wpForo, find the {number}K {number{M}, etc. in the phrase list and change the translated {numéro} value to {numéro}.

So this is the problem caused by translation maker. The person who has translated wpForo to your language didn't understand that the {number} should not be translated.


Page 1 / 2
Share: