?
avatar horus68
horus68
23 Feb 2017

Steps to reproduce the issue

Language files on translation packs has to be listed to be installed.
Joomla main installer do not need a list of files to be installed, so why language packs?

Translation files are listed in 2 XML files (more then 340 lines)
administrator/language/en-GB/install.xml
language/en-GB/install.xml
with lines like:
en-GB.com_admin.ini

Why is this required? Why not allow the installation of the folder files?
Also when ones uninstall the language pack, all files should be uninstalled, not just the ones in the latest XML file, so there is no reason to have a list of language files.

Expected result

INI and PHP files will be installed as long as they are in the folder listed in the XML

Actual result

All files has to be listed in admin and site xml language file.
If one is missing (but available in the folder) it will fail the install!

Additional comments

This would also make Crowdin auto-packs easier to be made!
@Bakual

avatar horus68 horus68 - open - 23 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 23 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Feb 2017
avatar horus68 horus68 - edited - 23 Feb 2017
avatar horus68 horus68 - change - 23 Feb 2017
The description was changed
avatar horus68 horus68 - edited - 23 Feb 2017
avatar horus68 horus68 - change - 23 Feb 2017
The description was changed
avatar horus68 horus68 - edited - 23 Feb 2017
avatar horus68 horus68 - change - 23 Feb 2017
The description was changed
avatar horus68 horus68 - edited - 23 Feb 2017
avatar infograf768
infograf768 - comment - 23 Feb 2017

We have 2 possibility of dealing with Core language packs:

One would be indeed to use the folder trick and would fit very well people using crowdin for example where the packs will anyway contain all ini files and are created automatically (almost).

The other is to keep the install.xml as is because it is a very easy way for TTs not using crowdin to know by diff what has been added or deleted from core.

Com_localise creates the install.xml automatically and one would not have to bother with that tool.

avatar horus68
horus68 - comment - 23 Feb 2017

Back in the days I was not using Crowdin (or even way back when using Transifex) I always used a Diff tool to know if there was new files added by comparing folders. The XML list brings nothing useful for diff tools.
So:

  • Teams using Crowdin do not need XML list and will work way better without a file list on the XML file
  • Teams using "com_localize" tool do not need xml file (in the core) because it creates a new one for them
  • Any other teams (is there any left?) will not gain nothing having 2 more files to look for diff files as they can diff the folders where the actual changes are done.
  • Core developers do not need to maintain a list of files in the XML file (less work for them too)

So... there is no need for a file list on the language XML file, and those lines should be removed!

avatar Bakual
Bakual - comment - 23 Feb 2017

Just so there is some code to show: staging...Bakual:SimplifyLanguageInstallXml is what is talked about here.
I tested it with the german pack but want to test with some more complex languages if it would work there as well.

avatar Bakual
Bakual - comment - 24 Feb 2017

Created the PR.
Languages that have additional files (eg media files like Persian does) will need an adapted install.xml where the language files are moved into a subfolder so the media files aren't copied into the language folder as well. But other than those, it should work fine.

avatar Bakual
Bakual - comment - 24 Feb 2017

Closing this issue as we have a PR where the discussion can proceed ?

avatar zero-24 zero-24 - change - 24 Feb 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-24 14:52:00
Closed_By zero-24
avatar zero-24 zero-24 - close - 24 Feb 2017

Add a Comment

Login with GitHub to post a comment