? Language Change NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar coolcat-creations
coolcat-creations
1 Sep 2022

Pull Request for Issue #38659 .

Summary of Changes

Changed the + symbol to "then" in System Panel
Added "then" between the keys in the xml text and made it easier to understand the shortcuts

Before:
J + X Keyboard Shortcuts

J then A Save
J then S Save & Close
J then Q Cancel
J then N New
J then F Search
J then O Options
J then H Help
J then M Toggle
J then X Overview
J then D Home

After:
J then X Keyboard Shortcuts

Enables keyboard shortcuts on the administrator site, which can be provided by other plugins and includes directly the following list of shortcuts:

J then A Apply
J then S Save & Close
J then Q Cancel (Quit)
J then N New
J then F Search (Find)
J then O Options
J then H Help
J then M Toggle Menu
J then X Overview / Extras
J then D Home Dashboard

Testing Instructions

Go to System and see that the text on the system Panel changed from:
grafik
to
grafik

Go to System Plugin Shortcuts and see the description changed from:
grafik

to
grafik

Same should be visible in the modal window when you press J then X

avatar coolcat-creations coolcat-creations - open - 1 Sep 2022
avatar coolcat-creations coolcat-creations - change - 1 Sep 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2022
Category Administration Language & Strings
avatar coolcat-creations coolcat-creations - change - 1 Sep 2022
Labels Added: Language Change ?
avatar Fedik
Fedik - comment - 1 Sep 2022

Dashboard and plugin description works, but In modal without then.

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

Dashboard and plugin description works, but In modal without then.

Yes thats what I wrote :-)

avatar coolcat-creations coolcat-creations - change - 1 Sep 2022
The description was changed
avatar coolcat-creations coolcat-creations - edited - 1 Sep 2022
avatar Fedik
Fedik - comment - 1 Sep 2022

Okay, I thought you will change both :)

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

I don't know which file to use to change it, no idea why it's not the same as the plugin description :-(

avatar chmst
chmst - comment - 1 Sep 2022

Maybe you can make the "then" in smaller font on the Dashboard?

You changed "Save" to "Apply". It is true that the a button stands for apply, but we have in all toolbars the button SAVE, not Apply.

avatar coolcat-creations coolcat-creations - change - 1 Sep 2022
The description was changed
avatar coolcat-creations coolcat-creations - edited - 1 Sep 2022
avatar Fedik
Fedik - comment - 1 Sep 2022

no idea why it's not the same as the plugin description

it is dinamicaly generated here

let dl = '<dl>';
dlItems.forEach((titles, shortcut) => {
dl += '<dt><kbd>J</kbd>';
shortcut.split('+').forEach((key) => {
dl += ` <kbd>${key.trim()}</kbd>`;
});
dl += '</dt>';
titles.forEach((title) => {
dl += `<dd>${title}</dd>`;
});
});
dl += '</dl>';

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

Maybe you can make the "then" in smaller font on the Dashboard?

You changed "Save" to "Apply". It is true that the a button stands for apply, but we have in all toolbars the button SAVE, not Apply.

Thank you I changed it. Better now?

avatar Fedik
Fedik - comment - 1 Sep 2022

Yeah, well, not trivial, require new string for Joomla.Text._('then') :)

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

no idea why it's not the same as the plugin description

it is dinamicaly generated here

let dl = '<dl>';
dlItems.forEach((titles, shortcut) => {
dl += '<dt><kbd>J</kbd>';
shortcut.split('+').forEach((key) => {
dl += ` <kbd>${key.trim()}</kbd>`;
});
dl += '</dt>';
titles.forEach((title) => {
dl += `<dd>${title}</dd>`;
});
});
dl += '</dl>';

I Found that file but where has this file the "title" from? Because I want to change them too.

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

Yeah, well, not trivial, require new string for Joomla.Text._('then') :)

why doesn't it take the existing language override?

avatar Fedik
Fedik - comment - 1 Sep 2022

It comes from plugin

public function addShortcuts(Event $event)
{
$shortcuts = $event->getArgument('shortcuts', []);
$shortcuts = array_merge(
$shortcuts,
[
'applyKey' => (object) ['selector' => 'joomla-toolbar-button .button-apply', 'shortcut' => 'A', 'title' => Text::_('JAPPLY')],
'saveKey' => (object) ['selector' => 'joomla-toolbar-button .button-save', 'shortcut' => 'S', 'title' => Text::_('JTOOLBAR_SAVE')],
'cancelKey' => (object) ['selector' => 'joomla-toolbar-button .button-cancel', 'shortcut' => 'Q', 'title' => Text::_('JCANCEL')],
'newKey' => (object) ['selector' => 'joomla-toolbar-button .button-new', 'shortcut' => 'N', 'title' => Text::_('JTOOLBAR_NEW')],
'searchKey' => (object) ['selector' => 'input[placeholder=' . Text::_('JSEARCH_FILTER') . ']', 'shortcut' => 'F', 'title' => Text::_('JSEARCH_FILTER')],
'optionKey' => (object) ['selector' => 'joomla-toolbar-button .button-options', 'shortcut' => 'O', 'title' => Text::_('JOPTIONS')],
'helpKey' => (object) ['selector' => 'joomla-toolbar-button .button-help', 'shortcut' => 'H', 'title' => Text::_('JHELP')],
'toggleMenu' => (object) ['selector' => '#menu-collapse', 'shortcut' => 'M', 'title' => Text::_('JTOGGLE_SIDEBAR_MENU')],
'dashboard' => (object) ['selector' => (string) new Uri(Route::_('index.php?')), 'shortcut' => 'D', 'title' => Text::_('COM_CPANEL_DASHBOARD_BASE_TITLE')],
]
);
$event->setArgument('shortcuts', $shortcuts);
}

why doesn't it take the existing language override?

The modal shows User defined combination, and so the modal content is dinamicaly generated.

avatar Fedik
Fedik - comment - 1 Sep 2022

The modal shows User defined combination,

I mean combination that may come from other extennsion with addShortcuts event,

avatar Fedik
Fedik - comment - 1 Sep 2022

This will do the thing

 dl += ` ${Joomla.Text._('JTHEN')} <kbd>${key.trim()}</kbd>`;

Or full:

let dl = '<dl>';
    dlItems.forEach((titles, shortcut) => {
      dl += '<dt><kbd>J</kbd>';
      shortcut.split('+').forEach(key => {
        dl += ` ${Joomla.Text._('JTHEN')} <kbd>${key.trim()}</kbd>`;
      });
      dl += '</dt>';
      titles.forEach(title => {
        dl += `<dd>${title}</dd>`;
      });
    });
dl += '</dl>';

Maybe constant JTHEN is not very good, then can be something PLG_SYSTEM_SHORTCUT_THEN :)
Not sure here.

avatar Fedik
Fedik - comment - 1 Sep 2022

But probably, it is fine as you already made, it is less confusing on dashboard now.

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

Yes but this would not change the titles as in my xml change

avatar brianteeman
brianteeman - comment - 1 Sep 2022
  1. please dont use <b> it should not be used for styling text https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b
  2. I see what you are doing with highlighting one letter but it only really works in english
  3. and you had to invent extras for options which really doesnt make sense.
avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

What does X stand for ? @brianteeman

avatar brianteeman
brianteeman - comment - 1 Sep 2022

it doesnt stand for anything

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

it doesnt stand for anything

Let's write the meaning of the shortcuts into brackets so people will remember easier and understand ...

avatar brianteeman
brianteeman - comment - 1 Sep 2022

as stated before - it only makes sense in english

also look at any keyboard shortcut system. there doesnt have to be and often isnt any connection between the key and the action

image

avatar dgrammatiko
dgrammatiko - comment - 1 Sep 2022

@Fedik should I mention XSS, or the project will also tolerate this one?

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

@Fedik should I mention XSS, or the project will also tolerate this one?

Do you see a security issue in a language change ? ?

avatar dgrammatiko
dgrammatiko - comment - 1 Sep 2022

@coolcat-creations not on your side, the existing js code has them. It just need adding the sanitizer in the insertAdjusentHTML call. Again, it’s not about the changes in this pr but the code that was released with 4.2.0

Edit I have further complains about that js but this pr is not the place to express them…

avatar coolcat-creations
coolcat-creations - comment - 1 Sep 2022

@dgrammatiko maybe it should be reported rather to the JSST ? :-)

avatar Fedik
Fedik - comment - 1 Sep 2022

@coolcat-creations I think @brianteeman is right, better remove <b> on first letter,
There not always will be a case when first letter will refer to "shortcut", especialy for non Eglish translations.

should I mention XSS

XSS, what is it, kind of new CSS? ?

avatar coolcat-creations coolcat-creations - change - 2 Sep 2022
The description was changed
avatar coolcat-creations coolcat-creations - edited - 2 Sep 2022
avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2022
Category Administration Language & Strings Administration Language & Strings JavaScript Repository NPM Change
avatar coolcat-creations
coolcat-creations - comment - 2 Sep 2022

Ok, I applied the requested changes and added also a language string. I cant test the build (es6 file change) myself because I can't get composer and npm running.

avatar coolcat-creations coolcat-creations - change - 2 Sep 2022
The description was changed
avatar coolcat-creations coolcat-creations - edited - 2 Sep 2022
avatar Fedik
Fedik - comment - 2 Sep 2022

Almost ?

image

avatar Fedik
Fedik - comment - 2 Sep 2022

Add new js string around here:

Text::script('PLG_SYSTEM_SHORTCUT_OVERVIEW_HINT');
Text::script('PLG_SYSTEM_SHORTCUT_OVERVIEW_TITLE');
Text::script('PLG_SYSTEM_SHORTCUT_OVERVIEW_DESC');
Text::script('JCLOSE');

Text::script('PLG_SYSTEM_SHORTCUT_THEN');
avatar coolcat-creations
coolcat-creations - comment - 2 Sep 2022

@Fedik thanks for your help I will add it :-)

avatar Fedik
Fedik - comment - 2 Sep 2022

About XSS, I will do separated PR, later, after this one will be merged.

avatar coolcat-creations coolcat-creations - change - 2 Sep 2022
Labels Added: NPM Resource Changed
avatar coolcat-creations
coolcat-creations - comment - 2 Sep 2022

Added :-)

avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2022
Category Administration Language & Strings JavaScript Repository NPM Change Administration Language & Strings JavaScript Repository NPM Change Front End Plugins
avatar Fedik
Fedik - comment - 2 Sep 2022

Maybe also make it with <small>, here how it looks
Normal
Screenshot 2022-09-02_11-05-31

With <small>:
Screenshot 2022-09-02_11-05-05

Just thought, I am fine with any :)

avatar Fedik
Fedik - comment - 2 Sep 2022

Added :-)

Works now :)

avatar brianteeman
brianteeman - comment - 2 Sep 2022

was it intentional to split each to a new line?

avatar coolcat-creations
coolcat-creations - comment - 2 Sep 2022

No, not at all - but how to prevent it? I only changed the + to "then" ?

was it intentional to split each to a new line?

avatar brianteeman
brianteeman - comment - 2 Sep 2022

the description uses ul lists
the popup uses dl lists

@chmst can correct me but I think they both should be dl (definition lists)

To put dt and dd on the same line its just css

avatar coolcat-creations
coolcat-creations - comment - 4 Sep 2022

As this PR is about language change and not semantic, maybe we could merge it first and then move to semantics and the xss and css stuff? One step at the time would increase the speed of improvements :) that would be great!

avatar coolcat-creations
coolcat-creations - comment - 1 Oct 2022

Is there a future for this PR to be merged if tested or it it obligated to change semantics and css? If semantics and css need to be changed maybe someone else can take over and I close this one.

avatar Fedik
Fedik - comment - 3 Oct 2022

I have tested this item successfully on 0e3bb1f

The aim of this PR was to improve the text, and it is done, so I count it as great success ;)
The styling can be fixed separately, by people who better in it.


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

avatar Fedik Fedik - test_item - 3 Oct 2022 - Tested successfully
avatar viocassel
viocassel - comment - 6 Oct 2022

I have tested this item successfully on 0e3bb1f


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

avatar viocassel viocassel - test_item - 6 Oct 2022 - Tested successfully
avatar alikon alikon - change - 6 Oct 2022
Status Pending Ready to Commit
avatar alikon
alikon - comment - 6 Oct 2022

RTC


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

avatar HLeithner HLeithner - change - 23 Oct 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-10-23 11:05:11
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 23 Oct 2022
avatar HLeithner HLeithner - merge - 23 Oct 2022
avatar HLeithner
HLeithner - comment - 23 Oct 2022

thanks

Add a Comment

Login with GitHub to post a comment