Project

General

Profile

Actions

bug #10107

closed

i18n bug when editing media not having a default language title

Added by Andreas Müller over 1 year ago. Updated over 1 year ago.

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

100%

Estimated time:
Severity:
normal
Found in Version:

Description

copied from #9007#note-11

i18n editing of the title is not available here, and to me it looks like when editing the record always a title record in the default language is created, this is unwanted if a title in another language exists already; either we always offer i18n support in such a case or we disable the field for editing - I realized this when using media in salvador database for media specimen. The media there use Latin as title language (as the title shows mostly the taxon name and author of reference) and Spanish for the description. Especially for the title this leads to unwanted results after saving the data as also the titleCache changes then


Related issues

Related to EDIT - bug #10108: Description for MediaSpecimen not shown even if it exists (i18n)ClosedKatja Luther

Actions
Copied from EDIT - bug #9007: Enable i18n support for media description UIClosedKatja Luther

Actions
Actions #1

Updated by Andreas Müller over 1 year ago

  • Copied from bug #9007: Enable i18n support for media description UI added
Actions #2

Updated by Andreas Müller over 1 year ago

priority needs to be discussed

Actions #3

Updated by Andreas Müller over 1 year ago

  • Tags changed from i18n, salvador to i18n, salvador, media
Actions #4

Updated by Andreas Müller over 1 year ago

  • Related to bug #10108: Description for MediaSpecimen not shown even if it exists (i18n) added
Actions #5

Updated by Katja Luther over 1 year ago

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

This should be fixed,please review

Actions #6

Updated by Andreas Müller over 1 year ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 0 to 50

This is mostly fixed. i18n editing works. Also, if no i18n support is switched on (and English is the application language) an existing title in another language is still shown which is correct.

However, in this case it is partly possible to edit the data. This could be discussed because the user does not know that the text is stored under another language. He/She might therefore write a new text in the incorrect language. Better would be to show a warning that the text is not written in the default language but in language xxx. Even better would be to make the text ineditable in this case and warn that i18n support needs to be switched on to edit this text.
Or even still better would be to automatically switch on i18n support in this case at this place to automatically show the correct language and to allow editing in which language is preferred (this is what is meant by "either we always offer i18n support in such a case or we disable the field for editing" in the description part of this ticket).

If this is difficult to implement we may create a new ticket to be able to close this one here as the current implementation is already much better then before (but still a bit dangerous and therefore needs improvement).

Actions #7

Updated by Andreas Müller over 1 year ago

Please also cleanup code in MultilanguageTextElement if possible as you commited a couple of commented lines (still needed?)

Actions #8

Updated by Andreas Müller over 1 year ago

Andreas Müller wrote in #note-6:

...
However, in this case it is partly possible to edit the data.

With partly I mean that I realized that changes are not automatically stored in this case. Only if I do run "search" again the changes are persisted and the bulkeditor title is synchronized with the new title. This needs to be fixed.

Actions #9

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-8:

Andreas Müller wrote in #note-6:

...
However, in this case it is partly possible to edit the data.

With partly I mean that I realized that changes are not automatically stored in this case. Only if I do run "search" again the changes are persisted and the bulkeditor title is synchronized with the new title. This needs to be fixed.

It is stored if you save. And after save a new search is done automatically. And if you search, the changes are saved (with asking if it should be saved)

Actions #10

Updated by Katja Luther over 1 year ago

Now it is implemented in the way that if there is no entry for the default language in "not multilanguage environment" then the multilanguage elements are shown. The version with disabling the text field is a little bit confusing, I think.

Actions #11

Updated by Katja Luther over 1 year ago

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

Updated by Andreas Müller over 1 year ago

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

Katja Luther wrote in #note-9:

Andreas Müller wrote in #note-8:

Andreas Müller wrote in #note-6:

...
However, in this case it is partly possible to edit the data.

With partly I mean that I realized that changes are not automatically stored in this case. Only if I do run "search" again the changes are persisted and the bulkeditor title is synchronized with the new title. This needs to be fixed.

It is stored if you save. And after save a new search is done automatically. And if you search, the changes are saved (with asking if it should be saved)

This is how it should be but it isn't. What I did in media bulkeditor:

  • Search for qqqq (in rem_conf_am/ Media) => 1 Media found with language "Eine nette Sprache" and titel "qqqqqrrrr"
  • Change title in details view to qqqqqrrraaaa => only details view label changed
  • Saved => still nothing changed
  • click search button again => details view label and title reverted to "qqqqqrrrr"
  • change title in details view again to "qqqqqrrraaaa" => now not only details view label but also bulk editor "Media" column changes and save etc. works as expected

The 2nd change title works as expected, but why does it not work like this when I change title the first time?

Actions #13

Updated by Andreas Müller over 1 year ago

Katja Luther wrote in #note-10:

Now it is implemented in the way that if there is no entry for the default language in "not multilanguage environment" then the multilanguage elements are shown. The version with disabling the text field is a little bit confusing, I think.

What, if no title exists at all. It looks like i18n is shown then, too, but there is no reason for this. It should only be shown if there is no default language but there is at least any other language representation.

Actions #14

Updated by Katja Luther over 1 year ago

Andreas Müller wrote in #note-13:

Katja Luther wrote in #note-10:

Now it is implemented in the way that if there is no entry for the default language in "not multilanguage environment" then the multilanguage elements are shown. The version with disabling the text field is a little bit confusing, I think.

What, if no title exists at all. It looks like i18n is shown then, too, but there is no reason for this. It should only be shown if there is no default language but there is at least any other language representation.

Andreas Müller wrote in #note-12:

Katja Luther wrote in #note-9:

Andreas Müller wrote in #note-8:

Andreas Müller wrote in #note-6:

...
However, in this case it is partly possible to edit the data.

With partly I mean that I realized that changes are not automatically stored in this case. Only if I do run "search" again the changes are persisted and the bulkeditor title is synchronized with the new title. This needs to be fixed.

It is stored if you save. And after save a new search is done automatically. And if you search, the changes are saved (with asking if it should be saved)

This is how it should be but it isn't. What I did in media bulkeditor:

  • Search for qqqq (in rem_conf_am/ Media) => 1 Media found with language "Eine nette Sprache" and titel "qqqqqrrrr"
  • Change title in details view to qqqqqrrraaaa => only details view label changed
  • Saved => still nothing changed
  • click search button again => details view label and title reverted to "qqqqqrrrr"
  • change title in details view again to "qqqqqrrraaaa" => now not only details view label but also bulk editor "Media" column changes and save etc. works as expected

The 2nd change title works as expected, but why does it not work like this when I change title the first time?
This was a problem of missing selection in bulkeditor, this should be fixed now. Please review.

Actions #15

Updated by Katja Luther over 1 year ago

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

Updated by Andreas Müller over 1 year ago

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

Seems to work as expected, now.

Actions

Also available in: Atom PDF