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

helper table to support multi language user interfaces #350

Closed
claeis opened this issue May 14, 2020 · 14 comments
Closed

helper table to support multi language user interfaces #350

claeis opened this issue May 14, 2020 · 14 comments
Milestone

Comments

@claeis
Copy link
Owner

claeis commented May 14, 2020

Add an option to create a new helper table t_ili2db_nls with multilingual labels, descriptions, ...

  • ilielement qualified name of Interlis model element (table, attr, role, enumele, ...) in root original language
  • lang language code
  • uivariant to distinguish between differen ui flavours (e.g. small/large screens)
  • label name of element
  • mnemonic short cut letter of element
  • tooltip short description
  • description longer description
  • symbol icon (e.g. for use in toolbars)
@signedav
Copy link

Is this on the roadmap already? What would be needed to do it (time/price)?

@claeis
Copy link
Owner Author

claeis commented Apr 20, 2022

8h effort

@signedav
Copy link

signedav commented Apr 5, 2024

8h effort

Is this estimate still valid @claeis ?

@claeis claeis added this to the 5.2.0 milestone Aug 26, 2024
claeis added a commit that referenced this issue Sep 27, 2024
@claeis
Copy link
Owner Author

claeis commented Sep 27, 2024

TODO doc um T_ILI2DB_NLS ergaenzen

@signedav
Copy link

signedav commented Oct 1, 2024

I tested successfully on pg and gpkg. The table is generated and - as far as I checked - complete.

One question: When I import a translated model (only) -> means of course the original model is imported as well. But do I see somewhere what language is set at the model I imported? Since when a user imports Plandaffection and not Nutzungsplanung, they might prefer french. Is there an indicator for it the meta-tables?

java -jar /home/dave/dev/opengisch/QgisModelBakerLibrary/modelbaker/iliwrapper/bin/ili2gpkg-5.2.0-SNAPSHOT/ili2gpkg-5.2.0-SNAPSHOT.jar --schemaimport --dbfile /home/dave/qgis_projects/translation/plansdaffect2.gpkg [...] --createNlsTab --models PlansDAffectation_V1_2

@claeis
Copy link
Owner Author

claeis commented Oct 14, 2024

Die Zeilen wo das ilielement keinen '.' enthält sind Zeilen für Modelle. (Und in der Spalte lang siehst Du die Sprache). Was du hier in der Tabelle t_ili2db_nls nicht siehtst, ist

a) welches der übersetzte iliname des Modelles ist (die Spalte label kann das sein, muss aber nicht)
b) welches Sprache, welche andere Sprache übersetzt

Falls du a oder b brauchst müsste ich es in t_ili2db_meta_attrs ergänzen.

@signedav
Copy link

a) welches der übersetzte iliname des Modelles ist (die Spalte label kann das sein, muss aber nicht)

Verstehe ich nicht ganz. Wenn ein Modell übersetzt ist, dann ist der übersetzte Name doch im Label. In welchem Fall ist das nicht so? Wenn die Übersetzung dem Original enspricht?

Mein Problem ist, dass Model Baker wissen muss, welche Version er jetzt für die Benennung der QGIS Layer / Felder etc. verwenden soll. Er hat im Schema ja nun deutsche und französische Versionen. Er müsste also wissen, welches Modell die User angewählt haben. Mit b wär dies vermutlich umgesetzt. Existiert eine Übersetzung (zBs. de->fr), dann nutzt er grundsätzlich die Übersetzung (fr), denn würden die User keine Übersetzung wollen, hätten sie auch kein übersetztes Modell importiert.

@gacarrillor
Copy link
Contributor

I tested successfully on pg and gpkg. The table is generated and - as far as I checked - complete.

One question: When I import a translated model (only) -> means of course the original model is imported as well. But do I see somewhere what language is set at the model I imported? Since when a user imports Plandaffection and not Nutzungsplanung, they might prefer french. Is there an indicator for it the meta-tables?

java -jar /home/dave/dev/opengisch/QgisModelBakerLibrary/modelbaker/iliwrapper/bin/ili2gpkg-5.2.0-SNAPSHOT/ili2gpkg-5.2.0-SNAPSHOT.jar --schemaimport --dbfile /home/dave/qgis_projects/translation/plansdaffect2.gpkg [...] --createNlsTab --models PlansDAffectation_V1_2

Not sure if I'm missing something here, but the t_ili2db_nls table still does not contain translated domain values with the command you pasted, using ili2gpkg-5.2.0-20240927.161320-6-bindist.zip

For instance, I'd expect to find values enVigueur, ModificationAvecEffetAnticipe, ModificationSansEffetAnticipe (table StatutJuridique) in the label column, but they're not there. Can you please confirm @signedav?

@signedav
Copy link

It's about enumerations, right @gacarrillor ?

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

Those values (in german) are written into the corresponding table rechtsstatus

I agree, there should be a translation of those values in the NFS tables or at least the table rechtsstatus should contain the french values as well. But I suppose the first is preferable since the data are handled in original language anyway (like on export etc.)...

@signedav
Copy link

@claeis Denkst du dass es dafür eine Lösung gibt? Und was meinst du zum zweiten Thema hier #350 (comment) ?

@claeis
Copy link
Owner Author

claeis commented Oct 25, 2024

Verstehe ich nicht ganz. Wenn ein Modell übersetzt ist, dann ist der übersetzte Name doch im Label. In welchem Fall ist das nicht so? Wenn die Übersetzung dem Original enspricht?

Wenn es mit einem Meta-Attribut übersteuert ist

@signedav
Copy link

Also ein @ili2db.dispName würde dann im Label stehen? Was wenn es einerseits übersetzt und andererseits in der Übersetzung einen @ili2db.dispName hat?

@claeis
Copy link
Owner Author

claeis commented Oct 25, 2024

Ja (bzw. dispName gibt es aktuell beim Modell nicht, aber könnte es geben)

@claeis
Copy link
Owner Author

claeis commented Oct 25, 2024

Was wenn es einerseits übersetzt und andererseits in der Übersetzung einen @ili2db.dispName hat?

Meta-Attribute sind sprachunabhängig, also nicht pro Uebersetzung! Ich habe darum dispName so implementiert, dass man mit dem Zusatz _{LANG} das sprachabhängigen Label definieren kann. z.B:

!!@ dispName_fr="Topic IT"
TOPIC Topic_IT =

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