This commit is contained in:
didou
2004-04-13 12:19:16 +00:00
parent af45ae6f07
commit 5223950dbf

View File

@@ -25,7 +25,6 @@
* Create smarty/docs/entities/file-entities.ent with respect
* to all the specialities needed:
*
* . CHM only appendix integration
* . Translated language files with English ones as fallbacks
*
* Also take in account, that if XSLT style sheets are used,
@@ -81,7 +80,7 @@ echo "\ncreating entities/file-entities.ent...\n";
fputs($fp, "<!-- DON'T TOUCH - AUTOGENERATED BY file-entities.php -->\n\n");
// Write out all other entities
// Write out all entities
foreach ($entities as $entity) {
fputs($fp, $entity);
}
@@ -94,7 +93,7 @@ exit;
/**
* Generate absolute path from a relative path, taking accout
* the current wokring directory.
* the current working directory.
*
* @param string $path Relative path
* @return string Absolute path generated
@@ -183,21 +182,6 @@ function file_entities($work_dir, $trans_dir, $orig_dir, &$entities) {
$function_entities[] = "&$name;";
}
// Special treatment for function reference entities if splitted version available
if (strstr($work_dir,"/functions")) {
$splitfile = str_replace(".xml", "/reference.xml", $file);
$splitpath = str_replace("/functions", "/reference", $trans_path) . "/" . $splitfile;
if (file_exists($splitpath)) {
$entities[] = entstr($name, $splitpath);
continue;
}
$splitpath = str_replace("/functions", "/reference", $trans_path) . "/" . $splitfile;
if (file_exists($splitpath)) {
$entities[] = entstr($name, $splitpath);
continue;
}
}
// If we have a translated file, use it, otherwise fall back to English
if (file_exists("$trans_path/$file")) {
$path = "$trans_path/$file";
@@ -304,4 +288,3 @@ function entstr($entname, $filename)
function strip_cygdrive($path){
return preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", $path);
}
?>