Feature PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar heelc29
heelc29
25 Mar 2024

Pull Request for Issue #41944 .

Summary of Changes

Adds ability to place language files under api/language during installation of a component

<?xml version="1.0" encoding="UTF-8"?>
<extension type="component" method="upgrade">
	[...]
	<api>
		<files folder="api">
			<folder>src</folder>
		</files>
		<languages folder="api">
			<language tag="en-GB">language/en-GB/com_example.ini</language>
		</languages>
	</api>
</extension>

Use example component:
com_mycomponent.zip

Testing Instructions

Add languages node under API in any component then test install/uninstall

Actual result BEFORE applying this Pull Request

language file api\language\en-GB\com_mycomponent.ini is not copied

Expected result AFTER applying this Pull Request

language file api\language\en-GB\com_mycomponent.ini is copied and deleted during uninstall

Link to documentations

Please select:

  • Documentation link for docs.joomla.org: There is nothing special here https://docs.joomla.org/Manifest_files

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar heelc29 heelc29 - open - 25 Mar 2024
avatar heelc29 heelc29 - change - 25 Mar 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2024
Category Libraries
avatar exlemor
exlemor - comment - 21 Apr 2024

Hi @heelc29, can you provide a test plugin/module/component that includes whatever you want us to test (I guess the language .ini file in place and code) so that we can test? (ready for testing so that we don't make mistakes in testing for you) It would make it a lot easier. Thanks.

avatar HLeithner
HLeithner - comment - 24 Apr 2024

@MacJoom I wouldn't merge this in to 4.4, but your choice

avatar superd0ll superd0ll - test_item - 24 Aug 2024 - Tested unsuccessfully
avatar superd0ll
superd0ll - comment - 24 Aug 2024

I have tested this item ? unsuccessfully on 4474c5f

Language file is copied before and after - Joomla 5.1.3 - localhost


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

avatar brianteeman
brianteeman - comment - 24 Aug 2024

@superd0ll how did you test this?

avatar HLeithner
HLeithner - comment - 15 Nov 2024

This pull request has been automatically rebased to 5.3-dev.

avatar superd0ll
superd0ll - comment - 15 Nov 2024

It was such a long time ago, I am sorry but I don't remember.. I need to check this out thoroughly. I will have time to do so after the 21st of November..

avatar heelc29 heelc29 - change - 19 Jan 2025
Labels Added: Feature PR-5.3-dev
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jan 2025
Category Libraries Unit Tests Administration com_admin SQL Postgresql com_banners com_contact com_content com_installer com_joomlaupdate JavaScript com_media NPM Change com_newsfeeds com_plugins
avatar heelc29 heelc29 - change - 19 Jan 2025
The description was changed
avatar heelc29 heelc29 - edited - 19 Jan 2025
avatar heelc29 heelc29 - change - 19 Jan 2025
Labels Added: Unit/System Tests NPM Resource Changed
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jan 2025
Category Unit Tests Administration com_admin SQL Postgresql com_banners com_contact com_content com_installer com_joomlaupdate JavaScript com_media NPM Change com_newsfeeds com_plugins Libraries
avatar heelc29
heelc29 - comment - 19 Jan 2025

Hi @heelc29, can you provide a test plugin/module/component that includes whatever you want us to test

@exlemor Added example component in PR description.

avatar heelc29 heelc29 - change - 19 Jan 2025
Title
[4.4] copy api language files
[5.3] copy api language files
avatar heelc29 heelc29 - edited - 19 Jan 2025
avatar heelc29 heelc29 - change - 22 Jan 2025
Labels Removed: Unit/System Tests NPM Resource Changed
avatar HLeithner
HLeithner - comment - 4 Mar 2025

This pull request has been automatically rebased to 6.0-dev.

avatar HLeithner HLeithner - change - 4 Mar 2025
Title
[5.3] copy api language files
[6.0] copy api language files
avatar HLeithner HLeithner - edited - 4 Mar 2025
avatar heelc29 heelc29 - change - 7 Mar 2025
Labels Added: PR-6.0-dev
Removed: PR-5.3-dev
avatar exlemor exlemor - test_item - 8 Mar 2025 - Tested unsuccessfully
avatar exlemor
exlemor - comment - 8 Mar 2025

I have tested this item 🔴 unsuccessfully on 2cebb19

I have tested this unsuccessfully...

This is what I did:
With the PR NOT applied, I installed the test com_testi-1.0.1.zip component and it installed successfully. [the file com_mycomponent.ini was NOT in api\language\en-GB]
With the PR installed, I installed the same com_testi-1.0.1.zip and got this error:

Warning
JInstaller: :Install: Can't find Joomla XML setup file.
JInstaller: :Install: Can't find XML setup file.

An error has occurred.
0 Joomla\CMS\Installer\Installer::parseLanguages(): Argument #1 ($element) must be of type SimpleXMLElement, null given, called in /home/lights/public_html/_j600/libraries/src/Installer/Adapter/ComponentAdapter.php on line 611


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43152.
avatar brianteeman brianteeman - test_item - 22 May 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 22 May 2025

I have tested this item ✅ successfully on 0fb2a4a

Before PR api language files were not copied to the api/languages folder
After PR they were copied

Also confirmed that with this PR the language file is removed from the api/languages folder


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

Add a Comment

Login with GitHub to post a comment