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

shortcut Strg + Enter doesn't work in 64-bit version #2178

Closed
1 of 11 tasks
horst-p-w-neubauer opened this issue Apr 6, 2020 · 26 comments
Closed
1 of 11 tasks

shortcut Strg + Enter doesn't work in 64-bit version #2178

horst-p-w-neubauer opened this issue Apr 6, 2020 · 26 comments
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@horst-p-w-neubauer
Copy link
Member

Details for the issue

I've downloaded and installed first 64-bit then 32-bit Version today.
Version 3.11.2

Typing Strg+Enter in SQL-Editor starts execution in 32-bit Version but is ignored in 64-bit Version whereas Strg+R works fine in both. Why is that?

running on Win 7, but I've encountered this on other win-systems as well.

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • [ x] DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • [ x] Windows: ( version: 7 )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • [x ] 3.11.2
  • 3.11.1
  • 3.10.1
  • Other: ___

I have also:

@justinclift
Copy link
Member

That's a bit unclear. Which key is "Strg"? 😄

@chrisjlocke
Copy link
Member

chrisjlocke commented Apr 7, 2020

Strg is German for Ctrl (or more technically, Steuerung means control)

@justinclift
Copy link
Member

Interesting. Haven't tested this to confirm, but first potential guesses (without checking) are:

  • Something to do with the Qt versions for our 32 and 64 bit builds being different?
  • Possibly some key combination thing messed up in the German translation (?). Not sure why it would only be on the 64-bit version though. 😦

@mgrojo
Copy link
Member

mgrojo commented Apr 7, 2020

Interesting. Haven't tested this to confirm, but first potential guesses (without checking) are:

  • Something to do with the Qt versions for our 32 and 64 bit builds being different?

Probably. Or maybe missing translation files. @horst-p-w-neubauer are the general button labels in dialogue translated? How is the Control key translated in standard entries like in standard contextual menus.

  • Possibly some key combination thing messed up in the German translation (?). Not sure why it would only be on the 64-bit version though. 😦

What we have seen at other issues is: if you translate the key names, you have to match the translation used by Qt. And Spanish, at least once they've changed the abbreviated translation for the Shift key.

@horst-p-w-neubauer
Copy link
Member Author

It's all translated zu German.

@horst-p-w-neubauer
Copy link
Member Author

Funny, If I Change the setting to English Ctrl+Enter works fine. Thx for this idea!

@justinclift
Copy link
Member

No worries @horst-p-w-neubauer. It probably means there's something with our german translation strings that needs looking at. 😄

It might be something @FriedrichFroebel has time to investigate at some point. 🙏

@horst-p-w-neubauer
Copy link
Member Author

@justinclift, is there a way I can contribute to this project. It seems not to be open for everybody - but maybe I just have some troubles with the security stuff.

@scottfurry
Copy link
Contributor

@horst-p-w-neubauer - hop on gitter and we can find someone to walk you through details/roadblocks. Sounds like your multilingual skills could be most useful.

@horst-p-w-neubauer
Copy link
Member Author

thanks I seem to have found a way to fork and create a pull request

@horst-p-w-neubauer
Copy link
Member Author

I found the same behavior in 6 other languages
in these 7 languages Ctrl+Return doesn't work in the sql-tab:
Arabic, Chinese(China), Frensh, German, Italian, Korean, Portuguese

in these 10 languages Ctrl+Return works proper in the sql-tab
Chinese(Taiwan), Czech, 2xEnglish, Japanese, Polish, Russian, Spanish, Turkish, Ukrainian

@horst-p-w-neubauer
Copy link
Member Author

horst-p-w-neubauer commented Apr 22, 2020

this may help locate the issue:
Chinese(China) translates in sqlb-zh.ts to

    <message>
        <location filename="../MainWindow.ui" line="1497"/>
        <source>Ctrl+Return</source>
        <translation>Ctrl+回车</translation>
    </message>

as Chinese(Taiwan) doesn't

    <message>
        <location filename="../MainWindow.ui" line="1497"/>
        <source>Ctrl+Return</source>
        <translation>Ctrl+Return</translation>
    </message>

```If checked the complete list. All those who don't work translate the shortcut. the working ones don't transalte.

@horst-p-w-neubauer
Copy link
Member Author

the same with other translated shortcuts.
e.g. Ctrl+P in TableBrowser.ui
translated in German to Strp+P - doesn't work
There is no difference in Shortcuts comming from .ui files to those, comming fom .cpp file
if the shortcut gets translated - it doesn't work
e.g. Ctrl+W in MainWindow.cpp
translated in German to Ctrl+P - doesn't work

@horst-p-w-neubauer
Copy link
Member Author

Shortcuts working without explicit translation but show translated on UI:
grafik

@justinclift
Copy link
Member

I found the same behavior in 6 other languages

Good work! 😄

We'll need to get this fixed (as much as practical) for the 3.12.0 release.

@justinclift justinclift added this to the 3.12.0 - Next release milestone Apr 26, 2020
@mgrojo
Copy link
Member

mgrojo commented Apr 26, 2020 via email

@horst-p-w-neubauer
Copy link
Member Author

I was testing the nightly-build: Version 3.12.99 (May 3 2020); Erstellt für x86_64-little_endian-llp64, laufend unter x86_64

In the german version Ctrl+Return works fine now.
How should we handle the other languages?
Should I just reset all short-key translations in the other languages?
Are there active translators on every language that could be envolved shortly?

@mgrojo
Copy link
Member

mgrojo commented May 4, 2020

I wonder, why Qt recommends doing this:
QKeySequence(tr("Ctrl+P"))
when it is so easy to break it.

  1. Is someone translating the key sequences to other key combination?
  2. When not, should we remove tr() in all these constructors? Or only remove all the translations?

@scottfurry
Copy link
Contributor

If it wasn't for Qt-Creator and such, my vote would be to just put all the key sequences in a header file and just call a namespace global:

namespace DB4S {
....
    const SEQ_CTRL_P = QString("Ctrl+P");
    const DISPLAY_CTRL_P = QString(Qt::tr("Ctrl+P"));
...
};

... but that's just me musing here.

@horst-p-w-neubauer
Copy link
Member Author

I vote for removing the translations. That gives us time to find a solid solution without breaking any timelines or any code.

@horst-p-w-neubauer
Copy link
Member Author

horst-p-w-neubauer commented May 4, 2020

Do we know if any of the translations really take advantage of changing shortcuts instead of translating them what makes them useless?

@mgrojo
Copy link
Member

mgrojo commented May 5, 2020

Do we know if any of the translations really take advantage of changing shortcuts instead of translating them what makes them useless?

It seems that most translators aren't remapping things. They are either leaving the text as is or they are just translating key names. Apparently, but I don't know Chinese, Japanese, Polish, etc 😉

I made a command to get differing source and translation strings. They are these, if I haven't missed anything:

      1 >Ctrl+Return<
      1 >Ctrl+Enter<
      1 >Alt+Del<
      1 >Alt+Entf<
      1 >Alt+Del<
      1 >Alt+Entf<
      1 >Ctrl+Space<
      1 >Ctrl+Espacio<
      1 >Ctrl+Shift+C<
      1 >Ctrl+Maj+C<
      1 >Alt+Del<
      1 >Alt+Supp<
      1 >Ctrl+Shift+C<
      1 >Ctrl+Maj+C<
      1 >Ctrl+Shift+O<
      1 >Ctrl+Maj+O<
      1 >Ctrl+Shift+S<
      1 >Ctrl+Maj+S<
      1 >Ctrl+Return<
      1 >Ctrl+Entrée<
      1 >Alt+Del<
      1 >Alt+Supp<
      1 >Ctrl+Space<
      1 >Ctrl+Espace<
      1 >Alt+Del<
      1 >Alt+Canc<
      1 >Ctrl+O<
      1 >Ctrl+A<
      1 >Ctrl+W<
      1 >Ctrl+C<
      1 >Ctrl+Q<
      1 >Ctrl+E<
      1 >Ctrl+Return<
      1 >Ctrl+Invio<
      1 >Alt+Del<
      1 >Alt+Canc<
      1 >Ctrl+Space<
      1 >Ctrl+スペース<
      1 >Ctrl+Return<
      1 >Ctrl+리턴<
      1 >Ctrl+Space<
      1 >Ctrl+Spacja<
      1 >Ctrl+Return<
      1 >Ctrl+ENTER<
      1 >Alt+Del<
      1 >Alt+De<
      1 >Ctrl+Return<
      1 >Ctrl+回车<

Assuming that the non-letter cases are just translations, clear cases of remapping seem all from Italian:

sqlb_it.ts:        <source>Ctrl+O</source>
sqlb_it.ts:        <translation>Ctrl+A</translation>
sqlb_it.ts:        <source>Ctrl+W</source>
sqlb_it.ts:        <translation>Ctrl+S</translation>
sqlb_it.ts:        <source>Ctrl+S</source>
sqlb_it.ts:        <translation>Ctrl+C</translation>
sqlb_it.ts:        <source>Ctrl+Q</source>
sqlb_it.ts:        <translation>Ctrl+E</translation>

@horst-p-w-neubauer
Copy link
Member Author

thx for analyzing, @mgrojo
As there are remappings - I'd vote for clearing .ts files from all non regular key-expressions and resetting them. And explainig it on wiki/Translations.

mgrojo added a commit that referenced this issue May 9, 2020
…lems

There are some problems with some translations where the keyboard shortcut
does not work when translated. To prevent those problems, a general
reset of all the translations which are supposed to not change the actual
key combination has been made.

Only some shortcuts in Italian are clearly changed by the translation and
those have been preserved.

See issue #2178
as is.
@mgrojo
Copy link
Member

mgrojo commented May 9, 2020

thx for analyzing, @mgrojo
As there are remappings - I'd vote for clearing .ts files from all non regular key-expressions and resetting them. And explainig it on wiki/Translations.

Agreed and made into a pull request #2235.

mgrojo added a commit that referenced this issue May 19, 2020
- Removed translation of Function keys for all languages
- Removed also remapped shortcuts for Italian

See issue #2178 and discussion in PR #2235.
mgrojo added a commit that referenced this issue May 19, 2020
…lems

There are some problems with some translations where the keyboard shortcut
does not work when translated. To prevent those problems, a general
reset of all the translations which are supposed to not change the actual
key combination has been made.

Only some shortcuts in Italian are clearly changed by the translation and
those have been preserved.

See issue #2178
as is.
mgrojo added a commit that referenced this issue May 19, 2020
- Removed translation of Function keys for all languages
- Removed also remapped shortcuts for Italian

See issue #2178 and discussion in PR #2235.
@mgrojo
Copy link
Member

mgrojo commented May 24, 2020

@horst-p-w-neubauer, can we close this? The only remaining step is merging it to the 3.12.x branch, but this can be done at the same time including everything we want to release, if they haven't resulted in any issue.

@MKleusberg MKleusberg added bug Confirmed bugs or reports that are very likely to be bugs. response requested needs merging with upcoming release branch labels Jun 3, 2020
justinclift pushed a commit that referenced this issue Jun 6, 2020
- Removed translation of Function keys for all languages
- Removed also remapped shortcuts for Italian

See issue #2178 and discussion in PR #2235.
@justinclift
Copy link
Member

Closing this as I'm pretty sure it's complete. 😄

mgrojo added a commit that referenced this issue Aug 22, 2020
- Removed translation of Function keys for all languages
- Removed also remapped shortcuts for Italian

See issue #2178 and discussion in PR #2235.

# Conflicts:
#	src/translations/sqlb_cs.ts
#	src/translations/sqlb_de.ts
#	src/translations/sqlb_es_ES.ts
#	src/translations/sqlb_fr.ts
#	src/translations/sqlb_ja.ts
#	src/translations/sqlb_ko_KR.ts
#	src/translations/sqlb_pl.ts
#	src/translations/sqlb_pt_BR.ts
#	src/translations/sqlb_ru.ts
#	src/translations/sqlb_tr.ts
#	src/translations/sqlb_uk_UA.ts
#	src/translations/sqlb_zh.ts
#	src/translations/sqlb_zh_TW.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

6 participants