Notifications
Clear all

[Solved] missing php translation code in class-template.php

6 Posts
2 Users
0 Reactions
875 Views
Markus
Posts: 12
Customer
Topic starter
(@mahi)
Member
Joined: 2 years ago

Hi,

wpforo Private Messages : plugin version 3.0.1

File wpforo-private-messages/includes/class-template.php : Line 210 is not translation ready.
It would be nice to modify this line for the next plugin version.

'You have %d new messages'

should be replaced with

__( 'You have %d new messages', 'wpforo_pm' )

Same for the second part on the same line ( 'You have %d new message' ).

Line 396 : Another translation code is missing

wpforo_phrase( 'last activity: %s', false )

should be replaced with

wpforo_phrase( __( 'last activity: %s', 'wpforo_pm' ), false )

thank you

5 Replies
Posts: 4213
 Tom
Admin
(@tomson)
Famed Member
Joined: 10 years ago

Hi @mahi,

All phrases in wpforo_phrase() function go through the __() function as well, so there should not be such code:

wpforo_phrase( __( 'last activity: %s',

 

Reply
4 Replies
 Tom
Admin
(@tomson)
Joined: 10 years ago

Famed Member
Posts: 4213

You can find or add any phrase in wpForo > Phrases admin page using corresponding filter in the drop-down.

Screenshot 333
Reply
Markus
Customer
(@mahi)
Joined: 2 years ago

Member
Posts: 12

@tomson 

Unfortunaletly not everything is translated from English. There remains some translations to do.

I'm running Wordpress in French. In the backoffice wpForo => Phrases it's impossible to load the French translation (see screenshot). So the only way I work right now is to patch the php files.

What am I missing ? Why are some expressions not translated ?

thank you

screenshot phrases

 

Reply
 Tom
Admin
(@tomson)
Joined: 10 years ago

Famed Member
Posts: 4213

@mahi,

you don't need to load France, you should edit a phrase and insert the language value you want. if you cannot find a phrase, you should add it with the identical English phrase as "phrase key" and the translated version as "phrase value".

In other words, Phrases are not attached to any language, thy work with current language, so if you change them they'll be changed on the frontend as well. But only front-end.

Reply
Markus
Customer
(@mahi)
Joined: 2 years ago

Member
Posts: 12

@tomson 

I get it, and its working !

thank you for your prompt answer.

Reply
Share:
Scroll to top