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

Some problems with build language task #45

Closed
joomdonation opened this issue Jun 26, 2021 · 4 comments
Closed

Some problems with build language task #45

joomdonation opened this issue Jun 26, 2021 · 4 comments

Comments

@joomdonation
Copy link

  1. This method https://github.com/joomla-projects/jorobo/blob/develop/src/Tasks/Build/Language.php#L145 is not working OK with new language file format (because the language file does not contain language tag. So the file is com_weblinks.ini instead of en-GB.com_weblinks.ini in the past. To build weblinks package, I modified it quickly to:
if (empty(glob($this->adminLangPath . "/*/" . $this->ext . "*.ini")))
		{
			$this->hasAdminLang = false;
		}

		if (empty(glob($this->frontLangPath . "/*/" . $this->ext . "*.ini")))
		{
			$this->hasFrontLang = false;
		}
  1. This line also needs to be reviewed https://github.com/joomla-projects/jorobo/blob/develop/src/Tasks/Build/Language.php#L240. For my quick modification, I modified is to:
if (substr($file, 0, 1) != '.' && strpos($file, $this->ext . ".") !== false)

It might work but it could cause potential issues which I am not aware of.

@HLeithner
Copy link
Member

@joomdonation any you provide a fix?

@joomdonation
Copy link
Author

@HLeithner Do we have someone who is familiar with this script? I don't understand how it works yet, so I'm unsure if I can provide the right fix

Also, I guess we will have to fix it in a backward compatible way, mean it should works with both old format and new format of language filename (works with both en-GB.com_weblinks.ini and com_weblinks.ini) ?

@HLeithner
Copy link
Member

hopefully fixed all issues with #46

@joomdonation
Copy link
Author

Fixed with #46

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

No branches or pull requests

2 participants