feat(i18n): dev-process repo in English
- README.md: full English rewrite - All 13 vorlagen MD templates hand-translated: PID, PM-Plan, QA-Plan, SWE-Plan, Test-Plan, SA, SWA, Review-Protokoll, Non-Conformity, MISRA-Deviation-Permit, MISRA-Deviation-Record, Traceability-Matrix, angebot (quotation) - Master Word template (slohmaier-doc-template.docx) regenerated in English: cover page, document control, TOC headers, classification banner all English - All derived Word vorlagen regenerated from English MD sources Still to translate: toolstack.md, gitea-aspice-setup.md
This commit is contained in:
@@ -223,7 +223,7 @@ def setup_page(doc):
|
||||
section.footer_distance = Cm(1.25)
|
||||
|
||||
|
||||
def build_header_footer(doc, doc_id_placeholder="<DOC-ID>", classification="VERTRAULICH"):
|
||||
def build_header_footer(doc, doc_id_placeholder="<DOC-ID>", classification="CONFIDENTIAL"):
|
||||
section = doc.sections[0]
|
||||
section.different_first_page_header_footer = True
|
||||
|
||||
@@ -234,11 +234,11 @@ def build_header_footer(doc, doc_id_placeholder="<DOC-ID>", classification="VERT
|
||||
tabs = header_para.paragraph_format.tab_stops
|
||||
tabs.add_tab_stop(Cm(8), WD_ALIGN_PARAGRAPH.CENTER)
|
||||
tabs.add_tab_stop(Cm(16), WD_ALIGN_PARAGRAPH.RIGHT)
|
||||
r1 = header_para.add_run("<PROJEKT>")
|
||||
r1 = header_para.add_run("<PROJECT>")
|
||||
r1.font.size = Pt(9)
|
||||
r1.font.color.rgb = RGBColor(0x59, 0x59, 0x59)
|
||||
header_para.add_run("\t")
|
||||
r2 = header_para.add_run("<DOKUMENT-TITEL>")
|
||||
r2 = header_para.add_run("<DOCUMENT-TITLE>")
|
||||
r2.font.size = Pt(9)
|
||||
r2.font.color.rgb = RGBColor(0x59, 0x59, 0x59)
|
||||
r2.bold = True
|
||||
@@ -263,7 +263,7 @@ def build_header_footer(doc, doc_id_placeholder="<DOC-ID>", classification="VERT
|
||||
fr2.font.color.rgb = RGBColor(0x59, 0x59, 0x59)
|
||||
fr2.bold = True
|
||||
footer_para.add_run("\t")
|
||||
fr3 = footer_para.add_run("Seite ")
|
||||
fr3 = footer_para.add_run("Page ")
|
||||
fr3.font.size = Pt(9)
|
||||
fr3.font.color.rgb = RGBColor(0x59, 0x59, 0x59)
|
||||
add_field(footer_para, "PAGE", "1")
|
||||
@@ -298,7 +298,7 @@ def add_cover_page(doc):
|
||||
# Classification banner
|
||||
cls_p = doc.add_paragraph()
|
||||
cls_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
cls_r = cls_p.add_run("VERTRAULICH")
|
||||
cls_r = cls_p.add_run("CONFIDENTIAL")
|
||||
cls_r.font.size = Pt(11)
|
||||
cls_r.font.bold = True
|
||||
cls_r.font.color.rgb = RGBColor(0xC5, 0x5A, 0x11)
|
||||
@@ -306,12 +306,12 @@ def add_cover_page(doc):
|
||||
# Title
|
||||
title_p = doc.add_paragraph(style="Title")
|
||||
title_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
title_p.add_run("<Dokument-Titel>")
|
||||
title_p.add_run("<Document title>")
|
||||
|
||||
# Subtitle
|
||||
sub_p = doc.add_paragraph(style="Subtitle")
|
||||
sub_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
sub_p.add_run("<Untertitel oder Kurzbeschreibung>")
|
||||
sub_p.add_run("<Subtitle or short description>")
|
||||
|
||||
for _ in range(4):
|
||||
doc.add_paragraph()
|
||||
@@ -323,12 +323,12 @@ def add_cover_page(doc):
|
||||
meta_tbl.columns[0].width = Cm(4.5)
|
||||
meta_tbl.columns[1].width = Cm(8.5)
|
||||
meta_data = [
|
||||
("Projekt", "<Projektname>"),
|
||||
("Dokument-ID", "<DOC-ID>"),
|
||||
("Project", "<Project name>"),
|
||||
("Document ID", "<DOC-ID>"),
|
||||
("Version", "1.0"),
|
||||
("Datum", "YYYY-MM-DD"),
|
||||
("Status", "Entwurf"),
|
||||
("Klassifikation", "Vertraulich"),
|
||||
("Date", "YYYY-MM-DD"),
|
||||
("Status", "Draft"),
|
||||
("Classification", "Confidential"),
|
||||
]
|
||||
for i, (k, v) in enumerate(meta_data):
|
||||
c1 = meta_tbl.cell(i, 0)
|
||||
@@ -354,49 +354,49 @@ def add_cover_page(doc):
|
||||
|
||||
|
||||
def add_document_control(doc):
|
||||
doc.add_heading("Dokumentenlenkung", level=1)
|
||||
doc.add_heading("Document Control", level=1)
|
||||
doc.add_paragraph(
|
||||
"Diese Seite dokumentiert die formale Lenkung dieses Dokuments gemaess "
|
||||
"ISO 9001. Aenderungen werden nur ueber den Freigabeprozess wirksam."
|
||||
"This page documents the formal control of this document per ISO 9001. "
|
||||
"Changes only take effect after the release process."
|
||||
)
|
||||
|
||||
doc.add_heading("Freigaben", level=2)
|
||||
doc.add_heading("Approvals", level=2)
|
||||
appr_tbl = doc.add_table(rows=4, cols=4)
|
||||
appr_tbl.style = "Light Grid Accent 1"
|
||||
hdr = appr_tbl.rows[0].cells
|
||||
for i, h in enumerate(["Rolle", "Name", "Unterschrift / Datum", "Bemerkung"]):
|
||||
for i, h in enumerate(["Role", "Name", "Signature / Date", "Notes"]):
|
||||
hdr[i].text = ""
|
||||
r = hdr[i].paragraphs[0].add_run(h)
|
||||
r.bold = True
|
||||
set_cell_shading(hdr[i], LIGHT_GREY)
|
||||
roles = ["Erstellt von", "Geprueft von", "Freigegeben von"]
|
||||
roles = ["Author", "Reviewer", "Approver"]
|
||||
for i, role in enumerate(roles, start=1):
|
||||
appr_tbl.rows[i].cells[0].text = role
|
||||
for j in (1, 2, 3):
|
||||
appr_tbl.rows[i].cells[j].text = ""
|
||||
|
||||
doc.add_heading("Aenderungshistorie", level=2)
|
||||
doc.add_heading("Revision History", level=2)
|
||||
rev_tbl = doc.add_table(rows=3, cols=4)
|
||||
rev_tbl.style = "Light Grid Accent 1"
|
||||
rev_hdr = rev_tbl.rows[0].cells
|
||||
for i, h in enumerate(["Version", "Datum", "Aenderung", "Autor"]):
|
||||
for i, h in enumerate(["Version", "Date", "Change", "Author"]):
|
||||
rev_hdr[i].text = ""
|
||||
r = rev_hdr[i].paragraphs[0].add_run(h)
|
||||
r.bold = True
|
||||
set_cell_shading(rev_hdr[i], LIGHT_GREY)
|
||||
rev_data = [
|
||||
("0.1", "YYYY-MM-DD", "Initialer Entwurf", "<Autor>"),
|
||||
("1.0", "YYYY-MM-DD", "Erstfreigabe", "<Autor>"),
|
||||
("0.1", "YYYY-MM-DD", "Initial draft", "<Author>"),
|
||||
("1.0", "YYYY-MM-DD", "First release", "<Author>"),
|
||||
]
|
||||
for i, row in enumerate(rev_data, start=1):
|
||||
for j, v in enumerate(row):
|
||||
rev_tbl.rows[i].cells[j].text = v
|
||||
|
||||
doc.add_heading("Verteilerkreis", level=2)
|
||||
doc.add_heading("Distribution List", level=2)
|
||||
dist_tbl = doc.add_table(rows=3, cols=3)
|
||||
dist_tbl.style = "Light Grid Accent 1"
|
||||
dist_hdr = dist_tbl.rows[0].cells
|
||||
for i, h in enumerate(["Empfaenger", "Rolle", "Organisation"]):
|
||||
for i, h in enumerate(["Recipient", "Role", "Organisation"]):
|
||||
dist_hdr[i].text = ""
|
||||
r = dist_hdr[i].paragraphs[0].add_run(h)
|
||||
r.bold = True
|
||||
@@ -409,40 +409,40 @@ def add_document_control(doc):
|
||||
|
||||
|
||||
def add_toc_pages(doc):
|
||||
doc.add_heading("Inhaltsverzeichnis", level=1)
|
||||
doc.add_heading("Table of Contents", level=1)
|
||||
p = doc.add_paragraph()
|
||||
add_field(
|
||||
p,
|
||||
'TOC \\o "1-3" \\h \\z \\u',
|
||||
"Inhaltsverzeichnis aktualisieren: F9 (rechte Maustaste auf TOC > Felder aktualisieren)",
|
||||
"Update TOC: F9 (right-click on TOC > Update Field)",
|
||||
)
|
||||
doc.add_page_break()
|
||||
|
||||
doc.add_heading("Abbildungsverzeichnis", level=1)
|
||||
doc.add_heading("List of Figures", level=1)
|
||||
p = doc.add_paragraph()
|
||||
add_field(
|
||||
p,
|
||||
'TOC \\h \\z \\c "Abbildung"',
|
||||
"Abbildungsverzeichnis aktualisieren: F9",
|
||||
'TOC \\h \\z \\c "Figure"',
|
||||
"Update list of figures: F9",
|
||||
)
|
||||
doc.add_page_break()
|
||||
|
||||
doc.add_heading("Tabellenverzeichnis", level=1)
|
||||
doc.add_heading("List of Tables", level=1)
|
||||
p = doc.add_paragraph()
|
||||
add_field(
|
||||
p,
|
||||
'TOC \\h \\z \\c "Tabelle"',
|
||||
"Tabellenverzeichnis aktualisieren: F9",
|
||||
'TOC \\h \\z \\c "Table"',
|
||||
"Update list of tables: F9",
|
||||
)
|
||||
doc.add_page_break()
|
||||
|
||||
|
||||
def add_abbreviations(doc):
|
||||
doc.add_heading("Abkuerzungsverzeichnis", level=1)
|
||||
doc.add_heading("Abbreviations", level=1)
|
||||
tbl = doc.add_table(rows=4, cols=2)
|
||||
tbl.style = "Light Grid Accent 1"
|
||||
hdr = tbl.rows[0].cells
|
||||
for i, h in enumerate(["Abkuerzung", "Bedeutung"]):
|
||||
for i, h in enumerate(["Abbreviation", "Meaning"]):
|
||||
hdr[i].text = ""
|
||||
r = hdr[i].paragraphs[0].add_run(h)
|
||||
r.bold = True
|
||||
@@ -460,23 +460,23 @@ def add_abbreviations(doc):
|
||||
|
||||
def add_main_content(doc):
|
||||
# Section 1
|
||||
doc.add_heading("1. Einleitung", level=1)
|
||||
doc.add_heading("1.1 Zweck", level=2)
|
||||
doc.add_heading("1. Introduction", level=1)
|
||||
doc.add_heading("1.1 Purpose", level=2)
|
||||
doc.add_paragraph(
|
||||
"<Kurzer Absatz: Wozu existiert dieses Dokument? Welche Frage beantwortet es?>"
|
||||
"<Short paragraph: why does this document exist? What question does it answer?>"
|
||||
)
|
||||
doc.add_heading("1.2 Geltungsbereich", level=2)
|
||||
doc.add_paragraph("<Welches Produkt, welches Projekt, welche Phase?>")
|
||||
doc.add_heading("1.3 Definitionen", level=2)
|
||||
doc.add_heading("1.2 Scope", level=2)
|
||||
doc.add_paragraph("<Which product, project, phase?>")
|
||||
doc.add_heading("1.3 Definitions", level=2)
|
||||
doc.add_paragraph(
|
||||
"<Spezielle Begriffe, die im Dokument verwendet werden. Allgemeine Abkuerzungen "
|
||||
"siehe Abkuerzungsverzeichnis.>"
|
||||
"<Domain-specific terms used in this document. Generic abbreviations are listed "
|
||||
"in the Abbreviations section.>"
|
||||
)
|
||||
doc.add_heading("1.4 Referenzen", level=2)
|
||||
doc.add_heading("1.4 References", level=2)
|
||||
ref_tbl = doc.add_table(rows=3, cols=3)
|
||||
ref_tbl.style = "Light Grid Accent 1"
|
||||
ref_hdr = ref_tbl.rows[0].cells
|
||||
for i, h in enumerate(["ID", "Titel", "Version / Ort"]):
|
||||
for i, h in enumerate(["ID", "Title", "Version / Location"]):
|
||||
ref_hdr[i].text = ""
|
||||
r = ref_hdr[i].paragraphs[0].add_run(h)
|
||||
r.bold = True
|
||||
@@ -486,60 +486,60 @@ def add_main_content(doc):
|
||||
ref_tbl.rows[i].cells[j].text = ""
|
||||
|
||||
# Section 2
|
||||
doc.add_heading("2. Hauptinhalt", level=1)
|
||||
doc.add_heading("2. Main Content", level=1)
|
||||
doc.add_paragraph(
|
||||
"<Hier beginnt der dokumenttyp-spezifische Inhalt. Die Vorlage liefert Struktur "
|
||||
"und Formatvorlagen; konkrete Sektionen kommen aus der jeweiligen Dokumentart "
|
||||
"(PID, QA-Plan, SWE-Plan, ...).>"
|
||||
"<This is where the document-type-specific content begins. This template "
|
||||
"provides structure and styles; concrete sections come from each document "
|
||||
"type (PID, QA Plan, SWE Plan, ...).>"
|
||||
)
|
||||
|
||||
# Demonstrate styles
|
||||
doc.add_heading("2.1 Beispiel: Formatvorlagen", level=2)
|
||||
doc.add_heading("2.1 Example: Styles", level=2)
|
||||
doc.add_paragraph(
|
||||
"Body-Text in der Vorlage. Schriftart Calibri 11 mit 1,15-fachem Zeilenabstand."
|
||||
"Body text in the template. Calibri 11 with 1.15 line spacing."
|
||||
)
|
||||
|
||||
code_p = doc.add_paragraph(style="Code")
|
||||
code_p.add_run(
|
||||
"// Beispiel-Code im Code-Stil (Consolas 10)\n"
|
||||
"// Example code in code style (Consolas 10)\n"
|
||||
"Status epb_apply(uint8_t force_percent);"
|
||||
)
|
||||
set_paragraph_shading(code_p, LIGHT_GREY)
|
||||
|
||||
note_p = doc.add_paragraph(style="Note")
|
||||
note_p.add_run("HINWEIS: ").bold = True
|
||||
note_p.add_run("Hinweis-Stil fuer ergaenzende Informationen.")
|
||||
note_p.add_run("NOTE: ").bold = True
|
||||
note_p.add_run("Note style for supplementary information.")
|
||||
set_paragraph_border(note_p, NOTE_BORDER, size=18, side="left")
|
||||
set_paragraph_shading(note_p, NOTE_BG)
|
||||
|
||||
warn_p = doc.add_paragraph(style="Warning")
|
||||
warn_p.add_run("ACHTUNG: ").bold = True
|
||||
warn_p.add_run("Warn-Stil fuer sicherheitsrelevante Hinweise.")
|
||||
warn_p.add_run("WARNING: ").bold = True
|
||||
warn_p.add_run("Warning style for safety-relevant information.")
|
||||
set_paragraph_border(warn_p, WARN_BORDER, size=18, side="left")
|
||||
set_paragraph_shading(warn_p, WARN_BG)
|
||||
|
||||
req_p = doc.add_paragraph(style="Requirement")
|
||||
req_p.add_run("REQ-001: ").bold = True
|
||||
req_p.add_run(
|
||||
"Requirement-Stil fuer in-line Anforderungen "
|
||||
"(meist in Markdown via Doorstop, in Word fuer formelle Berichte)."
|
||||
"Requirement style for inline requirements "
|
||||
"(usually in Markdown via Doorstop, but in Word for formal reports)."
|
||||
)
|
||||
set_paragraph_border(req_p, REQ_BORDER, size=18, side="left")
|
||||
set_paragraph_shading(req_p, REQ_BG)
|
||||
|
||||
doc.add_heading("2.2 Beispiel-Tabelle", level=2)
|
||||
doc.add_heading("2.2 Example Table", level=2)
|
||||
tbl = doc.add_table(rows=4, cols=3)
|
||||
tbl.style = "Light Grid Accent 1"
|
||||
hdr = tbl.rows[0].cells
|
||||
for i, h in enumerate(["ID", "Beschreibung", "ASIL"]):
|
||||
for i, h in enumerate(["ID", "Description", "ASIL"]):
|
||||
hdr[i].text = ""
|
||||
r = hdr[i].paragraphs[0].add_run(h)
|
||||
r.bold = True
|
||||
set_cell_shading(hdr[i], LIGHT_GREY)
|
||||
rows = [
|
||||
("F-01", "Apply bei Fahrer-Anforderung", "D"),
|
||||
("F-05", "Release bei Fahrer-Anforderung", "B"),
|
||||
("F-10", "HMI: LED-Steuerung", "QM"),
|
||||
("F-01", "Apply on driver request", "D"),
|
||||
("F-05", "Release on driver request", "B"),
|
||||
("F-10", "HMI: LED control", "QM"),
|
||||
]
|
||||
for i, row in enumerate(rows, start=1):
|
||||
for j, v in enumerate(row):
|
||||
@@ -547,12 +547,12 @@ def add_main_content(doc):
|
||||
|
||||
# Caption demo
|
||||
cap_p = doc.add_paragraph(style="Caption")
|
||||
cap_p.add_run("Tabelle 1: Beispiel-Anforderungen mit ASIL-Klassifikation")
|
||||
cap_p.add_run("Table 1: Example requirements with ASIL classification")
|
||||
|
||||
# Section 3 — Anhang
|
||||
doc.add_heading("3. Anhang", level=1)
|
||||
# Section 3 — Appendix
|
||||
doc.add_heading("3. Appendix", level=1)
|
||||
doc.add_paragraph(
|
||||
"<Anhaenge: Detail-Berechnungen, Skripte, Zusatz-Tabellen, Glossar.>"
|
||||
"<Appendices: detail calculations, scripts, extra tables, glossary.>"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user