GeezerVison is showing github.com — Marked QLabel and ComboBox texts as translatable in 'Edit Pragma' QTabWidget by hchiper · Pull Request #3697 · sqlitebrowser/sqlitebrowser
Conversation
Currently, these strings cannot be translated and are always in English, regardless of the user's language.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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.
|
justinclift reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@mgrojo
Sorry, I wasn't aware that the no-translation attribute was added on purpose. However I think translation is possible, while keeping the PRAGMA names unchanged, in uppercase for example; it was not my intention to translate them as well. Have a look at this screenshot to have a more precise idea.

As for whether or not HTML code should be translated, I think it should. By the way, all the strings I marked for translation are HTML code.
The entire content of the About dialog is also HTML. It was translated in version 3.13 rc3 but the translation has disappeared in the final release 3.13.0. I don't see the advantage, on the contrary.
I started to work on this pull request because untranslated text gave me the feeling of unfinished work and I was ready to make a small contribution. This remark is of course not a criticism of the translators, who have already made a huge amount of work.
@FriedrichFroebel
I am not totally certain, but I think most of the HTML code has already been translated (at least in French).
And I agree that "SQL names" or keywords should not be translated (it would not make sense).
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
hchiper
changed the title
Marked QLabel and ComboBox texts as translatable in 'Edit Prgama' QTabWidget
Marked QLabel and ComboBox texts as translatable in 'Edit Pragma' QTabWidget
Aug 4, 2024
|
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@PeterDaveHello
I totally agree that specific commands or technical terms are usually kept in their original form and that is precisely what I did in the sample translation shown in the DB4S screen capture above (I have translated and compiled a local copy).
Moreover, these specific terms are uppercase (LIKE, CHECK...) to highlight they are SQL keywords or specific commands.
For clarity, here is a screen capture of the full DB4S window.

As one can see, the text of the 3rd tab, originally Execute SQL, has been translated in the official French version as Exéuter le SQL where SQL (Structured Query Language) has not been translated to LRS (Langage de Requête Structuré), which would have been incomprehensible.
And in my opinion it would have been preferable to have translated of the 4th tab as Éditer les directives PRAGMA.
I hope my intentions are now a little clearer.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
<item>
|
|
|
<property name="text">
|
|
|
<string notr="true">None</string>
|
|
|
<string>None</string>
|
mgrojo
Aug 5, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 notrattribute 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
hchiper
Aug 5, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@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.
|
justinclift and lulol reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
This is not like Excel localized function names, right? 😉 😱
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
|
lulol and Stheel83 reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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.
The very informative and verbose tooltips are one of the things I like most about DB4S's gui and that makes its use so intuitive, despite the extra work editing escaped html tags.
Now all the translators need to remember to keep that balance. 😄
|
mgrojo and Stheel83 reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
hchiper
commented
Aug 15, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
@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.
I have begun the translation into French.
Should I mark the items as done (checkmark) in Qt Linguist, or leave the question mark?
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?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Should I mark the items as done (checkmark) in Qt Linguist, or leave the question mark?
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.
Is there a person responsible of the French translation that I should contact to discuss?
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.
|
justinclift reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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?

|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mvt91
commented
Aug 16, 2024
via email
•
edited by justinclift
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Hi All
is there someone working on the French translation ?
Do you neeed some help.
I did it many times :)
regards
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
For example, I've seen (don't remember where, I have to search) that "Check constraints" was translated as "Vérifier les contraintes" while "Appliquer les contraintes CHECK" seems more appropriate.
What I have done is
- Added translations for strings in the "Edit Pragmas" tab.
- In the AboutDialog I replaced the hyphen by a space in the title ("DB-Browser" -> "DB Browser") to be consistent with the rest of the translation, and I translated the content of the main widget (inspired by translation from sqlitebrowser-v3.13.x-rc1).
- Edited HTML strings to replace a space by (no break space) before some punctuation signs (; : ! ?) to avoid line break just before these signs (found 13 occurrences).
- Made minor modifications / corrections to strings already translated and added some missing translations (not yet finished).
I would be happy to share my copy of sqlb_fr.ts with you so that you can give your feedback before any pull request.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mvt91
commented
Aug 16, 2024
via email
•
edited by justinclift
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
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 !
|
justinclift reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
mgrojo
mgrojo approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|