Skip to content

[6.0] copy api language files #43152

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

Open
wants to merge 5 commits into
base: 6.0-dev
Choose a base branch
from
Open

Conversation

heelc29
Copy link
Contributor

@heelc29 heelc29 commented Mar 25, 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:

@exlemor
Copy link

exlemor commented Apr 21, 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.

@HLeithner
Copy link
Member

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

@superd0ll
Copy link

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.

@brianteeman
Copy link
Contributor

@superd0ll how did you test this?

@HLeithner HLeithner changed the base branch from 4.4-dev to 5.3-dev November 15, 2024 13:53
@HLeithner
Copy link
Member

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

@superd0ll
Copy link

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..

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester Unit/System Tests labels Jan 19, 2025
@joomla-cms-bot joomla-cms-bot removed Unit/System Tests NPM Resource Changed This Pull Request can't be tested by Patchtester labels Jan 19, 2025
@heelc29
Copy link
Contributor Author

heelc29 commented Jan 19, 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.

@heelc29 heelc29 changed the title [4.4] copy api language files [5.3] copy api language files Jan 19, 2025
@HLeithner HLeithner changed the base branch from 5.3-dev to 6.0-dev March 4, 2025 17:21
@HLeithner
Copy link
Member

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

@HLeithner HLeithner changed the title [5.3] copy api language files [6.0] copy api language files Mar 4, 2025
@rdeutz rdeutz removed the PR-5.3-dev label Mar 5, 2025
@exlemor
Copy link

exlemor commented Mar 8, 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.

@MacJoom MacJoom moved this to To be closed if no further action in Issue Cleanup May 10, 2025
@MacJoom MacJoom removed this from Issue Cleanup May 10, 2025
@MacJoom MacJoom moved this to Abandoned in PR Cleanup May 10, 2025
@brianteeman
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Abandoned
Development

Successfully merging this pull request may close these issues.

8 participants