Skip to content

Load global admin language file in Editors-XTD modals#25472

Closed
SharkyKZ wants to merge 2 commits intojoomla:stagingfrom
SharkyKZ:j3/editorsXtdLang
Closed

Load global admin language file in Editors-XTD modals#25472
SharkyKZ wants to merge 2 commits intojoomla:stagingfrom
SharkyKZ:j3/editorsXtdLang

Conversation

@SharkyKZ
Copy link
Copy Markdown
Contributor

@SharkyKZ SharkyKZ commented Jul 8, 2019

Pull Request for Issue #25344 .

Summary of Changes

Loads global administrator language file when viewing backend view in frontend (i.e. in Editors-XTD modals).

Testing Instructions

Enable Debug Language in Global Configuration.
Edit an article in frontend.
In editor, use Contact, Field and Article buttons.

Expected result

No untranslated strings.

Actual result

Untranslated strings:

# JROOT\libraries\src\Language\Text.php

JAUTHOR_ASC="ASC"
JAUTHOR_DESC="DESC"
JCATEGORY_ASC="ASC"
JCATEGORY_DESC="DESC"
JDATE_ASC="ASC"
JDATE_DESC="DESC"
JFEATURED_ASC="ASC"
JFEATURED_DESC="DESC"
JGLOBAL_HITS_ASC="HITS ASC"
JGLOBAL_HITS_DESC="HITS DESC"
JGLOBAL_LIST_ALIAS="LIST ALIAS"
JGLOBAL_LIST_ALIAS_NOTE="LIST ALIAS NOTE"
JGLOBAL_SORT_BY="SORT BY"
JGLOBAL_TITLE_ASC="TITLE ASC"
JGLOBAL_TITLE_DESC="TITLE DESC"
JGRID_HEADING_ACCESS_ASC="HEADING ACCESS ASC"
JGRID_HEADING_ACCESS_DESC="HEADING ACCESS DESC"
JGRID_HEADING_ID_ASC="HEADING ID ASC"
JGRID_HEADING_ID_DESC="HEADING ID DESC"
JGRID_HEADING_LANGUAGE_ASC="HEADING LANGUAGE ASC"
JGRID_HEADING_LANGUAGE_DESC="HEADING LANGUAGE DESC"
JGRID_HEADING_ORDERING_ASC="HEADING ORDERING ASC"
JGRID_HEADING_ORDERING_DESC="HEADING ORDERING DESC"
JSTATUS_ASC="ASC"
JSTATUS_DESC="DESC"

Documentation Changes Required

No.

@infograf768
Copy link
Copy Markdown
Member

infograf768 commented Jul 8, 2019

IMHO, this is not the solution.
We may have different values in site xx-XX.ini and admin xx-XX.ini for the same constant.

The only correct solution is to add all missing lang strings in frontend (I know it is a pain).

@infograf768
Copy link
Copy Markdown
Member

Hmm
I tested. It looks that there is no impact doing it this way for these modals.

**Loaded** : JROOT/language/en-GB/en-GB.ini
**Loaded** : JROOT/administrator/language/en-GB/en-GB.ini

Only possible issue would be for TTs providing only frontend translation.
Any way to change the loading order?

@infograf768
Copy link
Copy Markdown
Member

I have tested this item ✅ successfully on ff7c1f6


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

@SharkyKZ
Copy link
Copy Markdown
Contributor Author

SharkyKZ commented Jul 8, 2019

Any way to change the loading order?

I don't think so. Global language file is first loaded very early.

@infograf768
Copy link
Copy Markdown
Member

Re-started drone

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jul 8, 2019

I have tested this item ✅ successfully on ff7c1f6


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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jul 8, 2019

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 8, 2019
@brianteeman
Copy link
Copy Markdown
Contributor

IMHO, this is not the solution.
We may have different values in site xx-XX.ini and admin xx-XX.ini for the same constant.

The only correct solution is to add all missing lang strings in frontend (I know it is a pain).

agree

@infograf768
Copy link
Copy Markdown
Member

@SharkyKZ
will make proper PR to include the strings in frontend. That would be for 3.9.10 as it is too late for 3.9.9
At the same time I will check why was added loading the backend main ini in #12321 . May need some help if the proper PR does not take care of it..

@infograf768
Copy link
Copy Markdown
Member

infograf768 commented Jul 8, 2019

We do not need to load admin main ini when the strings are added in frontend.
My patch will therefore delete these calls.

@infograf768
Copy link
Copy Markdown
Member

Maintainers have decided to rather add the strings.
See and test #25475

Thanks. Closing this one.

@infograf768 infograf768 closed this Jul 8, 2019
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants