Bug 308078

Summary: Caption in non-default language not saved to JPEG when x-default is empty
Product: [Applications] digikam Reporter: Milan Knížek <knizek>
Component: Metadata-XmpAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 2.9.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 3.0.0

Description Milan Knížek 2012-10-08 14:55:42 UTC
When adding caption (description) to images in other languages than x-default, then these captions are not saved to image (JPEG). However, once a caption for the x-default language is added, _all_ the existing language variants of the caption are saved to the file.

Reproducible: Always

Steps to Reproduce:
1. Use a new message w/o any metadata. Make user saving of metadata to images is allowed.
2. Choose af-ZA language for Caption. Type in some caption. Click apply.
3. Switch to CLI and run `exiv2 -pa image.jpg  | grep -E "Xmp.dc.description|Xmp.digiKam.CaptionsAuthorNames|Xmp.digiKam.CaptionsDateTimeStamps"`
4. Note that only (!) data in the latter two keys will exist.
5. In digiKam, add some caption to "x-default" language and Apply.
6. Switch to CLI and run the exiv2 command again.
7. This time, Xmp.dc.description has some values for both af-ZA and x-default languages.
Actual Results:  
Without some text in x-default language of Caption (Description), no description is saved to image.

Expected Results:  
Description should be saved to image no matter which languages are used.
Comment 1 Marcel Wiesweg 2012-10-26 10:40:16 UTC
Setting the Exif comment (which is using only the x-default comment, and is removed if only a specific language is added) failed although it should not
Comment 2 Marcel Wiesweg 2012-10-26 10:40:37 UTC
Git commit 540a04b40389a82802f824e65e1038dd7b2b7e1e by Marcel Wiesweg.
Committed on 26/10/2012 at 12:38.
Pushed by mwiesweg into branch 'master'.

Do not forget to return true, and thus fail, when removing the exif comment.

M  +2    -1    libkexiv2/kexiv2exif.cpp

http://commits.kde.org/libkexiv2/540a04b40389a82802f824e65e1038dd7b2b7e1e