-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Marked QLabel and ComboBox texts as translatable in 'Edit Pragma' QTabWidget #3697
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
Conversation
This cannot be done in this way. The no-translation attribute was added on purpose, see 9a30e6c I'm not sure if it's a good idea to translate anything here, since the pragma names, the values and the documentation is only in English in SQLite. @hchiper how would you translate all of this into your native language, assuming it's not English? Maybe we should take into account the opinion of other translators, like @lulol, @FriedrichFroebel, @PeterDaveHello, @GortiZ6 or @mvt91. If we decide to translate this, then a way to separate the translation from the values used as pragma names and values. Otherwise, this could happen again: #1489 (comment) HTML code and links should also not be passed for translation, to avoid unneeded work to translators and possible errors. |
I have no really strong preference on this, expect that I would like to avoid having to copy lots of HTML code and identify the small bits which might need a translation while dealing with escaped HTML code. Given that I consider pragmas extended functionality, I would expect the user know the corresponding concepts already with their actual "SQL name", and thus would not necessarily translate it to avoid confusion. |
If some technical terms cannot be well translated into Traditional Chinese, I usually prefer to keep them in their original language. However, I am not entirely sure if I fully understand the context and the whole picture here. Just FYR, I usually judge based on the translatable or similar parameters provided by the upstream project. If the project has already determined that something should not be translated, I would typically not translate it unless it is obviously a term or string that should be translated. For example, specific commands or technical terms are usually kept in their original form because they are primarily used as such in practice. |
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.
The intention is clear. If you solve the problem with the values, it will look OK to me.
src/MainWindow.ui
Outdated
@@ -211,25 +211,25 @@ You can drag SQL statements from an object row and drop them into other applicat | |||
<widget class="QComboBox" name="comboboxPragmaAutoVacuum"> | |||
<item> | |||
<property name="text"> | |||
<string notr="true">None</string> | |||
<string>None</string> |
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.
Please restore the notr
attribute for this and the other values, so that they are never changed in translations, otherwise the pragma edition will be broken.
If you still want to translate the values, you'd need to change also the code to make it work even with translated values.
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.
I understand that changing the values in the combo-boxes could break the code. Thanks for having explained.
I have restored the notr="true" attribute for them.
I hope the modification is now acceptable and that you can see it. Otherwise should I create a new pull request?
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.
OK, if the values are not translated, there's no possibility of breaking the code, so it can be accepted. Since nobody seems to oppose it, I will merge it. Translators are always free to finalize a translation string without providing a translation (in that case, the original string is used in the localized application).
@hchiper, good news, I've made changes in commit bf62f3a to allow translations of pragma values. With this, translating this tab will make more sense, otherwise the names are in a language and the values in the original. Also, in ad00ad4, I've separated the HTML labels from the pure pragma names, so translation will be easier on the technical side. The translation files are also updated, so if you want, you can work from that point and make a pull request for your translation into French. |
This is not like Excel localized function names, right? 😉 😱 |
You have a point, but I'd say it isn't. This is just a form inside an application and, as @hchiper said, users can have a "feeling of unfinished work". At the beginning, we allow translation of these strings, until we discovered that there was a technical problem, because the strings were used for two pragmas as direct values in the code. Now that problem is solved, and it's up to the translators to provide a translation for their language or leave it in the original form. There are pros and cons of translating it, but this is not like translating function identifiers for code, in my opinion. In fact, I've also added tooltips with the original pragma names in SQL, and the links to the help are also visible in the status bar, so users with previous knowledge of these pragmas, can clarify exactly what we are referring to, in case of any doubt. By the way, as part of the change, I translated the strings to Spanish, but mostly in order to test the implementation. If you think it is best to keep the original version, I'm open to reverting the translation. |
These changes seem perfect to me, balanced between accurate and self-explanatory. I agree with @FriedrichFroebel that while users changing pragmas probably know the concepts, also DB4S provides a very intuitive and low entry bar to database management for the many casual users, but with tooltips helping to remember the exact real names, hopefully neither should be confused. Now all the translators need to remember to keep that balance. 😄 |
I have begun the translation into French. Apart from the Pragma tab, I'd like to restore the French translation of the AboutDialog (it was present in a release candidate, but the translation has disappeared in the final release). I'd like to make other minor modifications here and there. Is there a person responsible of the French translation that I should contact to discuss? |
Without marking them explicitly, they show up as untranslated, which might not be desired. Thus either mark them as done or copy over the original text and ideally verify that the correct values are indeed being rendered.
See the last call for translations at #3452 (comment) or the commit history of the corresponding file at https://github.com/sqlitebrowser/sqlitebrowser/commits/master/src/translations/sqlb_fr.ts I would recommend to create a dedicated pull request with you changes once you think you are done and ask the previous translators/main translator for possible feedback. |
Thanks. The French translation in well underway. Unfortunately, I failed to find contact info for @mvt91 who was the last (and only?) contributor to the French translation. When I came to unfinished strings for ColumnDisplayFormatDialog I noticed something that seemed strange (see attached screenshot): when I select a source text in the middle panel, the line highlighted in light blue in the right panel is 2 lines above the line containing that source text (red border). I'm using Qt Linguist Version 5.15.2 (the version available in my distro repositories). There is a 1 or 2 lines shift for (almost) every string. ColumnDisplayFormatDialog is the only context where it happens. Is there a problem with that particular context? Should I ignore that and continue to translate or should I wait for a fix? |
You can ignore that. Whenever a source file is modified in any way, even if the change doesn't affect translatable strings, the line information present in the translation files is displaced, but it doesn't break the translation, only that reference in Linguist and similar tools. |
Hi All
is there someone working on the French translation ?
Do you neeed some help.
I did it many times :)
regards
|
Yes, I do. I began with the translation of stings recently marked as translatable ("Edit Pragmas" tab). By the way, apart that, I discovered here and there a few missing translations, and a very few I believe could be enhanced. I have found my way with Qt Linguist. I find it a great tool because each string is visible in its context and helps a lot to translate appropriately. What I have done is
I would be happy to share my copy of |
Hi hchiper
If you've finished it, don't hesitate publish it
We can meet later for a new release.
With QT-Liguist, it is not easy to make some update.
I use notepad++ to check and correct some mistakes more quickly
If you need help, I can do it !
|
Currently, these strings cannot be translated and are always in English, regardless of the user's language.