Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for string translations #731

Closed
contactashish13 opened this issue Jul 9, 2020 · 25 comments · Fixed by #947 or #958
Closed

add support for string translations #731

contactashish13 opened this issue Jul 9, 2020 · 25 comments · Fixed by #947 or #958
Labels
doc-created This label will be used after the doc-needed request has been satisfied. doc-needed This issue requires documentation updates or additions once it has been completed. enhancement Request to improve or optimize an existing feature or functionality in the project released Indicate that an issue has been resolved and released in a particular version of the product.

Comments

@contactashish13
Copy link
Contributor

contactashish13 commented Jul 9, 2020

Description:

Allow users to translate their dynamic data.

I’d like to translate everything in the graph: titles, axes and series names.

https://wordpress.org/support/topic/translation-with-wpml-22/

https://wpml.org/forums/topic/visualizer-charts-and-graphs/

This could be important: https://wpml.org/documentation/theme-compatibility/go-global-program/

@contactashish13 contactashish13 added the enhancement Request to improve or optimize an existing feature or functionality in the project label Jul 9, 2020
@contactashish13
Copy link
Contributor Author

@rodica-andronache do you think this can be added easily (without a code change) like we did in WPPR?

@rodica-andronache
Copy link
Contributor

@contactashish13 if you mean with the wpml-config file, I'm not sure. It's a possibility but it will need to be tested

@contactashish13
Copy link
Contributor Author

@DanyCaissy please add this to the correct queue/version. It would also be good if you can do some research on polylang vs wpml and which we should support. Neither of them is easy.

@contactashish13 contactashish13 changed the title translation with WPML add support for string translations Jul 9, 2020
@Skystream96
Copy link

Skystream96 commented Aug 3, 2022

There is one user that asked about the WPML compatibility of our Plugin and after doing a bit of research I noticed that we don't appear on their list of compatible plugins. then I found this old enhacement that hasn't been solved yet so I posted here.

@girishpanchal30 @vytisbulkevicius do you think it would be a good idea to work with WPML and make our plugin translatable? I haven't seen many users requesting it and I think it is quite a hard implementation but wanted to hear your opinion anyway.

Also here is a quite recent ticket on the WPML support forum talking about the compatibility.

Here is the user report.

Thank you and I'm eager to hear your opinion!

@girishpanchal30
Copy link
Contributor

Hey @Skystream96,
If we do the same thing as WPML does for pages and posts, I believe we can add WPML support.
Ref: https://tinyurl.com/27uqumet

Here is my opinion:
Users may quickly set up charts for different languages if we add a new action to the chart list.
Ref: https://tinyurl.com/2a7smugd

Thanks

@Skystream96
Copy link

Hey @girishpanchal30 ,

That sounds good but would this implementation mean that they will have another chart for that particular language, so let's say I have 3 languages on my website, this would mean I would have the same chart 3 times (once for every language) right?

Wouldn't this affect performance quite drastically?

@vytisbulkevicius what do you think about this?

@girishpanchal30
Copy link
Contributor

That sounds good but would this implementation mean that they will have another chart for that particular language, so let's say I have 3 languages on my website, this would mean I would have the same chart 3 times (once for every language) right?

Yes

Wouldn't this affect performance quite drastically?

Yes, the above method affect database space.

@vytisbulkevicius
Copy link
Contributor

This sounds good to me, and the approach suggested by @girishpanchal30 seems to be efficient. I don't think the space of the database increases that much here to make an impact on the speed of website, right?
I mean the same way you translate every post/page, and it doesn't hurt that much, so we should be good.

I also heard about this request a few times so I think we can proceed with this one.

P.S This request https://wpml.org/forums/topic/visualizer-plugin-compatibility/ is not related, it was a bug on our end and was fixed here - https://github.com/Codeinwp/visualizer-pro/issues/333

@girishpanchal30
Copy link
Contributor

I don't think the space of the database increases that much here to make an impact on the speed of website, right?

Yes, you are right it will not affect website performance.

girishpanchal30 added a commit that referenced this issue Oct 11, 2022
@girishpanchal30 girishpanchal30 linked a pull request Oct 11, 2022 that will close this issue
@girishpanchal30
Copy link
Contributor

Hey @Skystream96 @vytisbulkevicius,

As per my suggestion, I have implemented WPML plugin support. Please check and do let me know if you have any issues.
PR: #947

Thanks

@vytisbulkevicius
Copy link
Contributor

Hi @girishpanchal30,

Thank you for working on this.
I tried to test the version of the plugin from the mentioned PR but can't make the translated chart to work. Here is my screencast: https://vertis.d.pr/ewnB0y
I was able to translate data for the chart but when I save the chart it doesn't show me that translated version as a new chart in library and in the different language version of the page I don't see the chart rendered.
Am I doing something incorrectly?

Also, can we move this feature to the PRO version of the plugin? Sorry for not mentioning this before, this issue was originally created in the free repo but we think it should be a pro feature.
Thank you.

@girishpanchal30
Copy link
Contributor

Hey @vytisbulkevicius

Am I doing something incorrectly?

Yes, I have excluded other language charts from the list page. Users can see the add/edit icon when hover the flag.

For frontend:
Use the main chart ID in the shortcode. It will automatically render another language chart when changing the language.

For example:

{site_url}/chart-demo/ - Display default language chart
{site_url}/chart-demo/fi - Display Finnish language chart OR any other.

Do you want to display the chart on the list page?

Also, can we move this feature to the PRO version of the plugin? Sorry for not mentioning this before, this issue was originally created in the free repo but we think it should be a pro feature.

Okay, sure!

Thanks

girishpanchal30 added a commit that referenced this issue Oct 11, 2022
@girishpanchal30
Copy link
Contributor

Hey @vytisbulkevicius,

Also, can we move this feature to the PRO version of the plugin? Sorry for not mentioning this before, this issue was originally created in the free repo but we think it should be a pro feature.

I have moved the pro feature and also added some list improvements. Please check with the below PR.

Free: #947
Pro: https://github.com/Codeinwp/visualizer-pro/pull/355

Thanks

@irinelenache
Copy link

@girishpanchal30 Tested and the feature seems to be working fine for me 👍

A single mention, the flags weren't visible for me until i had this setup in the WPML settings https://vertis.d.pr/1d6Tx2 (I tried with fresh instances on tastewp/instawp and i always had to check this in order to make it work)

@girishpanchal30
Copy link
Contributor

A single mention, the flags weren't visible for me until i had this setup in the WPML settings https://vertis.d.pr/1d6Tx2 (I tried with fresh instances on tastewp/instawp and i always had to check this in order to make it work)

@irinelenache Yes, This is the first step to enable translation support.

@vytisbulkevicius vytisbulkevicius added the doc-needed This issue requires documentation updates or additions once it has been completed. label Nov 3, 2022
@AndreeaCristinaRadacina
Copy link

AndreeaCristinaRadacina commented Nov 3, 2022

Hi there!

While creating the doc, I have made a few more tests, to check how this behaves and I have some questions ( maybe suggestions, if you consider them useful ):

  • If I have created a translated chart it doesn't inherit the filters, but I am not sure if it's intuitive. I mean, I know we can design the translated chart and make it exactly like the default version, but I just wanted to point this out.
  • Why are we allowed to pick another type of chart when we create the translated version? Shouldn't it be the exact chart as before?

@girishpanchal30
Copy link
Contributor

Hey @vytisbulkevicius,

What do you think about these questions?

  1. If we have a clone with a setting, the user wants to reconfigure chart data.
  2. I've opened a new chart model so users can choose a different chart if the user wants. Otherwise, the user chooses the same chart and configure it for another language.

Thanks

@vytisbulkevicius
Copy link
Contributor

Hi @girishpanchal30,

In my point of view when clicking the flag to translate the chart we should make a clone of existing chart without an option to choose a different type of chart, the purpose of this is to translate strings. Of course, we can keep those other options available but allowing to create a completely different type of chart creates confusion IMO.
So clicking the flag should make a clone and inherit everything that existing chart in main language already has.

Also, I tested again now in my test instance with the latest versions above and to me it doesn't work the way you defined above:

Yes, I have excluded other language charts from the list page. Users can see the add/edit icon when hover the flag.

For frontend:
Use the main chart ID in the shortcode. It will automatically render another language chart when changing the language.

For example:

{site_url}/chart-demo/ - Display default language chart
{site_url}/chart-demo/fi - Display Finnish language chart OR any other.
#731 (comment)

Here is my screencast - https://vertis.d.pr/v/KmglpN
So should it work the way as it works in my screencast or how described above?

@girishpanchal30
Copy link
Contributor

@vytisbulkevicius

In my point of view when clicking the flag to translate the chart we should make a clone of existing chart without an option to choose a different type of chart,

Okay

Also, I tested again now in my test instance with the latest versions above and to me it doesn't work the way you defined above:

Can you please share the test instance details here?

Thanks

@vytisbulkevicius
Copy link
Contributor

@girishpanchal30,

Sure, as this repo is public I shared it here - https://github.com/Codeinwp/visualizer-pro/pull/355

@girishpanchal30
Copy link
Contributor

Also, I tested again now in my test instance with the latest versions above and to me it doesn't work the way you defined above:

@vytisbulkevicius Fixed, Can you please retest with the latest commit?

@vytisbulkevicius
Copy link
Contributor

@girishpanchal30,

Nice, it works now correctly and translated version of the chart is rendered automatically.

I'm planning to make a release but I will wait then till you make that change when creating the translation for a chart it doesn't show you the ability to create a new type and just inherits everything from the one you're translating.

girishpanchal30 added a commit that referenced this issue Nov 4, 2022
@girishpanchal30
Copy link
Contributor

@vytisbulkevicius

In my point of view when clicking the flag to translate the chart we should make a clone of existing chart without an option to choose a different type of chart,

Fixed, Please check and do let me know if you have any issues.

@vytisbulkevicius
Copy link
Contributor

Works great @girishpanchal30 🚀
Thank you!

@vytisbulkevicius vytisbulkevicius linked a pull request Nov 4, 2022 that will close this issue
vytisbulkevicius added a commit that referenced this issue Nov 10, 2022
- Fixed table chart decimal number issue Decimal Numbers are ignored and not displayed #955
- Fix the scrollbar issue that happens on WP 6.1 version [WP 6.1] Chart permissions selector is not scrollable #950
- Fix PHP Warning Warning when copy (frontend action) is enabled #949
- Compatibility with the WPML translation plugin for translating charts [PRO feature] add support for string translations #731
- Integration with Woocommerce Data endpoints for creating charts [PRO feature]
- Show new features on chart library page
pirate-bot pushed a commit that referenced this issue Nov 10, 2022
#### [Version 3.9.0](v3.8.1...v3.9.0) (2022-11-10)

- Fixed table chart decimal number issue Decimal Numbers are ignored and not displayed [#955](#955)
- Fix the scrollbar issue that happens on WP 6.1 version [WP 6.1] Chart permissions selector is not scrollable [#950](#950)
- Fix PHP Warning Warning when copy (frontend action) is enabled [#949](#949)
- Compatibility with the WPML translation plugin for translating charts [PRO feature] add support for string translations [#731](#731)
- Integration with Woocommerce Data endpoints for creating charts [PRO feature]
- Show new features on chart library page
@pirate-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Nov 10, 2022
@AndreeaCristinaRadacina AndreeaCristinaRadacina added the doc-created This label will be used after the doc-needed request has been satisfied. label Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-created This label will be used after the doc-needed request has been satisfied. doc-needed This issue requires documentation updates or additions once it has been completed. enhancement Request to improve or optimize an existing feature or functionality in the project released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants