J4 Issue
avatar brianteeman
brianteeman
16 Jul 2019

image

Is this correct? How do you publish a site language? Does it mean "Installed site language"

@Bakual @infograf768

avatar brianteeman brianteeman - open - 16 Jul 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 16 Jul 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 16 Jul 2019
avatar Bakual
Bakual - comment - 16 Jul 2019

You can deactivate a language pack in the extension manager. That's what this refers to. It coulöd be installed but not activated.
So a more correct term would maybe be "Activated Site Languages"?

avatar brianteeman
brianteeman - comment - 16 Jul 2019

Thanks for explaining. As the extension manager enables and disables I will submit a pr to change it to "Enabled....

avatar franz-wohlkoenig franz-wohlkoenig - change - 16 Jul 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-07-16 10:35:57
Closed_By franz-wohlkoenig
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 16 Jul 2019

Closed as having Pull Request #25584

avatar franz-wohlkoenig franz-wohlkoenig - close - 16 Jul 2019
avatar infograf768
infograf768 - comment - 16 Jul 2019

You can deactivate a language pack in the extension manager. That's what this refers to. It could be installed but not activated.

I think we have a bug here. In fact when you disable a language in Extensions Manager, the language does not display at all.
Code is $status->element for both the Language tag and the "Published Site Languages "
That is a bug...

avatar infograf768
infograf768 - comment - 16 Jul 2019

code is

	/**
	 * Method to return combined language status.
	 *
	 * @return  array of language objects.
	 */
	public static function getStatus()
	{
		// Check for combined status.
		$db = Factory::getDbo();
		$query = $db->getQuery(true);

		// Select all fields from the languages table.
		$query->select('a.*', 'l.home')
			->select('a.published AS published')
			->select('a.lang_code AS lang_code')
			->from('#__languages AS a');

		// Select the language home pages.
		$query->select('l.home AS home')
			->select('l.language AS home_language')
			->join('LEFT', '#__menu AS l ON l.language = a.lang_code AND l.home=1 AND l.published=1 AND l.language <> \'*\'')
			->select('e.enabled AS enabled')
			->select('e.element AS element')
			->join('LEFT', '#__extensions  AS e ON e.element = a.lang_code')
			->where('e.client_id = 0')
			->where('e.enabled = 1')
			->where('e.state = 0');

		$db->setQuery($query);

		return $db->loadObjectList();
	}
avatar brianteeman
brianteeman - comment - 16 Jul 2019

When I tested disabling a site language in the extension manager the module displayed the language with the expected icons and messages

avatar infograf768
infograf768 - comment - 16 Jul 2019

If you disable French site for example, you get (with your PR but would also be the same before your PR):
Screen Shot 2019-07-16 at 13 00 50

This is wrong:
We should get fr-FR and then a X

We have a bug here. Looking at it now.

avatar infograf768
infograf768 - comment - 16 Jul 2019

We should get this
Screen Shot 2019-07-16 at 13 09 50

avatar brianteeman
brianteeman - comment - 16 Jul 2019

No problem for me

image

image

avatar infograf768
infograf768 - comment - 16 Jul 2019

GRRR... forget it. I had some cache on... Sorry

avatar brianteeman
brianteeman - comment - 16 Jul 2019

lol

Add a Comment

Login with GitHub to post a comment