Skip to content

Add a scrollbar when there are too many localized datasets #671

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

suricactus
Copy link
Collaborator

Attempt to fix #670 .

I am not super happy with the end result, if @nirvn has a better understanding how QSrollArea works, feel free to hijack the branch.

@kochon
Copy link

kochon commented May 9, 2025

I tested it and it does solve the issue. I get what you mean though when you say the end result still needs some work but at least I can get things done now :) One thing to note, these changes should also be made in package_dialog.ui for non-cloud projects! I did some testing on my side just replicating what you did here and it also fixes the issue.

@nirvn
Copy link
Member

nirvn commented May 10, 2025

@suricactus , I did some more tweaking, I think we're there.

Cloud project creation/conversion information panel:
image

Package [non-cloud] project:
image

I've removed the quite unhelpful "most location is /QField/basemaps" as this was never a true statement. Instead I propose we add a link to the localized datasets documentation page when we upgrade the content to take into account recent changes et al.

Comment on lines +276 to +282
self.tr(
"The current project relies on datasets stored in localized data paths, make sure to copy the relevant datasets into the localized data path of devices running QField."
)
+ " "
+ self.tr(
"The layer stored in a localized data path is:\n{}"
).format("\n".join(localizedDataPathLayers))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.tr(
"The current project relies on datasets stored in localized data paths, make sure to copy the relevant datasets into the localized data path of devices running QField."
)
+ " "
+ self.tr(
"The layer stored in a localized data path is:\n{}"
).format("\n".join(localizedDataPathLayers))
self.tr(
"The current project relies on datasets stored in localized data paths, make sure to copy the relevant datasets into the localized data path of devices running QField."
" "
"The layer stored in a localized data path is:\n{}"
).format("\n".join(localizedDataPathLayers))

OR

Suggested change
self.tr(
"The current project relies on datasets stored in localized data paths, make sure to copy the relevant datasets into the localized data path of devices running QField."
)
+ " "
+ self.tr(
"The layer stored in a localized data path is:\n{}"
).format("\n".join(localizedDataPathLayers))
self.tr(
"The current project relies on datasets stored in localized data paths, make sure to copy the relevant datasets into the localized data path of devices running QField. \nThe layer stored in a localized data path is:\n{}"
).format("\n".join(localizedDataPathLayers))

Improves readability.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you tried to save a translatable string, I see this pattern multiple times across the code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we want to introduce the branching just because we support plural. In any of the other products we do not support plural properly, including QFieldSync, so we can stick to the trick I learned from you: "The layer(s) stored in localized data path are:\n{}", even if it is not great English.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you tried to save a translatable string, I see this pattern multiple times across the code?

Correct, I was trying to avoid a bit of sweat for our translation community :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want it tweaked or shall we keep it as is to recycle what's already translated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localized dataset layers list takes too much screen space
3 participants