Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#32951 closed enhancement (wontfix)

Remove duplicates from /wp-admin/includes/continents-cities.php

Reported by: kanenas's profile kanenas Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: close 2nd-opinion
Focuses: Cc:

Description

Based on Wikipedia, I think that you should remove the lines 232, 243, 299, 302, 303 from the file

/wp-admin/includes/continents-cities.php
231: __('Ashgabat', 'continents-cities');
232: __('Ashkhabad', 'continents-cities');

Ashgabat (correct), Ashkhabad (duplicate) - https://en.wikipedia.org/wiki/Ashgabat

242: __('Chongqing', 'continents-cities');
243: __('Chungking', 'continents-cities');

Chongqing (correct), formerly Chungking (duplicate) - https://en.wikipedia.org/wiki/Chongqing

274: __('Makassar', 'continents-cities');
302: __('Ujung Pandang', 'continents-cities');

Makassar (correct) - https://en.wikipedia.org/wiki/Makassar, Ujungpandang (duplicate), Ujung Pandang (duplicate) - https://id.wikipedia.org/wiki/Ujungpandang

299: __('Thimbu', 'continents-cities');
300: __('Thimphu', 'continents-cities');

Thimphu (correct) formerly spelled Thimbu (duplicate) - https://en.wikipedia.org/wiki/Thimphu

303: __('Ulaanbaatar', 'continents-cities');
304: __('Ulan Bator', 'continents-cities');

Ulan Bator (correct), Ulaanbaatar (duplicate) - https://en.wikipedia.org/wiki/Ulan_Bator

Change History (12)

This ticket was mentioned in Slack in #polyglots by kosvrouvas. View the logs.


9 years ago

#2 follow-up: @dd32
9 years ago

Unfortunately these originals are currently required.

These strings appear in the Timezone DB that PHP uses, and although they may not be included in all versions of that (I have no idea what strings the latest version includes), they'll exist in some older versions. PHP uses the system timezonedb, and I've personally seen it using a 10+year old version before.

We could instead setup a alias for these though; Remove the original, and instead if it's encountered, return the translation for the correct term (ie. if ( $timezone === 'Ashkhabad' ) return 'Ashgabat';)

#3 in reply to: ↑ 2 @kanenas
9 years ago

Replying to dd32:

I thought so too! I mean it wouldn't be as easy as just removing these entries.
Although in /wp-admin/includes/continents-cities.php says...

/* Continent and city translations for timezone selection.
 * This file is not included anywhere. It exists solely for use by xgettext.
 */

This ticket was mentioned in Slack in #polyglots by kanenas. View the logs.


9 years ago

#5 @swissspidy
9 years ago

Based on Wikipedia […]

Is this really a good indicator? Wikipedia articles often use both spellings interchangeably.

#6 @xibe
9 years ago

  • Keywords close added

As discussed with Kanenas on Slack, the strings come from a standard body outside of WordPress, so we can't change the names. We can't even correct mistakes in them.

#7 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#8 @netweb
9 years ago

  • Version 4.2.2 deleted

#9 @pavelevap
9 years ago

Interesting, but when we have same translation for "Ashkhabad" and "Ashgabat", it is displayed only once in dropdown. So, duplicities can be probably handled by translators...

Other problem is sorting cities in dropdown, for example "Šanghaj" is bellow "Vladivostok" which is wrong for our language. But it will be probably dependent on server locale?

This ticket was mentioned in Slack in #polyglots by vitormadeira. View the logs.


7 years ago

#11 @vitormadeira
7 years ago

  • Keywords 2nd-opinion added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

PHP versions are being updated and the latest WordPress version will very soon be 4.8, so I thought that this might be reviewed once again.
Is there any kind of modifications on the PHP language that might help solving this situation, or things are just the same and the ticket must remain closed as wontfix?
Thank you

#12 @vitormadeira
7 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

Ok, just found that this problem is not even derived from an error on PHP itself. It seems that the timezone lists are supposed to be just like that, according to the IANA official table.

The origin of the duplicates might be related to an ancient political / local idiom question.

Although the best would be to delete one of them, I suppose that would be something up to the IANA responsability.

In my country, we speak Portuguese and it is totally OK for us to translate / transliterate the two as the very same one (duplicating the transliteration) following our language rules. I believe that for other locales, it would be OK as well.

As long as IANA don't change this list, I suppose it would stay like this and it is not a WordPress 'defect'.

Source list as of June, 2, 2017: http://www.iana.org/time-zones/repository/releases/tzdata2017b.tar.gz
Also, for future reference: https://www.iana.org/time-zones

Closing as "wontfix".

Note: See TracTickets for help on using tickets.