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

[4] - Move JHELP strings too separate files #35418

Closed
wants to merge 3 commits into from
Closed

[4] - Move JHELP strings too separate files #35418

wants to merge 3 commits into from

Conversation

conconnl
Copy link
Member

@conconnl conconnl commented Aug 29, 2021

Pull Request for Issue #35416

Summary of Changes

The JHELP language strings within Administrator and API are moved to their own files.
These strings should not be translated, while the rest of the string in the file are needed to be translated.
Having them in their own files, makes it possible to ignore the strings completely in the translation flows and decrease the risk of breaking the Help Server within the Administrator.
Now the help screens are broken in the various languages, because the strings are translated, as they are made available for that purpose, while not needed.

Testing Instructions

Check if the strings are still loaded in the Joomla Administrator help pages.

Actual result BEFORE applying this Pull Request

The language strings are used within the help pages to buildup the URLs.

Expected result AFTER applying this Pull Request

The language strings are still used within the help pages to buildup the URLs.

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Aug 29, 2021
@Bakual
Copy link
Contributor

Bakual commented Aug 29, 2021

I think we should rather look into removing the need for them in the first place, before we move them around and do nasty workarounds.

@conconnl
Copy link
Member Author

conconnl commented Aug 29, 2021

I'm not a developer, so I'm not going to play around in that area.
Now we have broken help pages in every other language then en-GB.
This is not a work around if you ask me, this is putting the strings in their own location and not mixed within "Required to be translated strings", which results in working translation packages and not broken help-pages.

Edit: The strings are used in the code.
Example:
line 35 : administrator\components\com_admin\tmpl\help\default.php
<?php echo HTMLHelper::_('link', Help::createUrl('JHELP_GLOSSARY'), Text::_('COM_ADMIN_GLOSSARY'), ['target' => 'helpFrame']); ?>

@brianteeman
Copy link
Contributor

the api file is not needed. the strings were only there to keep the two joomla.ini in sync. now that they are in their own file you can just delete the new api/joomlahelp.ini

Wilco Alsemgeest added 2 commits August 29, 2021 22:46
As requested by Hleithner
@infograf768
Copy link
Member

If the only way is to add a specific ini file, it should be loaded whatever the language and totally independent from the language packs.

I would place that help file in libraries/src/Language/joomlahelp.ini and not in the en-GB folders
And always load it directly in language.php

@Bakual
Copy link
Contributor

Bakual commented Aug 30, 2021

I've started a PR to show how the strings could replaced by hardcoded keys. At least for most of the strings that would work easily.

Opinions welcome. I could at least reduce the strings. Maybe even eliminate all.

@conconnl
Copy link
Member Author

We have 3 PRs thanks to @Bakual which fix it in a more Core way.
Therefore closing this one.

@conconnl conconnl closed this Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants