Discussion:
Localization of category names
Tobias Leupold
2014-06-28 10:40:18 UTC
Permalink
Hi list!

I think I found a bug in the localization of standard category names.

DB::Category::standardCategories() represents a set of translated names for
standard categories that can be used by DB::Category::text() so that "If one
person from say Denmark sends a database to a person from say germany, then
the title of People, Places, and Events will still be translated correct, when
this function is used".

When creating a new database, this mechanism seems to be short-circuited by
XMLDB::FileReader::readConfigFile(), as the default category names are
translated and then stored, cf. lines 385ff:

str = str.replace( QString::fromLatin1( "People" ), i18n( "People" ) );
str = str.replace( QString::fromLatin1( "Places" ), i18n( "Places" ) );
str = str.replace( QString::fromLatin1( "Events" ), i18n( "Events" ) );

Creating e. g. a new database with the locale set to German, I get a database
containing the translated category names:

<Category name="Ereignisse" ...
<Category name="Orte" ...
<Category name="Personen" ...

With these tree lines commented out, I get the un-translated category names in
the database:

<Category name="People" ...
<Category name="Folder" ...
<Category name="Tokens" ...

but still the translated ones in the GUI. So I think we should leave out those
three lines, cf.
https://github.com/l3u/kphotoalbum/commit/d726c08197709785c07d0c51916e0b1afe32d312

Tobias
Tobias Leupold
2014-07-05 11:28:57 UTC
Permalink
Hi list!

Has anybody already had a look at the category name localization issue (cf.
https://mail.kdab.com/pipermail/kphotoalbum/2014-June/005379.html )?

I reworked my github copy of KPA, so the posted link isn't valid anymore,
sorry ... (but we only talk about three lines to remove, so I think it's okay
;-)

Meanwhile, I kindly received a KDE dev account from the Digikam/libkface guys,
so I gladly can push this change myself if you want. But I would never do so
without the approval from you "real" KPA devs.

So ... what do you think?
Miika Turkia
2014-07-06 02:21:55 UTC
Permalink
Sounds good to me. This should be quite a safe change (if you have tested
it properly) as it only affects new databases and does not mess with old
ones. Feel free to push it.

miika
Post by Tobias Leupold
Hi list!
Has anybody already had a look at the category name localization issue (cf.
https://mail.kdab.com/pipermail/kphotoalbum/2014-June/005379.html )?
I reworked my github copy of KPA, so the posted link isn't valid anymore,
sorry ... (but we only talk about three lines to remove, so I think it's okay
;-)
Meanwhile, I kindly received a KDE dev account from the Digikam/libkface guys,
so I gladly can push this change myself if you want. But I would never do so
without the approval from you "real" KPA devs.
So ... what do you think?
_______________________________________________
KPhotoAlbum mailing list
https://mail.kdab.com/mailman/listinfo/kphotoalbum
Continue reading on narkive:
Loading...