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 -0000 1.19
+++ missing-entities.php.in 14 Sep 2005 18:44:45 -0000
@@ -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 {