Open m-kuhn opened 4 years ago
It is possible to implement such an ili2db switch. However, I'm not sure if it offers the best user experience. I think a user has always the same preference, depending on his personal language skills. For one german speaking user this might be de->en->fr, for another it might be de->fr->en. (That's why I would prefere a global setting)
True, if we look at it as order of preference - and not just a single preferred language - we'll need a (global) configuration.
What I wonder
I could also very well imagine a global setting, and as long as this is not set default to the model language. Assuming that the model language is an implicit user choice expressed through the language used in the model search bar.
I think the language should be set by the model name the user chooses ("Nutzungsplanung" german, "Plans d'affectation" french, ...)
Does the name of a table or column in the DB really matter? Is it not the user interface that matters?
The most important part is the UI. An untranslated DB has the advantage of stability for logic like post sql scripts. A translated DB has the advantage of being easily introspectable by the user.
If we go for untranslated DB, do you see a way of getting the translated information (mapped to the sql objects) from the TRANSLATION OF model to QGIS?
More or less three variants:
2.) and 3.) have the disadvantage of a json encoded value (not so easy to edit by user) 3.) has the disadvantage that the same ili element might appear in different entries (due to o/r mapping) 1.) has the disadvantage of a new table
What would be the required information (per language)?
Would it also be required to differentiate between different output screen sizes (e.g. between mobile and desktop)?
Check with swisstopo, if they're interested
Create the tables in the derived name is implemented here https://github.com/claeis/ili2db/issues/221
What we need now to create the layernames / fieldnames is the "mapping" mentioned here https://github.com/opengisch/QgisModelBaker/issues/402#issuecomment-628514717 - I requested an estimate there.
As far as I understand the tendency of this thread we would keep as default the untranslated database. And maybe an additional request can be to be able to set the language that will be passed as --nameLang
.
Interlis has a concept with
TRANSLATION OF
models. A very good example are the ARE models where there are the modelsNutzungsplanung_V1_1
(German base) with translation modelsPianiDiUtilizzazione_V1_1
andPlansDAffectation_V1_1
.The translated models are listed in the search interface of model baker, but if selected, the base language version is created. I.e. if "PlansDAffectation_V1_1" is typed in the model text edit, it is found (in French), but the generated db structure is in German.
The
--nameLang
parameter can be used to control the language of the generated db structure.I see several possibilities:
I think 1. would best match user expectations. And could potentially be implemented as an ili2db switch (
--useModelLanguage
CC @claeis)?