Example #1
0
                if ($max_length == 0) {
                    if (!$reference_with_errors) {
                        $reference_with_errors = true;
                        $reference_output .= $opening_div;
                    }
                    $reference_output .= "<h3>{$current_filename}</h3><p>The following string has a maximum length of 0 characters:</p><ul><li>" . htmlspecialchars($reference_string) . "</li></ul>\n";
                }
            }
        }
    }
    if ($reference_with_errors) {
        $reference_output .= "      </div>\n\n";
        $htmloutput .= $reference_output;
    }
}
foreach (Project::getWebsitesByDataType($sites, 'raw') as $current_website) {
    $reference_with_errors = false;
    $current_website_name = Project::getWebsiteName($current_website);
    $reference_locale = Project::getReferenceLocale($current_website);
    $reference_output = "      <h2>Reference locale: {$reference_locale}</h2>\n";
    $opening_div = "      <div class='website_container'>\n" . "        <h2>{$current_website_name}</h2>\n";
    foreach (Project::getWebsiteFiles($current_website) as $current_filename) {
        $reference_filename = Project::getLocalFilePath($current_website, $reference_locale, $current_filename);
        if (!file_exists($reference_filename)) {
            if (!$reference_with_errors) {
                $reference_with_errors = true;
                $reference_output .= $opening_div;
            }
            $reference_output .= "        <p><strong>{$current_filename}</strong> is missing</p>\n";
        }
    }