Skip to content
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

possiblity to pass model list that is excluded from language search #117

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

signedav
Copy link
Member

@signedav signedav commented Nov 5, 2024

to avoid that english is listed because of models like units etc.

Copy link
Collaborator

@gacarrillor gacarrillor left a comment

Choose a reason for hiding this comment

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

I had in mind dealing with this filtering in another way, if you don't mind.

Perhaps we have a pending discussion for opengisch/QgisModelBaker#973

If we have the list of models that were imported in the Schema Import operation, then we'll already have a curated list of relevant models to show in the language combobox.

For instance, if we pass PlansDAffectation, we'd be able to tell the lib to give us the language of that model and, if it's a translation of, to give us also the language of the original model. In that case, we'll end up only with French and German languages in the combobox, and with French selected by default because of having been requested in the Schema Import operation.

Since you have much more possible cases in mind, would it make sense to you?

@signedav
Copy link
Member Author

signedav commented Nov 5, 2024

Hm... yes maybe we can consider that. What about imported models in another language? They won't be listed, right?

Tomorrow we show the feature to an audience that might bring some valuable inputs. What do you think about bringing this as a first solution and implementing a more fine tuned solution later on?

@gacarrillor
Copy link
Collaborator

Hm... yes maybe we can consider that. What about imported models in another language? They won't be listed, right?

Models like Units won't affect our combobox unless you explicitly ask for those in the schema import operation (--models parameter).

Other heuristics could be applied to avoid non-sense comboboxes, for instance, if you only asked for Nutzungsplanung_V1_2, we shouldn't allow users to see an active combobox. Perhaps we can disable it (or replace it by a label), showing that the language for the database objects will be German.

Tomorrow we show the feature to an audience that might bring some valuable inputs.

Exciting!

What do you think about bringing this as a first solution and implementing a more fine tuned solution later on?

If we can revert it afterwards (when the other solution is implemented), then I'm fine with bringing this one for the moment. I'd like to avoid having both solutions coexisting in the mid term, though.

Another option would be to create a dev release including this PR just for the presentation and to let people play with it. As you wish.

@signedav
Copy link
Member Author

signedav commented Nov 5, 2024

If we can revert it afterwards (when the other solution is implemented), then I'm fine with bringing this one for the moment. I'd like to avoid having both solutions coexisting in the mid term, though.

Yes. The more specific implementation would replace this blacklist. Fine with that.

Another option would be to create a dev release including this PR just for the presentation and to let people play with it. As you wish.

That's a good idea, but I prefer not to do it. It's not only about the presentation. It's about releasing this solution. And I think it's very confusing when we always have English in the checkbox just because there are those blacklisted models.

@gacarrillor
Copy link
Collaborator

That's a good idea, but I prefer not to do it. It's not only about the presentation. It's about releasing this solution. And I think it's very confusing when we always have English in the checkbox just because there are those blacklisted models.

Agreed. We shouldn't have a release with the English option. I was suggesting that we release a dev version that does include this PR, so people (mainly people attending the presentation (?)) can play with it with no English option in the combobox. After that, the next release should come with the solution considering translation of models. But you know better the release roadmap, so please go ahead.

@signedav
Copy link
Member Author

signedav commented Nov 5, 2024

Ah yes. I guess we are talking about the same. Only thing to consider is, that we might have no resources to bring the finer solution to the stable release. But I guess there will be a follow up for sure, because it has lot of potential (e.g. possibility to export in translation model etc.) Thanks for your thoughts.

@signedav signedav merged commit eac8ec9 into main Nov 5, 2024
5 checks passed
@signedav signedav deleted the modelfilter branch November 5, 2024 19:24
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.

2 participants