lifterlms icon indicating copy to clipboard operation
lifterlms copied to clipboard

Conflict with Loco Translate plugin

Open actuallyakash opened this issue 2 years ago • 6 comments
trafficstars

Reproduction Steps

Loco Translate can't find the translation file when the user has selected the "custom" location.

  • Use Loco Translate to localize LifterLMS.
  • Choose a custom location https://share.getcloudapp.com/OAuoyPlm

Expected Behavior

Loco should be able to correctly localize LiterLMS picking the translation file from the selected custom location.

Actual Behavior

Loco Translate can't find the translation file when the user has selected the "custom" location.

Possible solution? [from @dominiquemariano ] When Loco Translate is installed, instead of looking at wp-content/languages/lifterlms/lifterlms-en_US.mo, we should look at wp-content/languages/loco/plugins/lifterlms-en_US.mo when the user selects a "custom" location

System Information

LifterLMS 7.1.4
WordPress 6.2
Loco Translate 2.6.4

This issue has been recreated:

  • [x] Locally
  • [ ] On a staging site
  • [x] On a production website
  • [ ] With only LifterLMS and a default theme

Related User Information

https://wordpress.org/support/topic/loco-translate-not-working-as-expected/#post-16704935

actuallyakash avatar May 03 '23 14:05 actuallyakash

[from our slack conversation] Loco Translate works with plugins and themes without the need for them to do anything special. If it doesn't work for us it means that we might do something unusual. I would focus on understanding this, and if we can safely "revert" this behavior, only if we can't I would consider a possible compatibility layer for Loco Translate.

eri-trabiccolo avatar May 03 '23 14:05 eri-trabiccolo

Hey @eri-trabiccolo @dominiquemariano

[As per our Slack conversation]

I've tested the Loco translate with LifterLMS with both locations, i.e.,

Author: plugins/lifterlms/languages/lifterlms-ca.po & Other: languages/loco/plugins/lifterlms-ca.po

The Loco Translate is working perfectly. I've tried it with the language "Catalan", as the user did it. Let me know if there's some other use-case I should follow to reproduce the issue.

actuallyakash avatar May 08 '23 14:05 actuallyakash

hey @actuallyakash can you look furthermore into this? I can reproduce it, so if you can't it'd be interesting to understand under which conditions it doesn't happen. disable all the plugins except LifterLMS and Loco. Also make sure you're testing latest LifterLMS stable or the dev branch.

Thanks!

eri-trabiccolo avatar May 15 '23 10:05 eri-trabiccolo

hey @eri-trabiccolo

I was able to reproduce the issue. Apologies, previously I used the wrong directory to save the translation files which was working fine. Let me know if this PR fix works in this case.

actuallyakash avatar May 15 '23 14:05 actuallyakash

Fixed by #2435 but also by #2326

The latter fixes various issues and if accepted makes #2435 not needed.

eri-trabiccolo avatar May 15 '23 17:05 eri-trabiccolo

It appears this is also fixed in #2593

brianhogg avatar Feb 15 '24 10:02 brianhogg