Review Request 113850: Update the Places Panel entries when switching the language

Frank Reininghaus frank78ac at googlemail.com
Thu Nov 14 08:43:16 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113850/
-----------------------------------------------------------

Review request for Dolphin and Burkhard Lück.


Repository: kde-baseapps


Description
-------

Currently, we store the translated "Places" in .kde4/share/apps/kfileplaces/bookmarks.xml. This is not intentional - it only happens because PlacesItem::updateBookmarkForRole(const QByteArray& role) always stores the translated text (returned by PlacesItem::text()) in the KBookmark.

This can be fixed by first checking if the text() is equal to the translation of the text that is already stored in the KBookmark, and not updating it in that case. Note that we have to make sure that all "Places"-related use the same context "KFile System Bookmarks" to make that work.

The first version of the patch (see https://bugs.kde.org/show_bug.cgi?id=319282#c11) had a small problem: the "Places" texts would be reset to the en_US values on first use after less than a second. This was caused by PlacesItem::setBookmark(const KBookmark& bookmark), which reset the PlacesItem's values to the ones from the untranslated bookmark, even if the bookmark had not changed at all. This is fixed by the new check in that function.


Diffs
-----

  dolphin/src/panels/places/placesitem.cpp 76b51e3 

Diff: http://git.reviewboard.kde.org/r/113850/diff/


Testing
-------

Fixes the bug for me - now it always shows the correct translation for me even after switching the language, at least if I delete the file .kde4/share/apps/kfileplaces/bookmarks.xml initially (it still had the translated value from the buggy old version written to it).


Thanks,

Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20131114/5b96dcef/attachment.htm>


More information about the kfm-devel mailing list