Smithsonian / dpo-voyager

DPO Voyager - 3D Explorer and Tool Suite
Apache License 2.0
164 stars 28 forks source link

keep user-selected language when creating a new annotation #241

Closed sdumetz closed 1 week ago

sdumetz commented 6 months ago

When creating a new annotation, UI-locale gets silently switched back to DEFAULT_LANGUAGE, due to this line:

this.activeDocument.setup.language.ins.language.setValue(ELanguageType[DEFAULT_LANGUAGE]);

(in CVAnnotationsTask.createAnnotation())

Deleting the line exposes some undefined titles values which this commit fixes. It's pretty much the same as the outdated #203, but for annotations.

Should have no impact on users working in English.

gjcope commented 6 months ago

Hi @sdumetz thanks for the PR. This was the intended behavior, but I'm definitely open to discussion. Our thought was that annotations should always be created in the default language, with the option of adding additional language support. So if the primary application is French, I would change the default language. Is there a poor use case in this scenario? Just trying to understand the problem better.

sdumetz commented 6 months ago

Hi @gjcope, I understand it's logical from your perspective. However our deployments have no concept of "default language". For example we have a service running for 2 universities in Europe where users might work primarily either in french, in Dutch or in English. In Europe for most university, the native language AND English generally have to both be treated as "first class", with the default being chosen at the scene level rather than at the application level.

Maybe the language could be reverted to setup.language instead of DEFAULT_LANGUAGE? that would fit my use case.

My opinion is that the language switch is always a bit unsettling, even when it switches back to the "proper" (ie. scene's default) language. The change is a bit hard to notice for someone not paying close attention and I've seen a lot of users writing content in the wrong language due to this behavior.

gjcope commented 6 months ago

Thanks for the clarification and use case. That makes sense to me, but I would like to think on it a little more and run past other collaborators frequently working with multiple languages. What I want to avoid is annotations created without the primary scene language, not necessarily primary application language as you mentioned. @kgschoueri have you seen this as an issue with your multilingual users?

sdumetz commented 1 week ago

Closing as no longer a good solution: https://github.com/Smithsonian/dpo-voyager/pull/280 allows us to customize DEFAULT_LANGUAGE as needed.