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

Translation Models: Translate Enumeration Domains #982

Open
signedav opened this issue Nov 6, 2024 · 5 comments
Open

Translation Models: Translate Enumeration Domains #982

signedav opened this issue Nov 6, 2024 · 5 comments

Comments

@signedav
Copy link
Member

signedav commented Nov 6, 2024

Enumerations are not translated. They should be.

    RechtsStatus = (
      inKraft,
      AenderungMitVorwirkung,
      AenderungOhneVorwirkung
    );
    StatutJuridique = (
      enVigueur,
      ModificationAvecEffetAnticipe,
      ModificationSansEffetAnticipe
    );

Creates the table:
image

With --nameLang fr it would contain french values...

@sjib
Copy link

sjib commented Nov 6, 2024

There were some issues on this some time ago:
claeis/ili2db#405
claeis/ili2db#439
claeis/ili2db#460

@signedav
Copy link
Member Author

signedav commented Nov 6, 2024

The specialty is that those values are data and not structure. Of course Model Baker could update the dispName value of the domain table, but I don't really like it. Since the translation besides that is made in the frontend.

A front end solution would be having this display expression:

CASE 
   WHEN iliCode = 'inKraft' THEN 'enVigueur'
   WHEN iliCode = 'AenderungMitVorwirkung' THEN 'ModificationAvecEffetAnticipe'
   WHEN iliCode = 'AenderungOhneVorwirkung' THEN 'ModificationSansEffetAnticipe'
   ELSE iliCode
END

Any other ideas? E.g. @gacarrillor ?

@gacarrillor
Copy link
Collaborator

gacarrillor commented Nov 6, 2024

Other ideas here: opengisch/QgisModelBakerLibrary#115

BTW, yours seems like a clean approach.

@signedav
Copy link
Member Author

signedav commented Nov 6, 2024

Other ideas here: opengisch/QgisModelBakerLibrary#115

Oh sorry. I've overseen that. Usually I keep issues in this repo and in the library I keep only technical dev stuff.

Thanks for your inputs there. I see the cool aspects on your proposed sollution but I am a little Bit concerned about performance.

BTW, yours seems like a clean approach.

Thanks. Yes I have to overthink it but it's straight foreward and simple (and performant)...

@gacarrillor
Copy link
Collaborator

Thanks. Yes I have to overthink it but it's straight foreward and simple (and performant)...

Definitely. I guess it also answers what I was trying to mention in the linked issue by saying: there should be a cache mechanism.
Let's see if there are other ideas coming. However, if we find it covers the required use cases, then I'd vote to go for it.

@signedav signedav changed the title Translation Models: Translate Enumerations Translation Models: Translate Enumeration Domains Nov 7, 2024
signedav added a commit to opengisch/QgisModelBakerLibrary that referenced this issue Nov 7, 2024
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

No branches or pull requests

3 participants