D14163: Fix translation of country names

Volker Krause noreply at phabricator.kde.org
Mon Jul 16 17:51:33 BST 2018


vkrause added a comment.


  In D14163#293194 <https://phabricator.kde.org/D14163#293194>, @pino wrote:
  
  > I noticed the recent changes in this file, so time to chime in.
  >  This approach only works if each English text (which happens to be the very first for each country, so that's why `ISOtoCountry()` "works") is **exactly** the same (including capitalization) as the country name specified in iso-codes. Also considering the history of this file, it is very much likely to miss changes done in the latest years...
  >
  > IMHO this code is simply beyond any repair -- users ought to use iso-codes for these tasks, and not just the catalogs but also the JSON/XML files for all the mappings.
  >
  > I have locally a prototype of library that uses only QtCore, QtXml, and KI18n for reading iso-codes data; I can publish it somewhere, and fix these issues once and for all.
  
  
  You are right, there are definitely more problems in this code.
  
  Replacing the data table currently in use here is next on the list, it's indeed heavily outdated. I'm not sure the iso-codes xml/json files are directly usable for this though, as this code can also map localized country names to ISO codes.
  This change is indeed not perfect in case the spelling doesn't match exactly, but that seems to be the exception. So it's still a low-risk step forward IMHO.
  
  Should this functionality become available elsewhere, e.g. in KF5, porting KContacts to that is of course an option too :)

REPOSITORY
  R174 PIM: KContacts

REVISION DETAIL
  https://phabricator.kde.org/D14163

To: vkrause, mlaurent, pino
Cc: pino, kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180716/fbba0b8e/attachment.html>


More information about the kde-pim mailing list