Sommerregen / grav-plugin-jscomments

JSComments is a Grav (http://github.com/getgrav/grav) plugin which allows to integrate comments into individual pages from Discourse / Disqus / Facebook / Google+ / HyperComments / IntenseDebate / Isso, and Muut comment systems.
Other
29 stars 9 forks source link

Language setting not really working #6

Closed JohnMica closed 8 years ago

JohnMica commented 8 years ago

Even when choosing language in the yaml as ro_RO or ro, the sdk loaded is in English only en_US. not sure if in the twig the choosing and matching the language is working as should and the language loaded keeps being the en_US.

any idea on how to just load the one language that I need ?

thanks in advance.

Sommerregen commented 8 years ago

@JohnMica Is this rissue related to your PR #5 ? Otherwise can you tell me which provider you are referring to? It is the Facebook provider? This is due to L5, which is due to a missing check.

As far as I can see, you are probably using the master branch with JSComments v1.2.10. This branch is not up-to-date and stays there until Grav v1.1 is released out of beta. The develop branch with JSComments v2.0.0-beta.3 is the current one, which fixes a lot of bugs and comes with many enhancements. You may try it and come back again, when your issue still persists.

JohnMica commented 8 years ago

@Sommerregen is not really related to my previous PR #5 ( which I have corrected now)

My website is Romanian and I am trying to use the Romanian version of the comments in Facebook. I have tried with my own app in facebook but for some reason only the en_US keeps loading.

I have been using the develop branch on localhost of both grav and other plugins (all last betas), changed the ovewrite locale- true /false (and the rest of the settings in system.yaml) just to make sure that the correct language will be loading.

could it be the language setting has to be ro or ro_RO (i have tried both with no luck). I even tried modifying the twig to load only the ro)RO sdk but still no luck).

Sommerregen commented 8 years ago

Hi @JohnMica , to get Romanian language ro_RO should do the job (see https://www.facebook.com/translations/FacebookLocales.xml). I tested Facebook comments with that settings and JSComments is generating the url //connect.facebook.net/ro_RO/sdk.js#xfbml=1&version=v2.5, which is right according to the docs.

What you can do is updating JSComments to beta.4 and inspect the HTML code to see you get the same url. Further it might be that there is a language field, when creating the Facebook App. But since I'm not using Facebook and have no account I can't test it locally.

JohnMica commented 8 years ago

Thanks for the reply and the info. In the Facebook app I have the ro_RO sdk and I placed the divs just above the jscomment code to have the share/like buttons but the code loads is still en_US . I'm in UK so I was thinking the sdk would be en_GB if the locale setting had anything to do with it. I'll check tomorrow on a computer and let you know

John

Sent from my iPhone

On 8 Jun 2016, at 19:21, Benny notifications@github.com wrote:

Hi @JohnMica , to get Romanian language ro_RO should do the job (see https://www.facebook.com/translations/FacebookLocales.xml). I tested Facebook comments with that settings and JSComments is generating the url //connect.facebook.net/ro_RO/sdk.js#xfbml=1&version=v2.5, which is right according to the docs.

What you can do is updating JSComments to beta.4 and inspect the HTML code to see you get the same url. Further it might be that there is a language field, when creating the Facebook App. But since I'm not using Facebook and have no account I can't test it locally.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

JohnMica commented 8 years ago

I am back with an update - seems on a different phone/ the ro_RO sdk is getting loaded, so i guess its working as it should. Just on my laptop its loading the en_US even in a incognito page ...

Sommerregen commented 8 years ago

Good to know and thank you for your PRs! :smile: