? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
30 Aug 2021

Pull Request for Issue #35416 can partly replace #35418.

Summary of Changes

This PR removes some of the JHELP_ language strings and instead directly uses the reference key in the call.
Since the language strings aren't supposed to be adjusted by translators, we can as well just hardcode them and thus reduce complexity and error possibilities.

Those language strings imho come from a time where our documentation server couldn't handle translations and some language packs would provide their own servers.

I haven't replaced all strings yet. Eg Banners, Contacts, Fields, Smart Search should work.

Additional Notes

I saw that components like com_categories or com_config would need a different approach. I'm not even sure they currently work for 3rd party (help buttons show up for my component but I haven't defined one nor have I strings that would fit). So that part needs a refactor anyway. Ideas welcome.
For com_config, there is already a part which takes the key from the config, that could work well for core.
For com_categories, we likely would have to invent something new, currently it puts together a string in the hopes that the extension has it defined.

Testing Instructions

Make sure help screens still work.

Actual result BEFORE applying this Pull Request

Strings are translated. Help screens work.

Expected result AFTER applying this Pull Request

Strings removed
No change in how help screens appear.

Documentation Changes Required

Not sure if that is documented.

avatar Bakual Bakual - open - 30 Aug 2021
avatar HLeithner
HLeithner - comment - 30 Aug 2021

It's the wrong way in my opinion, who knows that the next documentation system is and what it need for each language.

avatar Bakual
Bakual - comment - 30 Aug 2021

In case it's not clear: I will expand this PR with the other strings, but run out of time for now.

avatar infograf768
infograf768 - comment - 31 Aug 2021

@Bakual
This can't work as is as the strings are also used to get the urls in joomla40/administrator/index.php?option=com_admin&view=help

I tested the help for the strings you deleted and I get 404s as the link is of type https://help.joomla.org/proxy?keyref=Help40:JHELP_CONTENT_ARTICLE_MANAGER&lang=en

Screen Shot 2021-08-31 at 07 15 08

avatar Bakual
Bakual - comment - 31 Aug 2021

Hmm, I wasn't aware of that view.
It looks like everything is defined in a JSON file generated by https://github.com/joomla/joomla-cms/blob/4.0-dev/build/helpTOC.php which apparently creates that file.
The whole thing looks a bit hacky to me and likely also break if we just move the strings to a different file. So that needs to be taken care of anyway.

avatar Quy Quy - change - 31 Aug 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 31 Aug 2021
Category Administration com_admin com_associations com_banners com_contact com_content com_fields com_finder com_installer com_joomlaupdate com_messages com_newsfeeds
avatar Bakual Bakual - change - 31 Aug 2021
Title
[4.0] Replace JHELP_ String with hardcoded ref-key
[4.0] [WIP] Replace JHELP_ String with hardcoded ref-key
avatar Bakual Bakual - edited - 31 Aug 2021
avatar Bakual
Bakual - comment - 31 Aug 2021

I've adjusted the helpTOC.php file so it doesn't reverse lookup the JHELP_ strings, looking for the doc page titles to get the KEY for the COM_ADMIN_HELP_ strings which are used for the translated link texts.

That required to change the COM_ADMIN_HELP_ keys so they match the doc pages.
The GitHub diff view looks worse than it is for com_admin.ini, the translated values didn't change, only the keys. So in Crowdin Translation Memory should kick in and help the TTs.

This PR still needs some work, so I've added [WIP] to the title. But I wanted to let you see which direction I would go.

avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2021
Category Administration com_admin com_associations com_banners com_contact com_content com_fields com_finder com_installer com_joomlaupdate com_messages com_newsfeeds Administration com_admin com_associations com_banners com_contact com_content com_fields com_finder com_installer
avatar joomla-cms-bot joomla-cms-bot - change - 3 Sep 2021
Category Administration com_admin com_associations com_banners com_contact com_content com_fields com_finder com_installer Administration com_admin com_associations com_banners com_cache com_checkin com_config com_contact com_content com_fields com_finder com_installer
avatar Bakual Bakual - change - 3 Sep 2021
Title
[4.0] [WIP] Replace JHELP_ String with hardcoded ref-key
[4.0] Replace JHELP_ String with hardcoded ref-key
avatar Bakual Bakual - edited - 3 Sep 2021
avatar Bakual
Bakual - comment - 3 Sep 2021

It's now ready for tests. All JHELP_ strings are removed and instead replaced with direct ref_key within code.
The only ones left are the ones for com_categories and com_config. I can see ways to get rid of those as well, but I want to do that in a separate PR if this one gets accepted.

avatar Bakual
Bakual - comment - 4 Sep 2021

For com_config see #35479

avatar conconnl conconnl - test_item - 7 Sep 2021 - Tested successfully
avatar conconnl
conconnl - comment - 7 Sep 2021

I have tested this item successfully on 0e44a36

I have clicked on as much links I could within the help screen as well within various other parts of the system by using the help button.
Before I did this I checked if various files on the server included the changes.
All seem to work.


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

avatar MartijnMaandag MartijnMaandag - test_item - 8 Sep 2021 - Tested unsuccessfully
avatar MartijnMaandag
MartijnMaandag - comment - 8 Sep 2021

I have tested this item ? unsuccessfully on 0e44a36

I did test and clicked several items. They work.

But: I started to go to "Help", "Joomla Help" Only the first three items ( Start here, License and Glossery) do work.
Als the others are wrong URLs examples:
https://help.joomla.org/proxy?keyref=Help40:COMPONENTS_BANNERS_CLIENTS_EDIT&lang=nl
https://help.joomla.org/proxy?keyref=Help40:Banners:_New_or_Edit_Client&lang=nl
https://help.joomla.org/proxy?keyref=Help40:COMPONENTS_BANNERS_CLIENTS&lang=nl
https://help.joomla.org/proxy?keyref=Help40:Banners:_Clients&lang=nl
Capital letters are the wrong new ones, the others are what they should be.


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

avatar Bakual
Bakual - comment - 8 Sep 2021

@MartijnMaandag Hmm, that is strange. Did you test in the english language or with nl-NL? I'll try to reproduce it then and see why this happens.

avatar brianteeman
brianteeman - comment - 8 Sep 2021

Please remove the unrelated files
templates/cassiopeia/js/template.min.js.gz
images/te-voi-inalta.mp3
images/fernando-1.mp3
images/03-sweet-fellowship.mp3

avatar Bakual
Bakual - comment - 8 Sep 2021

@brianteeman Oops, they sneaked in. Thanks for the sharp eyes!

avatar brianteeman
brianteeman - comment - 8 Sep 2021

looks like you missed one

<help key="JHELP_MENUS_MENU_ITEM_MENU_ITEM_CONTAINER"/>

avatar MartijnMaandag
MartijnMaandag - comment - 9 Sep 2021

@Bakual Yes I did also test the Admin in English. (as far as I remember if the language-helspscreen is not available, the English language helpscreen appears)
When i apply the patch the difference between the link to the helpscreen in the article edit and the list is (first is real screen, second is the list in Help - JoomlaHelp):
https://help.joomla.org/proxy?keyref=Help40:Articles:_Edit&lang=en
https://help.joomla.org/proxy?keyref=Help40:CONTENT_ARTICLE_MANAGER_EDIT&lang=en
When I revert the patch I do get:
https://help.joomla.org/proxy?keyref=Help40:Articles:_Edit&lang=en
https://help.joomla.org/proxy?keyref=Help40:Articles:_Edit&lang=en
I am testing on localhost Joomla 4.0.2 and Patchtester 4.1.0

avatar brianteeman
brianteeman - comment - 9 Sep 2021

I cannot replicate this. Maybe there is something missing in the instructions how to replicate?

avatar MartijnMaandag
MartijnMaandag - comment - 9 Sep 2021

JoomlaHelp

avatar MartijnMaandag
MartijnMaandag - comment - 9 Sep 2021

I did even make a clean install of Joomla 4.0.2 and Patchtester.
No other extensions installed (even no languages).

avatar brianteeman
brianteeman - comment - 9 Sep 2021

image

avatar infograf768
infograf768 - comment - 9 Sep 2021

looks like you missed one
joomla-cms/administrator/components/com_menus/forms/itemadmin_container.xml
Line 79 in 616d643

The ini string for this one does not exist.

avatar infograf768 infograf768 - test_item - 9 Sep 2021 - Tested successfully
avatar infograf768
infograf768 - comment - 9 Sep 2021

I have tested this item successfully on 80e6dec
For the JHelp strings concerned, see below which are still in


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35429.
avatar infograf768
infograf768 - comment - 9 Sep 2021

@Bakual
Looks some are still present in joomla.ini. If deleted, it works fine in admin Joomla Help, it does not in the pages concerned.

JHELP_COMPONENTS_BANNERS_CATEGORIES="Banners:_Categories"
JHELP_COMPONENTS_BANNERS_CATEGORY_ADD="Banners:_New_or_Edit_Category"
JHELP_COMPONENTS_BANNERS_CATEGORY_EDIT="Banners:_New_or_Edit_Category"
JHELP_COMPONENTS_COM_ACTIONLOGS_OPTIONS="User_Actions_Log:_Options"
JHELP_COMPONENTS_COM_ASSOCIATIONS_OPTIONS="Multilingual_Associations:_Options"
JHELP_COMPONENTS_COM_BANNERS_OPTIONS="Banners:_Options"
JHELP_COMPONENTS_COM_CACHE_OPTIONS="Cache:_Options"
JHELP_COMPONENTS_COM_CHECKIN_OPTIONS="Check-in:_Options"
JHELP_COMPONENTS_COM_CONTACT_OPTIONS="Contacts:_Options"
JHELP_COMPONENTS_COM_CONTENT_OPTIONS="Articles:_Options"
JHELP_COMPONENTS_COM_FINDER_OPTIONS="Smart_Search:_Options"
JHELP_COMPONENTS_COM_INSTALLER_OPTIONS="Installer:_Options"
JHELP_COMPONENTS_COM_JOOMLAUPDATE_OPTIONS="Joomla_Update:_Options"
JHELP_COMPONENTS_COM_LANGUAGES_OPTIONS="Languages:_Options"
JHELP_COMPONENTS_COM_MAILS_OPTIONS="Mail_Templates:_Options"
JHELP_COMPONENTS_COM_MEDIA_OPTIONS="Media:_Options"
JHELP_COMPONENTS_COM_MENUS_OPTIONS="Menus:_Options"
JHELP_COMPONENTS_COM_MESSAGES_OPTIONS="Messages:_Options"
JHELP_COMPONENTS_COM_MODULES_OPTIONS="Module:_Options"
JHELP_COMPONENTS_COM_NEWSFEEDS_OPTIONS="News_Feed:_Options"
JHELP_COMPONENTS_COM_PLUGINS_OPTIONS="Plugin:_Options"
JHELP_COMPONENTS_COM_POSTINSTALL_OPTIONS="Post-installation_Messages:_Options"
JHELP_COMPONENTS_COM_PRIVACY_OPTIONS="Privacy:_Options"
JHELP_COMPONENTS_COM_REDIRECT_OPTIONS="Redirect:_Options"
JHELP_COMPONENTS_COM_TAGS_OPTIONS="Tags:_Options"
JHELP_COMPONENTS_COM_TEMPLATES_OPTIONS="Template:_Options"
JHELP_COMPONENTS_COM_USERS_OPTIONS="Users:_Options"
JHELP_COMPONENTS_CONTACT_CATEGORIES="Contacts:_Categories"
JHELP_COMPONENTS_CONTACT_CATEGORY_ADD="Contacts:_New_or_Edit_Category"
JHELP_COMPONENTS_CONTACT_CATEGORY_EDIT="Contacts:_New_or_Edit_Category"
JHELP_COMPONENTS_CONTENT_CATEGORIES="Articles:_Categories"
JHELP_COMPONENTS_CONTENT_CATEGORY_ADD="Articles:_New_or_Edit_Category"
JHELP_COMPONENTS_CONTENT_CATEGORY_EDIT="Articles:_New_or_Edit_Category"
JHELP_COMPONENTS_NEWSFEEDS_CATEGORIES="News_Feeds:_Categories"
JHELP_COMPONENTS_NEWSFEEDS_CATEGORY_ADD="News_Feeds:_New_or_Edit_Category"
JHELP_COMPONENTS_NEWSFEEDS_CATEGORY_EDIT="News_Feeds:_New_or_Edit_Category"
JHELP_COMPONENTS_USERS_CATEGORIES="User_Notes:_Categories"
JHELP_COMPONENTS_USERS_CATEGORY_ADD="User_Notes:_New_or_Edit_Category"
JHELP_COMPONENTS_USERS_CATEGORY_EDIT="User_Notes:_New_or_Edit_Category"
avatar MartijnMaandag
MartijnMaandag - comment - 9 Sep 2021

@infograf768 This solves the problem with the link.
But.. The index is not translated anymore when you use a translation like Dutch in the image).
JoomlaHelp1

avatar brianteeman
brianteeman - comment - 9 Sep 2021

@infograf768 please read the original post by @Bakual before commenting.

avatar infograf768
infograf768 - comment - 9 Sep 2021

@MartijnMaandag
The PR modifies the COM_ADMIN_HELP_XXX. strings constants, therefore your translations will not work and en-GB replaces them.

avatar Bakual
Bakual - comment - 9 Sep 2021

@infograf768 The _OPTIONS strings are taken care of by #35479
For the _CATEGORIES, _CATEGORY_ADD and _CATEGORY_EDIT, I have no solution yet. This ones need more thinking.

avatar Bakual
Bakual - comment - 9 Sep 2021

@MartijnMaandag Looks like the Patchtester doesn't replace the file administrator/help/en-GB/toc.json.
That would explain your issue.
Also the translations will have to be done new by the translators since the language string keys changed. Translation Memory likely will help.

avatar brianteeman
brianteeman - comment - 9 Sep 2021

@Bakual it might be even simpler than that. If I remember correctly patchtester has a limit in the number of files it will transfer

avatar Bakual
Bakual - comment - 9 Sep 2021

Ah, yes. That could be the reason as well. 178 changed files may be a bit to much.

avatar Bakual
Bakual - comment - 9 Sep 2021

looks like you missed one

<help key="JHELP_MENUS_MENU_ITEM_MENU_ITEM_CONTAINER"/>

@brianteeman While figuring out how to fix this one, I found another bug. The help screens actually don't work for any system links menuitems ? . See #35523
However I don't know which help URL (which ref_key) that specific menuitemtype should load. The string is missing in J3 as well.
Maybe someone knows the correct URL, then we can fix it in J3 and J4.

avatar brianteeman
brianteeman - comment - 9 Sep 2021

Maybe someone knows the correct URL, then we can fix it in J3 and J4.

I assume you resolved that question with the other PR?

avatar Bakual
Bakual - comment - 9 Sep 2021

I don't know the URL yet, but the other PR fixes the help screens for all other "System Links" menuitems. But I'm asking my way around to get the correct URL. Asked Mike Brandner now. If someone else has some knowledge, feel free to share ?

avatar brianteeman
brianteeman - comment - 9 Sep 2021

I am not sure what you mean. Does this help https://docs.joomla.org/Category:Menus_Help_Screens/en

avatar Bakual
Bakual - comment - 9 Sep 2021

Hmm, the "control page" seems to be good one.
But it looks like helppage is missing completely then for the admin menuitem "System Links" -> "Components Menu Container".

avatar RickR2H RickR2H - test_item - 10 Sep 2021 - Tested successfully
avatar RickR2H
RickR2H - comment - 10 Sep 2021

I have tested this item successfully on 80e6dec


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

avatar richard67
richard67 - comment - 11 Sep 2021

@Bakual As this PR here has 2 good tests I'd like to set it RTC. Do I assume right that the discussion in the latest comments was about another PR and this one here is good as it is? Or do you want to change something here so I should wait with RTC?

avatar Bakual
Bakual - comment - 11 Sep 2021

@richard67 Aye, the missed string is a different issue that I can't solve here yet.

Btw: #35534 is the last missing piece, containing the JHELP Strings for com_categories.

avatar richard67 richard67 - change - 11 Sep 2021
Status New Ready to Commit
avatar richard67
richard67 - comment - 11 Sep 2021

RTC


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

avatar wilsonge
wilsonge - comment - 21 Sep 2021

Conflicts here too. Let's do categories first and then resolve this one once that one is merged.

avatar Bakual Bakual - change - 21 Sep 2021
Labels Added: ?
avatar Bakual
Bakual - comment - 21 Sep 2021

Conflicts solved here too. No worries, it's simple to fix if it breaks again again with the next merge ?

avatar wilsonge
wilsonge - comment - 23 Sep 2021

Categories merged. Conflicts again here

avatar Bakual
Bakual - comment - 23 Sep 2021

@wilsonge Conflicts solved again.

avatar wilsonge wilsonge - change - 23 Sep 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-09-23 21:41:55
Closed_By wilsonge
avatar wilsonge wilsonge - close - 23 Sep 2021
avatar wilsonge wilsonge - merge - 23 Sep 2021
avatar wilsonge
wilsonge - comment - 23 Sep 2021

Thanks!

avatar Kostelano
Kostelano - comment - 24 Sep 2021

Please add the label LANGUAGE

avatar richard67
richard67 - comment - 24 Sep 2021

Strange that it has not been added by our bot since the PR removes language strings.

Add a Comment

Login with GitHub to post a comment