Re: newToOldCategory in Database.cpp
Tobias Leupold <[email protected]> Sun, 11 Oct 2020 08:24:18 +0200
| Newsgroups | gmane.comp.kde.kimdaba |
|---|---|
| Message-ID | <1763236.tdWV9SEqCh@ginuog> |
Iirc, we needed this back then when we kicked out the localized categories. The original behavior was that e. g. "Locations" was passed through the translations mechanism and was displayed as e. g. "Orte" with a German locale (being actually called "Locations" though). This caused a lot of problems later on, so we decided to initialize the category names once in the currently used locale when the database is created and use this very name also in the database. As no l10n has been done anymore later on, a German speaking user would have seen "Locations" on-screen (the actual name) instead of the localized "Orte", so we had to move those category names once to their localized counterpart. It's been some years, but I think this code would still be needed if a quite old database was loaded with a recent version. Am Sonntag, 11. Oktober 2020, 02:29:52 CEST schrieb Robert Krawitz: > This appears to be to allow loading pre-version6 databases, where "Persons" > was renamed to "People" and "Locations" to "Places". But I can't find any > code that actually uses it; neither caller to createImageInfo passes > anything in here. > > Is that a bug, or is this something I can remove? There's some cleanup I > want to do in possibleLoadCompressedCategories() that might give us a > little bit of improvement, but the newToOldCategory might get in my way a > bit. It's not going to be a huge improvement; those are likely to be hard > to come by without a faster parser, but everything we can squeeze out in > startup is a good thing (startup is very noticeable). > _______________________________________________ > KPhotoAlbum mailing list > [email protected] > https://mail.kdab.com/mailman/listinfo/kphotoalbum