Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#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.
Comment | File | Size | Author |
---|---|---|---|
potx-timezone-identifiers.patch | 1.69 KB | Damien Tournoud |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedPostponed to #11077: Introduce Daylight Saving Time for Drupal.
Comment #2
mfbsubscribing
Comment #3
Gábor HojtsyLooks 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.
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedI 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.
Comment #5
Gábor HojtsyWell, 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.
Comment #6
jjkd CreditAttribution: jjkd commentedNote 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.
Comment #7
Gábor HojtsyUhm, 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?
Comment #8
jjkd CreditAttribution: jjkd commentedI'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.
Comment #9
mfbNew 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.
Comment #10
Gábor HojtsyI'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?
Comment #11
mfbIn the code comments of the patch above, _system_zonelist() was renamed to system_time_zones().
Comment #12
Gábor Hojtsy