Bug 119738 - Image caption, inconsistency: caption for images is now "figure" and no longer "illustration"
Summary: Image caption, inconsistency: caption for images is now "figure" and no longe...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.1 rc
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords: needsDevEval
Depends on:
Blocks: Writer-Images Caption
  Show dependency treegraph
 
Reported: 2018-09-06 20:12 UTC by Gerhard Weydt
Modified: 2018-11-08 09:29 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
demo_image_illustration (91.08 KB, application/vnd.oasis.opendocument.text)
2018-09-07 08:43 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Weydt 2018-09-06 20:12:13 UTC
It seems that a new category "figure" was introduced in 6.1 for captions (see also bug 58407, where this was proposed, and, looking at the comments, obviously was realised in some way).
But now there is the problem that documents created in an older version still use "illustration", so if you add new images, they get a different category, and the numbering starts again with 1.

Steps to reproduce:
create a Writer document in 6.0 or earlier
insert an image and add a caption to it; the caption will be of category "illustration", the number will be 1.
save the document and close it.
now open it in 6.1 or 6.2, insert another image and add a caption: the category will be "figure", the number will be 1 again.

I have tested that with several versions of 6.1 and with 6.2.0.0alpha.

If I look at the menu item Insert -> Field -> More Fields... -> Number Range I see both figure and illustration; the intent of bug 58407, as I understand, was to *change* the name, not to add another category.

This will certainly cause many troubles when people start using 6.1 to a major extent, including LibreOffice's own documentation.
Comment 1 BogdanB 2018-09-07 04:04:39 UTC
Confirm it with LO in romanian
- LO 6.0 ”1. Ilustratie” , meaning Illustration
- LO 6.2 ”1. Figure”

So, I have 2 pictures, but twice the number 1.
Comment 2 Oliver Brinzing 2018-09-07 08:43:43 UTC
Created attachment 144732 [details]
demo_image_illustration

confirming, see attachment for details
Comment 3 Xisco Faulí 2018-09-10 13:50:48 UTC
Yep, I agree it might cause many problem if old versions are open in LibreOffice 6.1 or higher...
Another inconsistency I've found is that autocaption still uses 'Illustration' while inserted pictures are called 'Figure'

Adding UX Team and CC people from bug 58407 to the loop
Comment 4 Heiko Tietze 2018-09-10 16:08:09 UTC
Don't see this as a big problem. You can always enter your own caption, we just switch the default.
Comment 5 BogdanB 2018-09-11 00:57:52 UTC
(In reply to Heiko Tietze from comment #4)
> Don't see this as a big problem. You can always enter your own caption, we
> just switch the default.

It's just a problem of numbering. You have Figure 1, than Ilustration 1, than Figure 2, than Ilustration 2, depending what version of LO we use for inserting Figure or Ilustration.

If we have a big document the Navigator menu will show for Image a repeatable numbering. 

Instead of:
Figure 1.
Figure 2.
Figure 3.
Figure 4.

Will be:
Figure 1.
Ilustration 1.
Figure 2.
Ilustration 2.

It's a bit confusing for people using the Navigator menu and big documents.
Comment 6 Heiko Tietze 2018-09-11 06:06:37 UTC
(In reply to BogdanB from comment #5)
> It's just a problem of numbering. You have Figure 1, than Ilustration 1,
> than Figure 2, than Ilustration 2, depending what version of LO we use for
> inserting Figure or Ilustration.

Sure, but what options do we have? I'm strongly against reverting as Figure is the standard term used in scientific publications. Adding some code to check what caption has been used in the current document? Difficult since you intentionally can have both Illustration and Figure. So I vote for the third door with the zonk. Meaning you have to be careful and change the caption in non-standard documents. 

Besides I wonder why you accepted Illustration as caption. Wouldn't it make more sense to switch those labels to Figure?
Comment 7 Gerhard Weydt 2018-09-11 12:06:57 UTC
For other languages this is an even more complicated problem. In German, for example, figure and illustration are translated with the same expression "Abbildung". The result is that an image caption inserted with version 6.1 gets no number at all. The same happens in Dutch with "Aafbeeldingen". You have to dig deep to understand what is going wrong.
French and Italian have two different translations, so they have "only" the same problem as english texts.
Now, in contrast to Heiko's statement in comment #4, it is a problem to know which of the two styles is the correct one, as they have the same name. And for both of them no number is provided (tested in German only)!
If you have an old document with many illustrations - as in my case the LibO handbook "First Steps" I'm working on - you have to change all captions to the new default, and I couldn't find another way to do that than deleting the caption and settin a new. Keeping the old style would be dangerous, because the next person working with the document wil have the same problem.
I fear that these problems will happen to a good many people, and many will not even know what is wrong because they will not be able to find out the reason. This is a desastrous effect for LibreOffice!
I think that on opening a document with captions in the old style there should be a warning message with the choice to convert to the new style.
Comment 8 Heiko Tietze 2018-09-11 13:54:53 UTC
(In reply to Gerhard Weydt from comment #7)
> For other languages this is an even more complicated problem. 

Sophie, this affects l10n. I think the two terms need different translation as long numbering is based on the literal string.
Comment 9 Gerhard Weydt 2018-09-11 21:57:08 UTC
Maybe it is easier to partially revert the changes caused by bug 58407 and described there, by not introducing a new "style" (it must be something more than that) and whatever else is comprised, but only renaming the caption text (old "illustration", new "figure") and hopefully also renaming the style. This is only a suggestion for a possible way of solving the dilemma, as I am not able to judge the source code, notwithstanding that I don't know how to find it.
Comment 10 Cor Nouws 2018-09-12 13:04:07 UTC
this definitely is a nightmare for people working on reports, started in a version < 6.1, and then continue in >=6.1
High and Major are definitely right.

(In reply to Heiko Tietze from comment #8)
> Sophie, this affects l10n. I think the two terms need different translation
> as long numbering is based on the literal string.

It deserves a better solution then seeing localization forced to choose unnatural /strange wordings ;)
Comment 11 sophie 2018-09-12 13:37:05 UTC
(In reply to Cor Nouws from comment #10)
> this definitely is a nightmare for people working on reports, started in a
> version < 6.1, and then continue in >=6.1
> High and Major are definitely right.
> 
> (In reply to Heiko Tietze from comment #8)
> > Sophie, this affects l10n. I think the two terms need different translation
> > as long numbering is based on the literal string.
> 
> It deserves a better solution then seeing localization forced to choose
> unnatural /strange wordings ;)

Yes, and it's not a l10n issue here, changes should ensure retro compatibility with legacy documents which is the purpose of this bug. If the patch broke the feature then it needs to be reverted until a better solution is found. Sophie
Comment 12 Heiko Tietze 2018-09-13 06:25:39 UTC
Reverting is not an option. We can keep the last used caption enabled over sessions. Or store it with the template. And having no caption in the template like it is the fact for legacy documents we could go with Illustration.
Comment 13 Xisco Faulí 2018-09-13 09:09:43 UTC
Just for the record, same happens if we insert figures, tables, etc... with a language UI and then more figures, tables, etc... are inserted with a different language UI, They will be added to different categories as the naming is different.
So as I understand it, LibreOffice creates the categories depending on the name and not on the element.
The language problem is reported in bug 44451. I believe if bug 44451 got fixed, this one would get fixed as well...
Comment 14 Cor Nouws 2018-09-13 13:48:27 UTC
(In reply to Xisco Faulí from comment #13)

> The language problem is reported in bug 44451. I believe if bug 44451 got
> fixed, this one would get fixed as well...

Good chance.
And that makes putting energy in a intermediate solution (retain caption used by getting it from the document) less likely?
Comment 15 Gerhard Weydt 2018-09-16 19:25:27 UTC
I think that setting the default - at least temporarily, until a complete solution is found - will help us to get rid of most of the problems:
Legacy documents can then be edited without problems. I think that nearly everyone simply calls the dialog, adds the caption and then presses Enter, without looking at the listbox for the category, as the proposed choice was always correct in the past.
On the other hand, I think there will be very few new documents already created in 6.1 or 6.2, in relation to the many legacy documents, so there will be only a small number of people who will have a problem.
In addition, this would solve the problem for languages like German and Dutch, where there is the problem of the same translation for the two categories.
We also should not forget that the introduction of the new category is not a functional enhancement but only an - in my eyes ill-conceived - attempt to remedy a bad choice for an expression in the english version.

By the way, I said in comment 7 that you would have to delete the caption and set a new one. That was badly expressed: you have to copy the image, set the caption and delete the old frame, which will also delete image and caption.
Comment 16 Cor Nouws 2018-10-07 19:30:29 UTC
(In reply to Heiko Tietze from comment #12)
> Reverting is not an option. We can keep the last used caption enabled over
> ..

Ehh, why not, since it's not about reverting, but:

(In reply to sophie from comment #11)
> .. If the
> patch broke the feature then it needs to be reverted until a better solution
> is found. Sophie

.. temporary putting aside, until there is a solution in place that saves the users head ache?!
Comment 17 Cor Nouws 2018-10-07 19:58:39 UTC
(In reply to Gerhard Weydt from comment #15)
> I think that setting the default - at least temporarily, until a complete
> solution is found - will help us to get rid of most of the problems:

I tried to look at this for Dutch.
- Created a file in 6.0.x with a caption "Afbeeldingen "
- Add an image in 6.1.x and start adding a caption;
  - there are two choices "Afbeeldingen"
  - but the use of both, results in a caption without number
  - I'm even unable to get a numbered caption added
  > so there seems to be no difference, for the handling by LibreOffice anyway, in the two instances of 'Afbeelding' that are offered in the list in 6.1.x

But apart from that: can you explain how to set the default? I think I missed that. Thanks,
Comment 18 Gerhard Weydt 2018-10-07 21:11:10 UTC
(In reply to Cor Nouws from comment #17)
> (In reply to Gerhard Weydt from comment #15)
...
> But apart from that: can you explain how to set the default? I think I
> missed that. Thanks,

Cor, you didn't miss anything. The default ist set by LibreOffice, and my suggestion was that this should be changed, at least as long as there is is no proper solution for the problem.
If we could change the default ourselves, things would be easier.
Comment 19 Cor Nouws 2018-10-27 06:26:33 UTC
Problem still exists.
I suggest to revert the path that caused this. We lived ages with the wrong wording. Improving that in a way that cause users who have no clue a PITA, is not the way to go, I suggest. 
keyword says needsDevEval. Will be on ESC agenda if we want?
Comment 20 Heiko Tietze 2018-10-27 09:11:54 UTC
First patch is here https://gerrit.libreoffice.org/#/c/60787/ having some issues. We need an experienced developer to mentor Nickson.
Comment 21 Cor Nouws 2018-10-27 21:46:11 UTC
(In reply to Heiko Tietze from comment #20)
> First patch is here https://gerrit.libreoffice.org/#/c/60787/ having some
> issues. We need an experienced developer to mentor Nickson.

ah good news - thanks!
Comment 22 Heiko Tietze 2018-11-08 09:29:42 UTC
Documents containing Illustration will keep this caption as user setting, newly created documents get Figure.
Comment 23 Commit Notification 2018-11-08 09:29:52 UTC
Nickson committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c399d0715f6d3fe16896af8d1f85e66855e17402%5E%21

tdf#119738 - Set default image caption to illustration if already being used

It will be available in 6.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.