-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Project Translation considers descriptions of Value Map Widget #60744
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
…rectly in a map instead of maps in a list.
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.
LGTM!
Co-authored-by: Denis Rouzaud <[email protected]>
…ext so it's easier to read and understand
const QList<QVariant> valueList = field.editorWidgetSetup().config().value( QStringLiteral( "map" ) ).toList(); | ||
|
||
for ( int i = 0, row = 0; i < valueList.count(); i++, row++ ) | ||
if ( field.editorWidgetSetup().config().value( QStringLiteral( "map" ) ).canConvert<QList<QVariant>>() ) |
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.
Beside using QList consequently I added this line. Otherwise it would just had returned an empty list, but with this it's cleaner...
Thanks @3nids |
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-60744-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 5d63c80a2921b1016bb5ee0d3d5b80522f48aa0c,864543becddf470d2d375e776d61321c7b4e8a95,529d85b3d95170e2ef8a1495c6091650335e0bb3,dcab0217709aa4e21cc7a8229f173945d4da07b5,8a982428f40e7ea95568037241cf2a17ad2ed004
# Push it to GitHub
git push --set-upstream origin backport-60744-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports Then, create a pull request where the |
Value Map descriptions can now be translated as well.
The values are of course the same.
This fixes #56089
Additionally I included missing tests for the Value Relation value translation.
The ts file is committed as well, so the tests can be extended in future with low effort.
This handles only value maps stored as QLists (means after this implementation #6091 and > 3.4)