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

Untranslated language strings in Editors-XTD modals #25344

Closed
SharkyKZ opened this issue Jun 27, 2019 · 16 comments
Closed

Untranslated language strings in Editors-XTD modals #25344

SharkyKZ opened this issue Jun 27, 2019 · 16 comments

Comments

@SharkyKZ
Copy link
Contributor

Steps to reproduce the issue

Edit an article in frontend.
Click on Article button in editor.

Expected result

No untranslated strings.

Actual result

Untranslated JGLOBAL_LIST_ALIAS and JGLOBAL_LIST_ALIAS_NOTE strings. Debug also reports these:

# 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"

Additional comments

Looking for comments whether we should just add missing strings or should we be loading administrator/language/en-GB/en-GB.ini language file when using admin views in frontend.

@ghost
Copy link

ghost commented Jun 27, 2019

J3?

@SharkyKZ
Copy link
Contributor Author

All versions.

@ghost ghost added the J3 Issue label Jun 27, 2019
@richard67
Copy link
Member

Looking for comments whether we should just add missing strings or should we be loading administrator/language/en-GB/en-GB.ini language file when using admin views in frontend.

Good question. Maybe @mbabker or @wilsonge can answer that?

@brianteeman
Copy link
Contributor

  1. Don't know how you can say "all versions" as the modal is broken in j4 ;)
  2. Do not load the admin lang file. Just put those strings in the site language file
  3. The reason no one has noticed this before is that if you look you will see that the sort options are not visible in the modal. (They have a class to hide them on phone and tablet)

So either copy the strings or instead of hiding the sublayout list dont load it or fix it so you can see it

@infograf768
Copy link
Member

None of the xtd display the Sort Filters, whether in front or backend.

Debug lang displays Untranslated strings for

Contact: Display of the Alias is fine
Field: no display issue

Article: JGLOBAL_LIST_ALIAS is not only not translated but also does not display the alias.
Screen Shot 2019-07-05 at 07 44 32
=> We should solve at least that one by adding

JGLOBAL_LIST_ALIAS="(<span>Alias</span>: %s)"
JGLOBAL_LIST_ALIAS_NOTE="(<span>Alias</span>: %s, <span>Note</span>: %s)"

in frontend.
making patch now

Menu has no untranslated strings.

@ghost
Copy link

ghost commented Jul 5, 2019

Closed as having Pull Request #25436

@ghost ghost closed this as completed Jul 5, 2019
@brianteeman
Copy link
Contributor

brianteeman commented Jul 5, 2019

The PR is wrong

It is the hidden-phone hidden-tablet in the layout - so if you override the layout or use a template that doesnt have those classes it will display with the missing strings of course

This is why I wrote #25344 (comment)

image

@ghost ghost reopened this Jul 5, 2019
@infograf768
Copy link
Member

infograf768 commented Jul 5, 2019

If we consider all strings missing for the concerned xtd, according to lang debug, this is the list

JASSOCIATIONS_ASC="ASC"
JASSOCIATIONS_DESC="DESC"
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_FIELD_GROUPS="FIELD GROUPS"
JGLOBAL_HITS_ASC="HITS ASC"
JGLOBAL_HITS_DESC="HITS DESC"
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"
JTOGGLE_HIDE_SIDEBAR="HIDE SIDEBAR"
JTOGGLE_SHOW_SIDEBAR="SHOW SIDEBAR"

Plus

JGLOBAL_LIST_ALIAS="(<span>Alias</span>: %s)"
JGLOBAL_LIST_ALIAS_NOTE="(<span>Alias</span>: %s, <span>Note</span>: %s)"

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 8, 2019

Closed as having PR #25472.

@SharkyKZ SharkyKZ closed this as completed Jul 8, 2019
@infograf768
Copy link
Member

I do not agree with that PR.

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 8, 2019

Why not? com_menus and com_modules do load global admin files in frontend.

@infograf768
Copy link
Member

infograf768 commented Jul 8, 2019

Indeed, these have no language files in frontend.

@infograf768
Copy link
Member

Allthough I wonder why we have also $lang->load('joomla', JPATH_ADMINISTRATOR); for both of them...

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 8, 2019

What do you mean "why"? It's to load the required global strings. XTD modals use backend views. That's why we load backend language files.

@infograf768
Copy link
Member

It's to load the required global strings.

As I wrote in your PR, this could mean overriding some frontend strings with the same constant but different values.

@infograf768
Copy link
Member

Hmm
See #25472 (comment)
Looks like it has no major impact in this case as it is only loaded for modals.

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

No branches or pull requests

5 participants