{escaped}"
return f"{escaped}"
def render_file_report(report: FileReport, locale: str) -> str:
parts = [
"{html.escape(report.rel)}",
]
if report.entire_file_missing:
parts.append(
"Entire file missing from locale",
)
if report.missing:
parts.append(badge(len(report.missing), "missing"))
if report.redundant:
parts.append(badge(len(report.redundant), "redundant"))
if report.extra_attrs:
parts.append(badge(len(report.extra_attrs), "extra-attr"))
if report.unchanged:
parts.append(badge(len(report.unchanged), "unchanged"))
if report.placeholder_issues:
parts.append(badge(len(report.placeholder_issues), "placeholder"))
if report.locale_only_elements:
parts.append(badge(len(report.locale_only_elements), "locale-only"))
parts.append("| Key | EN value |
|---|---|
| {render_key_code(entry.key)} | " f"{html.escape(entry.value)} |
No translatable EN strings were flagged for this file.
", ) if report.redundant: parts.append("| Key | " f"{html.escape(locale)} value |
|---|---|
| {render_key_code(entry.key)} | " f"{html.escape(entry.value)} |
| Element | Attribute | " f"{html.escape(locale)} value | Note |
|---|---|---|---|
{html.escape(issue.element)} | "
f"{html.escape(issue.attr)} | "
f"{html.escape(display_value)} | " f"{html.escape(issue.hint)} |
| Key | Value |
|---|---|
| {render_key_code(entry.key)} | " f"{html.escape(entry.value)} |
| Key | EN value | " f"{html.escape(locale)} value | Missing | Extra |
|---|---|---|---|---|
| {render_key_code(issue.key)} | " f"{html.escape(issue.en_value)} | " f"{html.escape(issue.locale_value)} | " f"{html.escape(', '.join(issue.missing))} | " f"{html.escape(', '.join(issue.extra))} |
{html.escape(ekey)}| {html.escape(label)} | {value} |
|---|
{html.escape(rel)}{html.escape(rel)}No string differences found.
") parts.append("{html.escape(skin)}Base: "
f"indra/newview/skins/{html.escape(skin)}/xui/
No non-EN locales found for this skin.
", ) else: if skin_report.duplicate_names_by_file: total_dupes = skin_report.total_duplicate_names parts.append( f"Multiple elements share the same name "
"in one file; string matching may be unreliable for these.
| File | Widget name | Count |
|---|---|---|
{html.escape(rel)} | "
f"{html.escape(dup.name)} | "
f"{dup.count} |
Missing string counts per skin and locale. " "Click a skin tab for detail.
", "| Skin | ", ] for loc in all_locales: parts.append(f"{html.escape(loc)} | ") parts.append("||
|---|---|---|---|
{html.escape(skin_report.skin)} | ")
for loc in all_locales:
locale_report = lookup.get((skin_report.skin, loc))
if locale_report is None:
parts.append("- | ") elif not locale_report.has_issues: parts.append("0 | ") else: missing = locale_report.total_missing extra = ( locale_report.total_redundant + locale_report.total_extra_attrs + locale_report.total_unchanged + locale_report.total_placeholder_issues + locale_report.total_locale_only_elements ) cell = f"{missing}" if extra: cell += f" (+{extra})" parts.append(f"{cell} | ") parts.append("
Malformed XML cannot be audited. A leading BOM is " "undesirable in XUI files and may break other tooling even when Python " "parses the file successfully.
", "| Skin | Locale | File | Kind | Detail |
|---|---|---|---|---|
{html.escape(issue.skin)} | "
f"{html.escape(issue.locale)} | " f"{html.escape(issue.rel)} | "
f"{kind_label} | " f"{html.escape(issue.message)} |
All skins under indra/newview/skins/*/xui/ compared "
f"EN against every other locale present. Generated {audit_date}.
Entries are matched by widget name (viewer "
"layered-XML rules). Audits value attributes and "
"panel.string / floater.string bodies. Purely "
"numeric value attributes (sizes, combo indices, padding) are "
"ignored. Each locale element is also checked attribute-by-attribute against "
"its EN counterpart. Elements with translate=\"false\" are skipped "
"(direct content only, not children). Also flags unchanged EN copies, placeholder "
"token mismatches, locale-only widgets, duplicate widget names, malformed "
"XML, and BOM markers.