Bug 203603 - Country names in digikam should come from iso_3166 GNU package
Summary: Country names in digikam should come from iso_3166 GNU package
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-MetadataEdit (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-12 20:06 UTC by Freek de Kruijf
Modified: 2016-07-18 04:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.5.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Freek de Kruijf 2009-08-12 20:06:44 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

DigiKam recently got a lot more messages to translate which are country names.
All these names are already in the GNU package iso_3166 where these names are translated also. I suggest to use this package and consequently the translations of this package and not introduce a lot more messages in digiKam to translate.
Comment 1 John Layt 2009-08-12 23:14:29 UTC
The country names are already available in translated from from KGlobal::locale()->countryCodeToName(QString countryCode).  You can use KGlobal::locale()->allCountriesList() to obtain a list of all Country Codes.  This assumes kdebase/runtime/i10n is installed which may not always be the case.
Comment 2 Freek de Kruijf 2009-08-12 23:49:14 UTC
This adheres my point that adding all these names to digiKam, which end up in digikam.pot, are not necessary.
Comment 3 Andi Clemens 2009-09-13 14:32:35 UTC
Gilles,

what about this one?
Comment 4 John Layt 2009-09-13 16:36:57 UTC
A small correction to my earlier point, kdebase/runtime is a prerequisite for all KDE apps, so you can always rely on the full list of translated country names being available from KLocale.
Comment 5 Médéric Boquien 2009-09-26 16:22:32 UTC
I fear that Digikam cannot use allCountriesList() if i believe the comment in digikam/libs/template/countryselector.cpp:

// We cannot use KLocale::allCountriesList() here because KDE only
// support 2 characters country codes. XMP require 3 characters country
// following ISO 3166 (http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html)

At least not until it support 3 characters country codes then.
Comment 6 Freek de Kruijf 2009-09-26 18:03:48 UTC
Now the list of countries in digiKam is rather limited. So I would suggest to use a translation table between the currently used two character country codes and the 3 character codes used in XMP. This avoids translation of country names in more than two places.
Comment 7 John Layt 2009-09-28 00:00:59 UTC
I've been looking for an excuse to add support for the 3 character code into KLocale, I'll try sort something out this week in time for 4.4.  Not immediately useful for you, but I'd agree with the code translation table idea for the interim rather than adding new translation strings.  I have a table of the entities currently supported in KDE and their various codes at kdebase/runtime/l10n/entities.ods if you need something to copy/paste.
Comment 8 caulier.gilles 2011-12-13 09:10:18 UTC
Freek,

This entry still valid ?

Gilles Caulier
Comment 9 Freek de Kruijf 2011-12-13 09:35:36 UTC
Yes, the names of the countries are now in kipiplugin_metadataedit.pot
Comment 10 caulier.gilles 2011-12-13 09:52:04 UTC
Right. 

In digiKam, Countries list has disappear due to factoring in libkexiv2.

This must be done too into MetadataEdito kipi-plugin.

Gilles Caulier
Comment 11 caulier.gilles 2011-12-13 11:37:54 UTC
Git commit 2e5176efad629443588b3dd77887b9fa89957051 by Gilles Caulier.
Committed on 13/12/2011 at 12:36.
Pushed by cgilles into branch 'master'.

remove country name/code definition and use factored list provided by libkexiv2
BUGS: 203603

M  +14   -283  metadataedit/iptc/iptcorigin.cpp
M  +10   -278  metadataedit/xmp/xmporigin.cpp

http://commits.kde.org/kipi-plugins/2e5176efad629443588b3dd77887b9fa89957051
Comment 12 Freek de Kruijf 2015-09-17 10:15:54 UTC
Thanks very much.