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

[com_finder] Allow loading plugin language strings from extension folder #12204

Merged
merged 2 commits into from
Oct 11, 2016

Conversation

piotr-cz
Copy link
Contributor

@piotr-cz piotr-cz commented Sep 29, 2016

Summary of Changes

This adds functionality to load finder plugin language strings from the extension folder (just like it's happening in other places).

Testing Instructions

  1. Move finder - categories plugin language files en-GB.plg_finder_content.ini and en-GB.plg_finder_content.sys.ini from administrator/language/en-GB folder to plugins/finder/content/language/en-GB
  2. Go to Components > Smart Search
  3. Index content (on toolbar click on Index)
  4. Add new Search filter (on sidebar click on Search Filters, then on toolbar click New)
  5. First accordion title should say Search by Author - n instead of Search by PLG_FINDER_QUERY_FILTER_BRANCH_S_AUTHOR - n

Documentation Changes Required

none

@piotr-cz piotr-cz changed the title com_finder: Allow loading plugin language strings from extension folder [com_finder] Allow loading plugin language strings from extension folder Sep 29, 2016
@mbabker
Copy link
Contributor

mbabker commented Sep 29, 2016

Can you use the JPATH_PLUGINS constant?

On Thursday, September 29, 2016, Piotr [email protected] wrote:

Summary of Changes

This adds functionality to load finder plugin language strings from the
extension folder (just like it's happening in other places).
Testing Instructions

  1. Move finder - categories plugin language files
    en-GB.plg_finder_content.ini and en-GB.plg_finder_content.sys.ini from
    administrator/language/en-GB folder to plugins/finder/content/
    language/en-GB
  2. Go to Menu > Components > Smart Search > Search Filters > New
  3. First accordion title should say Search by Author - n instead of Search
    by PLG_FINDER_QUERY_FILTER_BRANCH_S_AUTHOR - n

Documentation Changes Required

none

You can view, comment on, or merge this pull request online at:

#12204
Commit Summary

  • Allow loading plugin language strings from extension folder

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12204, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfoU2fzKxZF_KbYjSb69H1Pl2msOHBks5qu6OPgaJpZM4KJ416
.

@piotr-cz
Copy link
Contributor Author

Thanks, fixed.

@wilsonge wilsonge added this to the Joomla 3.7.0 milestone Sep 29, 2016
@RonakParmar
Copy link

I have followed below two steps, but not able to perform 3rd step.

  1. Move finder - categories plugin language files en-GB.plg_finder_content.ini and en-GB.plg_finder_content.sys.ini from administrator/language/en-GB folder to plugins/finder/content/language/en-GB
  2. Go to Menu > Components > Smart Search > Search Filters > New

Not able to see "Search by Author - n" text in new search filter view.

  1. First accordion title should say Search by Author - n instead of Search by PLG_FINDER_QUERY_FILTER_BRANCH_S_AUTHOR - n
    Please guide me where I can see this text.

I am using Joomla! 3.3.7-dev — © 2016.
screen shot 2016-09-30 at 01 36 15
screen shot 2016-09-30 at 01 36 16


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/12204.

@infograf768
Copy link
Member

This patch is towards 3.7.0-dev, not 3.3.7-dev
You first have to run the index.

@piotr-cz
Copy link
Contributor Author

@RonakParmar
Sorry, you have to run index first. I've updated testing instructions.

@RonakParmar
Copy link

Thank you, I'll do it.

@piotr-cz
Copy link
Contributor Author

piotr-cz commented Sep 30, 2016

@wilsonge Why v3.7 milestone instead of v3.6? It's a bugfix, not new feature

@wilsonge
Copy link
Contributor

What bug is it fixing? As far as I can tell this is bringing consistency to way finder plugins load language files. But as it's never apparently been an intended thing this is the grey area but to me is more feature than bug fix

@mbabker
Copy link
Contributor

mbabker commented Sep 30, 2016

Since 1.6 core has supported loading languages from either the global directory or within the extension (for those that support it; I think files and libraries extensions don't). So anything not supporting that lookup method to me looks like a bug and not a feature.

@zero-24
Copy link
Contributor

zero-24 commented Oct 3, 2016

I have tested this item ✅ successfully on 404f263

👍 Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/12204.

@piotr-cz
Copy link
Contributor Author

piotr-cz commented Oct 9, 2016

@RonakParmar can you test again, please?

@RonakParmar
Copy link

Hi, Can anyone guide me, what should I have to do to make my local copy version 3.7.0-dev?
So, I can test this PR.
Thanks.

@zero-24
Copy link
Contributor

zero-24 commented Oct 10, 2016

You can download the last build from here: https://developer.joomla.org/nightly-builds.html :)

@infograf768
Copy link
Member

I do agree this is a bug and not a new feature as a 3rd party can create a new finder plugin with its own language folder.

@RonakParmar
Copy link

In the first step of testing instruction

  • Move finder - categories plugin language files en-GB.plg_finder_content.ini and en-GB.plg_finder_content.sys.ini from administrator/language/en-GB folder to plugins/finder/content/language/en-GB

You mentioned "finder - categories plugin" and you are showing content plugin language files to move in content plugin. Is it a typing mistake?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12204.

@RonakParmar
Copy link

@zero-24 thank you for the URL.

I have downloaded full package of Joomla 3.7.0-dev and setup in my local to test this issue.
I have followed above steps but not able to reproduce this issue.
My joomla version is Joomla! 3.7.0-dev Development [ Noether ] 27-June-2016 08:13 GMT.
Without applying the PR I can language variable is not missing. attached screen dump of my local, please test it and let me know if I have done anything wrong.

screen shot 2016-10-10 at 01 33 36


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12204.

@infograf768
Copy link
Member

infograf768 commented Oct 10, 2016

@RonakParmar
To test this:
before patch
Take off the 2 lang files
en-GB.plg_finder_content.ini
en-GB.plg_finder_content.sys.ini
from administrator/language/en-GB/
keep them in a safe place

you will get when creating a new filter:
screen shot 2016-10-10 at 08 45 48

Then patch and create in
plugins/finder/content/
a folder /language/en-GB/

add the fini files in this folder

Now test

@RonakParmar
Copy link

I have tested this item ✅ successfully on 404f263

It was my mistake, I have copied and pasted files, instead of cut and paste.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12204.

@infograf768
Copy link
Member

RTC

@wilsonge

Please reconsider milestone.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12204.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Oct 10, 2016
@piotr-cz
Copy link
Contributor Author

thank you

@rdeutz
Copy link
Contributor

rdeutz commented Oct 11, 2016

Sorry was merged by mistake, thought it was based on 3.7, I am going to revert it. @piotr-cz could you please make a new PR based on the 3.7.x branch, thanks

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Oct 11, 2016
@piotr-cz
Copy link
Contributor Author

@rdeutz Are you sure this belongs to 3.7 branch (see this comment)?

@rdeutz
Copy link
Contributor

rdeutz commented Oct 12, 2016

@piotr-cz we are not merging it into 3.6.3 and I have my doubts that we will have a 3.6.4. You can make it against staging if you like.

@piotr-cz
Copy link
Contributor Author

@rdeutz

I'll prepare a PR for 3.7 branch then.
This PR is against staging branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants