Project

General

Profile

Actions

bug #10305

closed

Add DB preference for term language

Added by Katja Luther about 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:

Description

Currently the language for terms can be set only in the local preferences, but should be available also for DB preferences.


Files

clipboard-202308301223-ng9mg.png (5.38 KB) clipboard-202308301223-ng9mg.png Andreas Müller, 08/30/2023 12:23 PM
clipboard-202309051755-u2flc.png (9.37 KB) clipboard-202309051755-u2flc.png Andreas Müller, 09/05/2023 05:55 PM

Related issues

Related to EDIT - bug #10307: Adapt comparator for feature list to use the language stringClosedKatja Luther

Actions
Related to EDIT - bug #10155: Preference for default language of shown representationsNewKatja Luther

Actions
Related to EDIT - bug #10375: Distribution status combo box does not always show correct Spanish valueClosedKatja Luther

Actions
Related to EDIT - bug #10374: Editing Spanish only term does not workClosedKatja Luther

Actions
Actions #1

Updated by Andreas Müller about 1 year ago

  • Description updated (diff)
Actions #2

Updated by Andreas Müller about 1 year ago

  • Priority changed from New to Highest
Actions #3

Updated by Andreas Müller about 1 year ago

  • Related to bug #10307: Adapt comparator for feature list to use the language string added
Actions #4

Updated by Andreas Müller about 1 year ago

  • Related to bug #10155: Preference for default language of shown representations added
Actions #5

Updated by Andreas Müller 12 months ago

  • Related to bug #10375: Distribution status combo box does not always show correct Spanish value added
Actions #6

Updated by Andreas Müller 12 months ago

  • Related to bug #10374: Editing Spanish only term does not work added
Actions #7

Updated by Katja Luther 12 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 40
Actions #8

Updated by Katja Luther 12 months ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Müller
  • Target version changed from Release 5.49 to Release 5.40
  • % Done changed from 40 to 60

This should be fixed, please review.

Actions #9

Updated by Andreas Müller 11 months ago

  • % Done changed from 60 to 70
Actions #10

Updated by Andreas Müller 11 months ago

  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 70 to 80

This generally works. I only wonder about the default value. I guess we should also allow "default" which then usually applies to English as English is the CDM default language (Language.DEFAULT()).

Actions #11

Updated by Andreas Müller 11 months ago

  • Tags set to preferences, i18n, mexico
  • Status changed from Resolved to Feedback
  • % Done changed from 80 to 70

I got an NPE after changing to another language:

last remote service : https://test.e-taxonomy.eu:443/cdmserver/rem_conf_am/remoting/preference.service
last remote method : getDbSchemaVersion
last remote request client time : 2023-08-29T19:24:27.183
last remote request response header time : Tue, 29 Aug 2023 17:24:28 GMT
client error time : 2023-08-29T19:24:27.231
login : admin
editor version : 5.40.0.202308291439
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.40.1.0.20230829
os : Windows Server 2019 10.0 amd64
java : 1.8.0_371
java.lang.NullPointerException
    at java.util.UUID.fromString(UUID.java:192)
    at eu.etaxonomy.taxeditor.preference.PreferencesUtil.getGlobalLanguage(PreferencesUtil.java:980)
    at eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement.getLabel(TermComboElement.java:375)
    at eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement.populateTerms(TermComboElement.java:308)
    at eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement.propertyChange(TermComboElement.java:414)
    at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:350)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:346)
    at eu.etaxonomy.taxeditor.preference.PreferencesUtil.firePreferencesChanged(PreferencesUtil.java:806)
    at eu.etaxonomy.taxeditor.databaseAdmin.preferencePage.LanguageRepresentationAdminPreferencePage.performOk(LanguageRepresentationAdminPreferencePage.java:53)
    at org.eclipse.jface.preference.PreferenceDialog$8.run(PreferenceDialog.java:905)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
Actions #12

Updated by Andreas Müller 11 months ago

The above happened after choosing "Eine nette Sprache" as term language in rem_conf_am and is reproducable.

Actions #13

Updated by Katja Luther 11 months ago

  • Status changed from Feedback to Resolved

This is fixed, the problem was the user defined language, this is handled correctly now.

Actions #14

Updated by Katja Luther 11 months ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #15

Updated by Andreas Müller 11 months ago

Did you also look at #10305#note-10 ?

Actions #16

Updated by Katja Luther 11 months ago

  • Status changed from Resolved to In Progress
  • Assignee changed from Andreas Müller to Katja Luther

Andreas Müller wrote in #note-15:

Did you also look at #10305#note-10 ?

Sorry, the setDefault method is still missing for this preference page, I will add it.

Actions #17

Updated by Katja Luther 11 months ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

Now setting default values works as well (for local preference the DB preference is used if available)

Actions #18

Updated by Andreas Müller 11 months ago

Katja Luther wrote in #note-17:

Now setting default values works as well (for local preference the DB preference is used if available)

Restoring default works now. However, what I meant was more the possibility to select that the default is used (which then should also be the default selection if the predicate is not explicitly set). Just like for other predicates like here:

Actions #19

Updated by Katja Luther 11 months ago

Andreas Müller wrote in #note-18:

Katja Luther wrote in #note-17:

Now setting default values works as well (for local preference the DB preference is used if available)

Restoring default works now. However, what I meant was more the possibility to select that the default is used (which then should also be the default selection if the predicate is not explicitly set). Just like for other predicates like here:

In this case I would think that the option to click on the "restore default" button is more intuitive and easier to find because the list of languages can be quite long.

Actions #20

Updated by Andreas Müller 11 months ago

Katja Luther wrote in #note-19:

Andreas Müller wrote in #note-18:

Katja Luther wrote in #note-17:

Now setting default values works as well (for local preference the DB preference is used if available)

Restoring default works now. However, what I meant was more the possibility to select that the default is used (which then should also be the default selection if the predicate is not explicitly set). Just like for other predicates like here:

In this case I would think that the option to click on the "restore default" button is more intuitive and easier to find because the list of languages can be quite long.

The restore button is always possible so the length is not an issue (and anyway the default entry should be at the beginning as always), but not having an explicit "default" entry in the list creates a lot of problem as discussed in the past. You can't distinguish then if the the value is set to e.g. English explicitly or if it is not set at all.
Also it is a question of consistency as we do it like this at all other places (for good reasons).

Actions #21

Updated by Katja Luther 11 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

This is implemented, please review.

Actions #22

Updated by Andreas Müller 11 months ago

  • Category changed from cdmlib to taxeditor
Actions #23

Updated by Andreas Müller 11 months ago

The languages are now duplicated and the default language is not shown (only '-'):

Actions #24

Updated by Andreas Müller 11 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 70 to 80
Actions #25

Updated by Katja Luther 11 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

the doubled entries and the correct default language are implemented

Actions #26

Updated by Andreas Müller 11 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

Andreas Müller wrote in #note-23:

... and the default language is not shown (only '-'):

this is still not fixed.

Also when I select "Default (-)" in the Db prefs and then go to local prefs the "Use Default({default lang})" entry shows still the previously selected language not the real default language (which usually should be English).

Actions #27

Updated by Andreas Müller 11 months ago

Andreas Müller wrote in #note-26:

Also when I select "Default (-)" in the Db prefs and then go to local prefs the "Use Default({default lang})" entry shows still the previously selected language not the real default language (which usually should be English).

This is because choosing default is not persisted (it should result in deleting the preference entry in the DB but it doesn't).

Actions #28

Updated by Katja Luther 11 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

Andreas Müller wrote in #note-27:

Andreas Müller wrote in #note-26:

Also when I select "Default (-)" in the Db prefs and then go to local prefs the "Use Default({default lang})" entry shows still the previously selected language not the real default language (which usually should be English).

This is because choosing default is not persisted (it should result in deleting the preference entry in the DB but it doesn't).

Now the default language is shown in drop down and also the default is persisted.

Actions #29

Updated by Andreas Müller 11 months ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 80 to 100

Now it seems to work as expected.

Actions

Also available in: Atom PDF