? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
24 Jan 2017

Currently, in the com_fields views the language files for the components are only loaded from the global language folder. However the components may also have them in their own language folder.

Summary of Changes

Adjusts the loading of language files to also have a look in the components language folder.

Testing Instructions

  • Install an extension which supports fields already. You may use my SermonSpeaker component (GitHub branch with fields support is https://github.com/Bakual/SermonSpeaker/tree/SermonSpeaker5.6. Just zip the "com_sermonspeaker" folder and install it)
  • Go to the field and field group manager and the respective edit forms in SermonSpeaker and watch the header of the page. You'll see an untranslated string there. After applying the PR the strings will be translated.

Documentation Changes Required

None

avatar Bakual Bakual - open - 24 Jan 2017
avatar Bakual Bakual - change - 24 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jan 2017
Category Administration com_fields
avatar infograf768
infograf768 - comment - 25 Jan 2017

Elsewhere in core we have:

$lang->load($component, JPATH_ADMINISTRATOR, null, false, true)
			|| $lang->load($component, JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component), null, false, true);

Would not it be important to add null, false, true ?

avatar Bakual
Bakual - comment - 25 Jan 2017

Would not it be important to add null, false, true ?

Those are the default values of the method anyway (https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/language/language.php#L707), so they can be omitted. It just doesn't matter.

public function load($extension = 'joomla', $basePath = JPATH_BASE, $lang = null, $reload = false, $default = true)

But the JPath::clean() could be added indeed. I can do that later.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Jan 2017

I have tested this item successfully on ab2bbf2


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 25 Jan 2017 - Tested successfully
avatar laoneo
laoneo - comment - 25 Jan 2017

I have tested this item successfully on ab2bbf2


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

avatar laoneo laoneo - test_item - 25 Jan 2017 - Tested successfully
avatar Bakual Bakual - change - 25 Jan 2017
Labels Added: ?
avatar Bakual
Bakual - comment - 25 Jan 2017

Added JPath::clean() to be consistent with other places. It shouldn't change anything.

avatar infograf768
infograf768 - comment - 26 Jan 2017

I have tested this item successfully on a22227c


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

avatar infograf768 infograf768 - test_item - 26 Jan 2017 - Tested successfully
avatar infograf768 infograf768 - change - 26 Jan 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 26 Jan 2017

RTC as Cleaning the path has no impact on former tests.

@rdeutz can be merged


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

avatar wilsonge wilsonge - change - 26 Jan 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-01-26 12:30:09
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 26 Jan 2017
avatar wilsonge wilsonge - merge - 26 Jan 2017

Add a Comment

Login with GitHub to post a comment