-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Update Arabic translation #2406
Update Arabic translation #2406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing! 😄
I found some items that needed simple corrections.
I could only edit those parts and merge them, but I left it as a review only as you may have disagreements. Check them please.
@@ -1019,7 +1100,7 @@ Errors are indicated with a red squiggle underline.</source> | |||
<location filename="../EditDialog.ui" line="290"/> | |||
<location filename="../EditDialog.ui" line="308"/> | |||
<source>Ctrl+P</source> | |||
<translation></translation> | |||
<translation>Ctrl+P</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
@@ -1039,7 +1120,7 @@ Errors are indicated with a red squiggle underline.</source> | |||
<message> | |||
<location filename="../EditDialog.ui" line="326"/> | |||
<source>Ctrl+Shift+C</source> | |||
<translation></translation> | |||
<translation>Ctrl+Shift+C</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
@@ -1771,18 +1852,18 @@ All data currently stored in this field will be lost.</source> | |||
<location filename="../ExtendedScintilla.cpp" line="62"/> | |||
<location filename="../ExtendedScintilla.cpp" line="283"/> | |||
<source>Ctrl+H</source> | |||
<translation></translation> | |||
<translation>Ctrl+H</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
</message> | ||
<message> | ||
<location filename="../ExtendedScintilla.cpp" line="64"/> | ||
<source>Ctrl+F</source> | ||
<translation></translation> | ||
<translation>Ctrl+F</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
</message> | ||
<message> | ||
<location filename="../ExtendedScintilla.cpp" line="77"/> | ||
<location filename="../ExtendedScintilla.cpp" line="287"/> | ||
<source>Ctrl+P</source> | ||
<translation></translation> | ||
<translation>Ctrl+P</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
@@ -6469,7 +6972,7 @@ Hold %3Shift and click to jump there</source> | |||
<message> | |||
<location filename="../TableBrowser.ui" line="893"/> | |||
<source>Ctrl+U</source> | |||
<translation></translation> | |||
<translation>Ctrl+U</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
@@ -6558,7 +7061,7 @@ Hold %3Shift and click to jump there</source> | |||
<message> | |||
<location filename="../TableBrowser.ui" line="1039"/> | |||
<source>Ctrl+Space</source> | |||
<translation></translation> | |||
<translation>Ctrl+Space</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
@@ -6567,20 +7070,24 @@ Hold %3Shift and click to jump there</source> | |||
</message> | |||
<message> | |||
<source>Ctrl+H</source> | |||
<translation></translation> | |||
<translation type="vanished">Ctrl+H</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
but this one is vanished entry so you can ignore this one.
</message> | ||
<message> | ||
<location filename="../TableBrowser.cpp" line="102"/> | ||
<source>Ctrl+R</source> | ||
<translation></translation> | ||
<translation>Ctrl+R</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
<source>Ctrl+"</source> | ||
<translation></translation> | ||
<translation>Ctrl+"</translation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shortcuts should not be translated.
See the wiki for further information.
Hi @lucydodo Even if Qt for some reason or another used the orignal string (if the translation is empty), this must be reported as a bug. |
Interesting.. 🤔 Did you do the like as above when testing locally? |
Yeah, I wasn't sure about that either but (apparently) it's a feature of Qt (?). eg when the translated string is empty, it automatically uses the original text instead @mgrojo That's correct yeah? |
Yes, this is what I know due to experience, but I haven't found any reference in the documentation. In the Qt Linguist Manual there are references to "accept the empty translation", but without clarifying what is then shown in the translation. Having said that, I don't have an explanation for @SafaAlfulaij's screenshot. For me, that Qt version is buggy, since it goes against all what we have seen till now. This is my case with an empty translation for "Ctrl+N": |
Filed a bug upstream: #86774 |
@SafaAlfulaij But what about the nightly build? Even there, the shortcut doesn't appear and doesn't work? |
If this is a Qt bug, I don't know what they're doing about translation of keyboard shortcuts. Our recommendation to not translate them comes from various issues that we have received (see, for example, #2178). But I'm not sure if we have received some issue when the translation string is equal to the original. Maybe not and, in that case, we could merge this pull request without problem. But what about the other languages, are people building with Qt 5.15 going to have problems when the translation of shortcuts is empty? What Qt version are we using for the official builds? |
At the moment, it's Qt 5.12.8. We could update that to Qt 5.12.9, but I kind of figured... "why take the chance of possibly breaking something for our supposed-to-be-stable point release?". 😉 |
Perfect. I only wanted to confirm that it isn't 5.15, which is apparently the one causes problems. |
First, sorry if I was rude in any way.
Regarding #2178, I'm not sure what the problem is, but perhaps it's because of keyboard layouts or something else. Did you try Ctrl+Enter and Ctrl+Return? These two are different keys (return is the normal, Enter is the keypad). Perhaps this was the problem? |
Do we know for sure that it is a bug, and not something that's understood to work this way + just badly documented by Qt? |
In fact, we never said that shortcuts must not be translated, but that key names should not be translated, because this is known not to work and is more or less documented.
(They should say that you are not supposed to translate key names in general, like Space or Return). But I think we haven't actually have problems when the translation is equal to the original. Emptying the translation was just our quick way to avoid the problem in all languages. On the other hand, yes, I'm sure that leaving the translation empty and finished is, in general, not only for shortcuts, saying to Qt that there's no translation and the original text is to be kept. They have designed it that way, otherwise it's a so long-standing bug, that it has become a feature. I think the pull request can be merged as is. |
Based on the commit of @SafaAlfulaij, I tested it in Windows and macOS, and confirmed that it works.
In fact, I think it's okay to merge in this case, but on the other hand, we have been doing like this until this time, and the official Qt IRC channel also confirmed that if the blank translation was approved, replaced by the original text if assuming that this is not a bug, I requested changes because of concerns about bugs that may occur in the stable version. First of all, I approved the review based on the comments arising from this PR. |
Ctrl+Enter -> Ctrl+Return
It is now merged to master. I'll try to cherry-pick it to the v3.12.x, which is the branch of the release. I hope it can be done without problems. |
#2405 # Conflicts: # src/translations/sqlb_ar_SA.ts
@SafaAlfulaij I had to solve some trivial conflicts and it looks good from a technical point of view. When compiling, it says that there are two pending messages, but I cannot find them. You can review it in 1dfa70c |
@mgrojo Couldn't find it either... |
#2405