On Wed, Apr 16, 2008 at 12:02 AM, Philip Olson <[EMAIL PROTECTED]> wrote: > > On 15 Apr 2008, at 14:13, Derick Rethans wrote: > > > On Tue, 15 Apr 2008, Hannes Magnusson wrote: > > > > > > > I'd like to move the timezone appendix into the datetime extension > docs.. > > > > > > Any objections? > > > > > > > Not from me. > > > > Me either, as it seems like a good place for it although if it's being > moved then the file location should be moved too.
Done. I noticed few translations have that file translated - and unfortunately one of them is out of date. I see no reason for translations to translate it, like extensions.xml this file has static titles and notes, the only dynamic content there is the generated lists which cannot (and should not) be translated. As a fix for that I'd like to move the hardcoded text into entities (see attachment) and remove the translated files. Any objections to that? As an side-affect, the titles will have to change a bit. There are languages that do not phrase "List of timezones in the group <groupname>" the same, for instance in icelandic we would throw the <groupname> into the middle of the sentence ("Listi yfir <groupname> tÃmabelti") and in Japanese the sentence would start with the <groupname>. Therefore I'd like to remove the text and just keep the <groupname> as the title. Since these pages are under the timezone appendix it should be fairly obvious what those group mean and do should not cause any problem. -Hannes
Index: scripts/gen-phpdoc-tz-list.php =================================================================== RCS file: /repository/phpdoc/scripts/gen-phpdoc-tz-list.php,v retrieving revision 1.11 diff -u -p -r1.11 gen-phpdoc-tz-list.php --- scripts/gen-phpdoc-tz-list.php 1 Apr 2008 13:16:13 -0000 1.11 +++ scripts/gen-phpdoc-tz-list.php 20 Apr 2008 17:48:50 -0000 @@ -28,28 +28,19 @@ ?> <?php echo '<?'; ?>xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.11 $ --> -<!-- AUTO GENERATED, DO NOT MODIFY BY HAND --> +<!-- AUTO GENERATED, DO NOT TRANSLATE OR MODIFY BY HAND --> <appendix xml:id="timezones" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>List of Supported Timezones</title> - <para> - Here you'll find the complete list of timezones supported by PHP, which are - meant to be used with e.g. <function>date_default_timezone_set</function>. - </para> - <note> - <simpara> - The latest version of the timezone database can be installed via PECL's - <link xlink:href="&url.pecl.package.get;timezonedb">timezonedb</link>. - For Windows users, a pre-compiled DLL can be downloaded from the PECL4Win - site: <link xlink:href="&url.pecl.timezonedb.dll;">php_timezonedb.dll</link>. - </simpara> - </note> + &date.timezone.intro.title; + <sect1 xml:id="timezones.intro"> + &date.timezone.intro; + </sect1> <?php foreach ($groupedList as $group => $zones) { $m = count($zones) > 4 ? 5 : count($zones); ?> <sect1 xml:id="timezones.<?php echo strtolower($group); ?>"> - <title>List of timezones in the group <?php echo $group; ?></title> + <title><?php echo $group; ?></title> <table> <title><?php echo $group; ?></title> <tgroup cols="<?php echo $m; ?>"> @@ -78,10 +69,7 @@ </table> <?php if ( $group == 'Others' ) { ?> <warning> - <simpara> - Please do not use any of the timezones listed here (besides UTC), they - only exist for backward compatible reasons. - </simpara> + &date.timezone.bc; </warning> <?php } ?> </sect1> Index: en/language-snippets.ent =================================================================== RCS file: /repository/phpdoc/en/language-snippets.ent,v retrieving revision 1.220 diff -u -p -r1.220 language-snippets.ent --- en/language-snippets.ent 14 Apr 2008 17:28:03 -0000 1.220 +++ en/language-snippets.ent 20 Apr 2008 17:48:51 -0000 @@ -308,6 +308,22 @@ conn</parameter></term><listitem><para>A <function>m_initengine</function>.</para></listitem></varlistentry>'> <!-- Date and time entities --> +<!ENTITY date.timezone.intro.title '<title>List of Supported Timezones</title>'> + +<!ENTITY date.timezone.intro "<para> +Here you'll find the complete list of timezones supported by PHP, which are +meant to be used with e.g. <function>date_default_timezone_set</function>. +</para><note><simpara>The latest version of the timezone database can be +installed via PECL's <link xlink:href='&url.pecl.package.get;timezonedb' xmlns:xlink='http://www.w3.org/1999/xlink'>timezonedb</link>. +For Windows users, a pre-compiled DLL can be downloaded from the PECL4Win +site: <link xlink:href='&url.pecl.timezonedb.dll;' xmlns:xlink='http://www.w3.org/1999/xlink'>php_timezonedb.dll</link>. +</simpara></note>"> + +<!ENTITY date.timezone.bc '<simpara>Please do not use any of the timezones +listed here (besides UTC), they only exist for backward compatible reasons. +</simpara>'> + + <!ENTITY date.timezone.errors.description '<para> Every call to a date/time function will generate a <constant>E_NOTICE</constant> if the time zone is not valid, and/or a <constant>E_STRICT</constant> message @@ -910,3 +926,4 @@ The XMLWriter <type>resource</type> that method requires the &php.ini; setting <literal>phar.readonly</literal> to be set to <literal>0</literal> in order to work for <classname>Phar</classname> objects. Otherwise, a <classname>PharException</classname> will be thrown.</para></note>'> +