Re: [PHP-DOC] build failure [de]
Gabor Hojtsy wrote: OK, why display the para extra, while you only need to see the missing IDs themselfs? Thanks for the hint. Otherwise if this works fine, I am all for having it comitted. As I can tell it works, just comitted. Friedhelm
Re: [PHP-DOC] build failure [de]
Gabor Hojtsy wrote: Fine with me, but we should place missing; at top of missing-ids.xml So the following should be the solution for this problem: missing-ids.xml: missing; para id=ini.com.allow-dcom xreflabel=ini.com.allow-dcom/para and put missing; in language-snippets.ent. Benefit: linking to appendix missing-stuff with a short explanation is working again ;-) I actually meant that every xreflabel (so every link generated for missing content) would include the translated version of the word missing, so that even before clicked a user (an experienced user at least) would know that it is not really benefical to click that link. Sorry for the late response. Entities in attribut values are not allowed. See the attached patch against missing-entities.php.in for xreflabel-support. Friedhelm Index: missing-entities.php.in === RCS file: /repository/phpdoc/scripts/missing-entities.php.in,v retrieving revision 1.19 diff -u -r1.19 missing-entities.php.in --- missing-entities.php.in 21 Aug 2005 16:27:08 - 1.19 +++ missing-entities.php.in 14 Sep 2005 18:44:45 - @@ -93,7 +93,9 @@ // missing ID found else if (strpos($line, non-existent) !== FALSE) { -$missing_ids[] = preg_replace(!^.* ID !, para id=, $line) . /para\n; + preg_match('!(?=ID.).+!', $line, $id); +$missing_ids[] = para id= . $id[0] . xreflabel= . $id[0] . /para\n; +$missing_ids_display[]=para id= . $id[0] . /para\n; } } @@ -105,6 +107,10 @@ sort($missing_ids); sort($missing_entities); +// missing ids for display +$missing_ids_display=array_unique($missing_ids_display); +sort($missing_ids_display); + // Write out missing entities to file foreach ($missing_entities as $ent) { fwrite($ment, $ent); @@ -137,8 +143,8 @@ } echo \nCreated file: @LANGDIR@/missing-ids.xml\n; -if (!empty($missing_ids)) { -foreach ($missing_ids as $k = $v) { +if (!empty($missing_ids_display)) { +foreach ($missing_ids_display as $k = $v) { echo * . preg_replace('@[\s]+@', ' ', $v) . \n; } } else {
Re: [PHP-DOC] build failure [de]
OK, why display the para extra, while you only need to see the missing IDs themselfs? Otherwise if this works fine, I am all for having it comitted. Goba Sorry for the late response. Entities in attribut values are not allowed. See the attached patch against missing-entities.php.in for xreflabel-support. Friedhelm Index: missing-entities.php.in === RCS file: /repository/phpdoc/scripts/missing-entities.php.in,v retrieving revision 1.19 diff -u -r1.19 missing-entities.php.in --- missing-entities.php.in 21 Aug 2005 16:27:08 - 1.19 +++ missing-entities.php.in 14 Sep 2005 18:44:45 - @@ -93,7 +93,9 @@ // missing ID found else if (strpos($line, non-existent) !== FALSE) { -$missing_ids[] = preg_replace(!^.* ID !, para id=, $line) . /para\n; + preg_match('!(?=ID.).+!', $line, $id); +$missing_ids[] = para id= . $id[0] . xreflabel= . $id[0] . /para\n; +$missing_ids_display[]=para id= . $id[0] . /para\n; } } @@ -105,6 +107,10 @@ sort($missing_ids); sort($missing_entities); +// missing ids for display +$missing_ids_display=array_unique($missing_ids_display); +sort($missing_ids_display); + // Write out missing entities to file foreach ($missing_entities as $ent) { fwrite($ment, $ent); @@ -137,8 +143,8 @@ } echo \nCreated file: @LANGDIR@/missing-ids.xml\n; -if (!empty($missing_ids)) { -foreach ($missing_ids as $k = $v) { +if (!empty($missing_ids_display)) { +foreach ($missing_ids_display as $k = $v) { echo * . preg_replace('@[\s]+@', ' ', $v) . \n; } } else {
Re: [PHP-DOC] build failure [de]
The problem is the increased usage of xref. Previously authors were encouraged to use link to add internal links, which requires text content, so this was no problem. The adoption of xref lead to this problem. Should we avoid using xref? I don't think so that now it is an option. It is quite convinient in places like the extensions.xml file, where generated content is automatically translated with the titles, and this is the intention of using xref elsewhere too. Less work for translators to look up how exactly they translated some titles = more consistency in translations. 1. What would we put into para xreflabel=... in place of the dots in the missing-ids.xml file? The proper link-test? Sure, this depends on the content of the id=.. For the example para id=ini.com.allow-dcom this would become para id=ini.com.allow-dcom xreflabel=com.allow_dcom For ini stuff, this works because of some strict rules for naming. Otherwise we might not have this type of rule to generate a meaningful title. What if we do para id=ini.com.allow-dcom xreflabel=ini.com.allow-dcom (missing;) Where missing; is translated obviously. It would give some clue to users why clicking on that link leads to no content. :) Goba
Re: [PHP-DOC] build failure [de]
Gabor Hojtsy wrote: The problem is the increased usage of xref. Previously authors were encouraged to use link to add internal links, which requires text content, so this was no problem. The adoption of xref lead to this problem. Should we avoid using xref? I don't think so that now it is an option. It is quite convinient in places like the extensions.xml file, where generated content is automatically translated with the titles, and this is the intention of using xref elsewhere too. Less work for translators to look up how exactly they translated some titles = more consistency in translations. +1, xref is a neet feature. 1. What would we put into para xreflabel=... in place of the dots in the missing-ids.xml file? The proper link-test? Sure, this depends on the content of the id=.. For the example para id=ini.com.allow-dcom this would become para id=ini.com.allow-dcom xreflabel=com.allow_dcom For ini stuff, this works because of some strict rules for naming. Otherwise we might not have this type of rule to generate a meaningful title. What if we do para id=ini.com.allow-dcom xreflabel=ini.com.allow-dcom (missing;) Where missing; is translated obviously. It would give some clue to users why clicking on that link leads to no content. :) Fine with me, but we should place missing; at top of missing-ids.xml So the following should be the solution for this problem: missing-ids.xml: missing; para id=ini.com.allow-dcom xreflabel=ini.com.allow-dcom/para and put missing; in language-snippets.ent. Benefit: linking to appendix missing-stuff with a short explanation is working again ;-) Friedhelm
Re: [PHP-DOC] build failure [de]
Fine with me, but we should place missing; at top of missing-ids.xml So the following should be the solution for this problem: missing-ids.xml: missing; para id=ini.com.allow-dcom xreflabel=ini.com.allow-dcom/para and put missing; in language-snippets.ent. Benefit: linking to appendix missing-stuff with a short explanation is working again ;-) I actually meant that every xreflabel (so every link generated for missing content) would include the translated version of the word missing, so that even before clicked a user (an experienced user at least) would know that it is not really benefical to click that link. Goba
Re: [PHP-DOC] build failure [de]
Hi, The manual build of the de manual fails with following messages: sample: /usr/bin/openjade:/dat/dev/php/phpdoc/en/faq/com.xml:146:34:E: [xref auf para wird nicht unterstützt] [xref on para is not supported] The id xref is linking to, is missing in the de-tree, but present in the missing-ids.xml file: para id=ini.com.allow-dcom/para In the english file in question (faq/com.xml) xref is used like: xref linkend=ini.com.allow-dcom/ As this points to para id=ini.com.allow-dcom/para in missing-ids.xml for the de tree, obviously no link text can be produced. This should not affect the building prozess,(it's only a warning) but renders not very nice: http://www.php.net/manual/de/faq.com.php#faq.com.q8 The link text ist empty. Anything we can do about? Possibilities (other than updating the german manual ;-)): 1.) use xreflabel 2.) produce content for the para's in missing-ids.xml 3.) split the faq If 2) fixes the problem, I would go for it. Nuno
Re: [PHP-DOC] build failure [de]
[xref on para is not supported] The id xref is linking to, is missing in the de-tree, but present in the missing-ids.xml file: para id=ini.com.allow-dcom/para In the english file in question (faq/com.xml) xref is used like: xref linkend=ini.com.allow-dcom/ As this points to para id=ini.com.allow-dcom/para in missing-ids.xml for the de tree, obviously no link text can be produced. This should not affect the building prozess,(it's only a warning) but renders not very nice: http://www.php.net/manual/de/faq.com.php#faq.com.q8 The link text ist empty. Anything we can do about? Possibilities (other than updating the german manual ;-)): 1.) use xreflabel 2.) produce content for the para's in missing-ids.xml 3.) split the faq No splitting will help this error message popping up, since it occurs in different places in different translations. It can happen anytime you have an outdated file in your translation. The problem is the increased usage of xref. Previously authors were encouraged to use link to add internal links, which requires text content, so this was no problem. The adoption of xref lead to this problem. 1. What would we put into para xreflabel=... in place of the dots in the missing-ids.xml file? 2. How would this be better then the previous option? 3. This is not just a faq problem. True, there are some big files in the FAQ folder.. Goba
Re: [PHP-DOC] build failure [de]
Gabor Hojtsy wrote: [xref on para is not supported] The id xref is linking to, is missing in the de-tree, but present in the missing-ids.xml file: para id=ini.com.allow-dcom/para In the english file in question (faq/com.xml) xref is used like: xref linkend=ini.com.allow-dcom/ As this points to para id=ini.com.allow-dcom/para in missing-ids.xml for the de tree, obviously no link text can be produced. This should not affect the building prozess,(it's only a warning) but renders not very nice: http://www.php.net/manual/de/faq.com.php#faq.com.q8 The link text ist empty. Anything we can do about? Possibilities (other than updating the german manual ;-)): 1.) use xreflabel 2.) produce content for the para's in missing-ids.xml 3.) split the faq No splitting will help this error message popping up, since it occurs in different places in different translations. It can happen anytime you have an outdated file in your translation. Yeah, I know. It was the subtle attempt to suggest splitting of large files. (but that's another story) The problem is the increased usage of xref. Previously authors were encouraged to use link to add internal links, which requires text content, so this was no problem. The adoption of xref lead to this problem. Should we avoid using xref? 1. What would we put into para xreflabel=... in place of the dots in the missing-ids.xml file? The proper link-test? Sure, this depends on the content of the id=.. For the example para id=ini.com.allow-dcom this would become para id=ini.com.allow-dcom xreflabel=com.allow_dcom 2. How would this be better then the previous option? In no case, just another option to generate link text via xref. para id=ini.com.allow-dcomcom.allow_dcom/para Either way, if we choose option 1 or 2 it increases processing time, maybe we can place just some generic text inside? Not nice also... 3. This is not just a faq problem. I agree, it was just an example of one missing-id. Currently the missing-ids.xml file is a bit pointless; it only serves a technichal purpose: building the manual, and this not too clever as it produces unneccesary warnings and no content for the readers (I don't blame anyone for this!) Either we don't use xref or we should fix the generating of missing id's. In general, I really do not care much about this problem and if we can come up with a solution - fine, if not life goes on. However, the build process for translated manuals should not be hindered by this issue. Friedhelm p.s.: True, there are some big files in the FAQ folder.. See above, we might want to split them?
Re: [PHP-DOC] build failure [de]
Nuno Lopes wrote: Possibilities (other than updating the german manual ;-)): 1.) use xreflabel 2.) produce content for the para's in missing-ids.xml 3.) split the faq If 2) fixes the problem, I would go for it. This should fix the problem (not tested), I only did a quick test with xreflabel. Friedhelm