Notifications
Clear all

Polylang compliant? And stars color?

24 Posts
4 Users
0 Likes
13.5 K Views
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

I just installed wpDiscuz in our site and love it, except one thing. It is not really multi-lingual, and our site supports three languages (English, French and Greek).

Is there any chance that this plugin will be modified to support Polylang?

 

Here is an example of ourusage of wpDiscuz:

https://certs-it.com/2018/05/01/thassos-the-emerald-island/

Also, while changing the stars color in Dashboard/Comments/WPDISCUZ/Settings/Styling does change the color in the stars shown in the post, the stars shown in the comments seem to be unaffected. I even tried editing the /wp-content/plugins/wpdiscuz/assets/css/wpdiscuz-ratings.css, no luck. Any ideas?


   
Quote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 

wpDiscuz is a multi-langua plugin.

First please enable wpDiscuz PO/Mo files using this instruction:

https://wpdiscuz.com/docs/wpdiscuz-documentation/settings/general-settings/#use-po-files

Make sure wpDiscuz has the translation files you use, if it doesn't you should create translation files.

Second, you should create Comment forms for each language using this instruction:

https://wpdiscuz.com/docs/wpdiscuz-documentation/getting-started/custom-comment-form/comment-form-settings/#language

 


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

Thanks for coming back to me.

That's exactly what I have done, I've created three forms, one for each language. And I use the French translation file, as it came with your distribution, and I created the Greek translation files (wpdiscuz-el_GR.mo and .po).

The comment input form, obviously shows the elements from the proper form (English, Greek or French). Comment Form Header Text, Name, Email, Rating and Post Comment (Submit Button) are shown from the form and are in the proper language. However the line for Subscribe and Sorting, is not translated, from the .mo files, in either Greek or French. Neither are the buttons, Reply, Edit, Stick, Close, these are always shown in English.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 

It means that your multi-language solution doesn't change WordPress language. So wpDiscuz don't detects the new locals (language vars). This is not wpDiscuz issue. This comes from non-standard usage of language system.


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

But how can you use the standard Wordpress language system, to make a multi-lingual site? If you rely on Wordpress alone, you can have only one language. As I said, our site is using Polylang, a plugin that allows you to have a truly multilingual site. 

I'l see if I can patch your plugin, to work with Polylang.

In the mean time, can you please answer my question about the colors of the stars, inside the comment? I want stars in A in the attached picture

Screen Shot 2018 06 10 at 22.56.11
Screen Shot 2018 06 10 at 22.56.11

, to be the same color as stars in B.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 

What plugin you use for multi-lingual website? This should be done by plugin, you should not search for other solutions. For example the WPML does this well. Do you use this plugin?


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

I use Polylang.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 

I'm sorry but I have no idea. I'm not familiar with this plugin. I only can say that this plugin doesn't change WordPress local variable (language), thus wpDiscuz doesn't detects new language and doesn't change the comment form. I'd also recommend contact this plugin support. We'll also check this once we got some free time-frame.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 

The comment input form, obviously shows the elements from the proper form (English, Greek or French). Comment Form Header Text, Name, Email, Rating and Post Comment (Submit Button) are shown from the form and are in the proper language. However the line for Subscribe and Sorting, is not translated, from the .mo files, in either Greek or French. Neither are the buttons, Reply, Edit, Stick, Close, these are always shown in English.

So the comment form translation works fine. The other not-translated components comes from PO/MO files fo that language. You should edit the language files you use and make sure these phrases are translated in that files. It seems the subscription and sorting buttons are not translated yet. This is the only reason. Here is instruction for wpDiscuz translation: https://wpdiscuz.com/docs/wpdiscuz-documentation/translation/using-pot-file/

You should use PoEdit to edit translation files and complete translation. The languages you use are not fully translated, those incomplete.

You can also use Loco Translator: https://wordpress.org/plugins/loco-translate/

 


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

The Greek translation is not complete, but that shouldn't be a problem, because the strings that appear there are translated. The French translation came with your plugin, so it is complete (as far as I can tell). The strings are there, all of them.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 
Posted by: sv1cec

I understood that, long time ago.

Can you please answer my question about the stars colors?

Please navigate to Dashboard > Comments > Settings > Styling admin page, put this CSS code in Custom CSS Code textarea, save it, delete all caches and press Ctrl+F5 on website front-end:

#wpcomm .wpd-custom-field.wpd-cf-rating .wpd-cf-value {
     opacity: 1;
}

   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 
Posted by: sv1cec

The Greek translation is not complete, but that shouldn't be a problem, because the strings that appear there are translated. The French translation came with your plugin, so it is complete (as far as I can tell). The strings are there, all of them.

Not all files are complete in wpDiscuz. So you should edit them if some phrase is not translated. I'd say most of translated files are not complete in wpDiscuz.


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

Thanks for the stars css, appreciated.

As for the translations issue, I am pretty sure that the messages:

Join the discussion...

Subscribe

Edit 

etc 

are translated in the wpdiscuz-el_GR.po and .mo files.

I am downloading a copy of your plugin on my computer now, to see if I can figure out how to make it support the language files.


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

Well, I have to admit, the French translation is anywhere but complete!!! 

Still, the Greek translation has the Reply, Stick  etc translated, but they do not show. I am working on another way, using Polylang functions, but it's not going to be quick. I need to manually translate several things.

I'll keep you guys posted.


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

Well, I've verified that the locale of each page, is recognised by your plugin. 

Please have a look at> https://certs-it.com/2018/05/01/thassos-the-emerald-island/

Next to the "Close" button, you can see the locale, as it is returned by Polylang function get_locale (details can be found here:  https://polylang.pro/doc/developpers-how-to/). If you use the flags at the top right corner of that page to switch between Greek or French, you will see the locale change. Why doesn't wpDiscuz recognise the locale and use the proper .mo file?

As you can see, I've managed to translate some parts of your plugin to the other languages of interest to us. Those Greek or French buttons do not come from the translation files but from my code. I can do that for the rest of the strings, but it would be so much simpler, if the translation files could be used. And yes, the strings for the buttons and all other translated parts (like Join the discussion, Subscribe etc) do exist in the Greek translation file, I verified that. But without my code, they just do not show up.

How does your plugin decides which translation file to use? If you could tell me that, I could figure out how to make it Polylang compliant.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4172
 

Please do these changes:

1. Change the translation file names, they should not contain _GR part.The correct names are wpdiscuz-el.po and wpdiscuz-el.mo . Only the "el" part is needed because the multi-language plugin you use search for "el" language code:

2018 06 13 2329

Thank navigate to Dashboard > Comments > Forms, edit the Greek form and change the language code to "el". Save it delete all caches and check the Greek translation again.


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

Easy, I already had both files ready, one -el_GR and one _el. I edited the form, cleared the cache, still I do not get the translated strings from the .mo file. It still shows me "newest", "oldest", "most voted". And I verified that these strings are translated in the wpdiscuz-el.po file. 

I also used the .pot file to create a French translation wpdiscuz-fr.po and wpdiscuz-fr.mo, in which I translated only the "newest", "oldest", "most voted". Edited the French form to use the fr language, cleared caches and reloaded. Still it shows the English versions in the French form.

Are we looking for the locale or the code? Because in my site, locale is set to el_GR and code is set to el.

Screen Shot 2018 06 14 at 13.49.28

   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

Still, you are right, the language code is "el" for the Greek translation and "fr" for the French one. You can see the language code, in my site, next to the Close button.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5911
 

Hi sv1cec,

Please make sure the language keys are right. All language keys you can find here.

greek
French

 

 


   
ReplyQuote
(@sv1cec)
Active Member
Joined: 6 years ago
Posts: 17
Topic starter  

These are Wordpress language keys. Not Polylang. Polylang uses "el" for Greek and "fr" for French. But even if I set the form language to be fr_FR, still it doesn't work. Look at the "You are logged in as" string. My French form is currently set to "fr_FR". Still, the message comes out in English. The messages which are shown in French, are translated by me using a different method than the .mo and .po files.


   
ReplyQuote
Page 1 / 2
Share:
Scroll to top