#11077: Introduce Daylight Saving Time for Drupal, when finally committed, will need translations of the timezones to be available.

Here we add them manually to common.inc.

CommentFileSizeAuthor
potx-timezone-identifiers.patch1.69 KBDamien Tournoud
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Status: Needs review » Postponed
mfb’s picture

subscribing

Gábor Hojtsy’s picture

Looks good. Please activate when the functionality hits core. Also:

- I'd love a comment on timezone_identifiers_list() that it is a PHP built-in function, not a Drupal function.
- potx.info needs a php = 5.1 addition, given that timezone_identifiers_list() was added in that version (or we can skip this is 5.1 is not available and make a hook_requirements() warning instead to note that the PHP the module is running on is not fully capable of parsing Drupal 7 stuff).

Note that in the last case, although Drupal 7 requires the needed PHP version already, potx on Drupal 5 or 6 might parse a Drupal 7 module, so we need to handle this case.

Damien Tournoud’s picture

I guess having a 5.1 requirement to the whole potx module is not too big a deal. So Gabor, if you agree I'll follow this route.

Gábor Hojtsy’s picture

Well, we have seen people running l10n_server (dependent on potx) on PHP 4. Not a good practice, so I would not encourage them. I am just trying to not put the translators at a disadvantage if they are not technical enough to update / request an update of their PHP version. Otherwise I agree we should be fine with depending on PHP 5.1.

jjkd’s picture

Note that there is a dependency from PHP upstream to the tz/Olson database, so the exact list of strings generated can be dependent on the particular version of PHP in use, and/or whether the PHP installation has been updated to a newer tz database via PECL. Not sure how important this is, or what might need to be done about it (if anything), but I wanted to make sure it was known.

Gábor Hojtsy’s picture

Uhm, that means that each Drupal instance would possibly have a different list of timezones to display/translate? How can we solve translation of those then?

jjkd’s picture

I'll preface this with the comment that I don't have much experience in translation, but I expect that the list of 'locations' (which is our only concern for translation) changes relatively slowly as compared to the rest of the data in the database. Even when there is a change, usually only a few strings are added, possibly a few removed as well. For the pot files maintained here, we can try to make sure we have the 'superset/most recent' list. For translators who create their own pot files, would they be able to use the appropriate core pot file that includes this list?

There is also a source of existing translations for this data here: http://translate.fedoraproject.org/module/system-config-date

Would it be possible to pick up and merge their translations as part of a process/workflow? That project has been tracking this data and doing translations for several years, they might be able to provide some useful suggestions regarding workflow as well.

The primary source for this data is here: http://www.twinsun.com/tz/tz-link.htm, the current version is 2008i (this indicates the ninth revision this year). I would expect that the previous versions are available somewhere, to compare and assess how much thrashing in there is in the strings.

mfb’s picture

New or updated time zones are periodically added but I'm pretty sure PHP never removes a time zone, for backward compatibility reasons.

You can see how often time zone updates are made in PHP here http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/timezonedb.h?view=log and as was mentioned PECL can override this db with a more up-to-date version without a PHP upgrade.

Gábor Hojtsy’s picture

Status: Postponed » Needs review

I've seen that timezone support landed. Someone knowledgeable with the final patch can please shed some light on what support should potx give to timezones?

mfb’s picture

Status: Needs review » Needs work

In the code comments of the patch above, _system_zonelist() was renamed to system_time_zones().

Gábor Hojtsy’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev