Projekt-Importer um JSON/CSV Importer analog zu Assemblies erweitern

This commit is contained in:
Marcel Diegelmann 2025-06-24 09:42:12 +02:00
parent 2066d20edf
commit ecbc8b4e80
18 changed files with 3112 additions and 55 deletions

View file

@ -11139,6 +11139,18 @@ Element 1 -&gt; Element 1.2</target>
<target>Type</target>
</segment>
</unit>
<unit id="hRLz1qd" name="project.bom_import.type.json">
<segment state="translated">
<source>assembly.bom_import.type.json</source>
<target>JSON</target>
</segment>
</unit>
<unit id="k9JWt2P" name="project.bom_import.type.csv">
<segment state="translated">
<source>assembly.bom_import.type.csv</source>
<target>CSV</target>
</segment>
</unit>
<unit id="tNnYa0u" name="project.bom_import.type.kicad_pcbnew">
<segment state="translated">
<source>project.bom_import.type.kicad_pcbnew</source>
@ -11151,6 +11163,319 @@ Element 1 -&gt; Element 1.2</target>
<target>Clear existing BOM entries before importing</target>
</segment>
</unit>
<unit id="h8zHL1o" name="project.import_bom.template.header.json">
<segment>
<source>project.import_bom.template.header.json</source>
<target>JSON Import Template</target>
</segment>
</unit>
<unit id="i9yIJ4B" name="project.import_bom.template.header.csv">
<segment>
<source>project.import_bom.template.header.csv</source>
<target>CSV Import Template</target>
</segment>
</unit>
<unit id="9PmGE2C" name="project.import_bom.template.header.kicad_pcbnew">
<segment>
<source>project.import_bom.template.header.kicad_pcbnew</source>
<target>CSV Import Template (KiCAD Pcbnew BOM)</target>
</segment>
</unit>
<unit id="vG3DXq1" name="project.bom_import.template.entry.name">
<segment>
<source>project.bom_import.template.entry.name</source>
<target>Component name in the project</target>
</segment>
</unit>
<unit id="rQ4BUt5" name="project.bom_import.template.entry.part.mpnr">
<segment>
<source>project.bom_import.template.entry.part.mpnr</source>
<target>Unique product number within the manufacturer</target>
</segment>
</unit>
<unit id="zHbY5V3" name="project.bom_import.template.entry.part.ipn">
<segment>
<source>project.bom_import.template.entry.part.ipn</source>
<target>Unique IPN of the component</target>
</segment>
</unit>
<unit id="UhW5M9o" name="project.bom_import.template.entry.part.name">
<segment>
<source>project.bom_import.template.entry.part.name</source>
<target>Unique name of the component</target>
</segment>
</unit>
<unit id="9U5b1Rc" name="project.bom_import.template.entry.part.manufacturer.name">
<segment>
<source>project.bom_import.template.entry.part.manufacturer.name</source>
<target>Unique name of the manufacturer</target>
</segment>
</unit>
<unit id="4fU9rO2" name="project.bom_import.template.json.table">
<segment>
<source>project.bom_import.template.json.table</source>
<target>
<![CDATA[
<table class="table table-bordered table-striped">
<thead class="thead-dark">
<tr>
<th>Field</th>
<th>Condition</th>
<th>Data Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>quantity</td>
<td>Required</td>
<td>Decimal (Float)</td>
<td>Must be provided and contains a decimal value (Float) greater than 0.0.</td>
</tr>
<tr>
<td>name</td>
<td>Optional</td>
<td>String</td>
<td>If present, it must be a non-empty string. The name of the entry within the bill of materials.</td>
</tr>
<tr>
<td>part</td>
<td>Optional</td>
<td>Object/Array</td>
<td>
If a component is to be assigned, it must be an object/array, and at least one of the following fields must be filled in:
<ul>
<li>part.id</li>
<li>part.mpnr</li>
<li>part.ipn</li>
<li>part.name</li>
</ul>
</td>
</tr>
<tr>
<td>part.id</td>
<td>Optional</td>
<td>Integer</td>
<td>Integer > 0. Corresponds to the internal numeric ID of the component in the Part-DB.</td>
</tr>
<tr>
<td>part.mpnr</td>
<td>Optional</td>
<td>String</td>
<td>A non-empty string if no part.id, part.ipn, or part.name is provided.</td>
</tr>
<tr>
<td>part.ipn</td>
<td>Optional</td>
<td>String</td>
<td>A non-empty string if no part.id, part.mpnr, or part.name is provided.</td>
</tr>
<tr>
<td>part.name</td>
<td>Optional</td>
<td>String</td>
<td>A non-empty string if no part.id, part.mpnr, or part.ipn is provided.</td>
</tr>
<tr>
<td>part.manufacturer</td>
<td>Optional</td>
<td>Object/Array</td>
<td>
If a component's manufacturer is to be adjusted, or the component is to be unambiguously identified based on part.mpnr, it must be an object/array, and at least one of the following fields must be filled in:
<ul>
<li>manufacturer.id</li>
<li>manufacturer.name</li>
</ul>
</td>
</tr>
<tr>
<td>manufacturer.id</td>
<td>Optional</td>
<td>Integer</td>
<td>Integer > 0. Corresponds to the internal numeric ID of the manufacturer.</td>
</tr>
<tr>
<td>manufacturer.name</td>
<td>Optional</td>
<td>String</td>
<td>A non-empty string if no manufacturer.id is provided.</td>
</tr>
</tbody>
</table>
]]>
</target>
</segment>
</unit>
<unit id="bH5Qi1Z" name="project.bom_import.template.csv.exptected_columns">
<segment>
<source>project.bom_import.template.csv.exptected_columns</source>
<target>Possible columns:</target>
</segment>
</unit>
<unit id="Red8MLw" name="project.bom_import.template.csv.table">
<segment>
<source>project.bom_import.template.csv.table</source>
<target>
<![CDATA[
<table class="table table-bordered table-striped">
<thead class="thead-dark">
<tr>
<th>Column</th>
<th>Condition</th>
<th>Data Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>quantity</td>
<td>Required</td>
<td>Floating-point number (Float)</td>
<td>Must be provided and contain a floating-point value (Float) greater than 0.0.</td>
</tr>
<tr>
<td>name</td>
<td>Optional</td>
<td>String</td>
<td>If available, it must be a non-empty string. The name of the entry within the bill of materials.</td>
</tr>
<tr>
<td colspan="3"><strong>Columns starting with part_</strong></td>
<td>
If a component is to be assigned, at least one of the following columns must be provided and filled in:
<ul>
<li>part_id</li>
<li>part_mpnr</li>
<li>part_ipn</li>
<li>part_name</li>
</ul>
</td>
</tr>
<tr>
<td>part_id</td>
<td>Optional</td>
<td>Integer</td>
<td>Integer > 0. Corresponds to the internal numeric ID of the component in the Part-DB.</td>
</tr>
<tr>
<td>part_mpnr</td>
<td>Optional</td>
<td>String</td>
<td>Must be provided if the part_id, part_ipn, or part_name columns are not filled in.</td>
</tr>
<tr>
<td>part_ipn</td>
<td>Optional</td>
<td>String</td>
<td>Must be provided if the part_id, part_mpnr, or part_name columns are not filled in.</td>
</tr>
<tr>
<td>part_name</td>
<td>Optional</td>
<td>String</td>
<td>Must be provided if the part_id, part_mpnr, or part_ipn columns are not filled in.</td>
</tr>
<tr>
<td colspan="3"><strong>Columns starting with part_manufacturer_</strong></td>
<td>
If the manufacturer of a component is to be adjusted or if the component is to be uniquely identified based on the part_mpnr, at least one of the following columns must be provided and filled in:
<ul>
<li>part_manufacturer_id</li>
<li>part_manufacturer_name</li>
</ul>
</td>
</tr>
<tr>
<td>part_manufacturer_id</td>
<td>Optional</td>
<td>Integer</td>
<td>Integer > 0. Corresponds to the internal numeric ID of the manufacturer.</td>
</tr>
<tr>
<td>part_manufacturer_name</td>
<td>Optional</td>
<td>String</td>
<td>Must be provided if the part_manufacturer_id column is not filled in.</td>
</tr>
</tbody>
</table>
]]>
</target>
</segment>
</unit>
<unit id="o0u7vGe" name="project.bom_import.template.kicad_pcbnew.exptected_columns">
<segment>
<source>project.bom_import.template.kicad_pcbnew.exptected_columns</source>
<target>Expected columns:</target>
</segment>
</unit>
<unit id="bKWoLeT" name="project.bom_import.template.kicad_pcbnew.exptected_columns.note">
<segment>
<source>project.bom_import.template.kicad_pcbnew.exptected_columns.note</source>
<target>
<![CDATA[
<p><strong>Note:</strong> No assignment to specific components from the category management is performed.</p>
]]>
</target>
</segment>
</unit>
<unit id="aki9R3e" name="project.bom_import.template.kicad_pcbnew.table">
<segment>
<source>project.bom_import.template.kicad_pcbnew.table</source>
<target>
<![CDATA[
<table class="table table-bordered table-striped">
<thead class="thead-dark">
<tr>
<th>Field</th>
<th>Condition</th>
<th>Data type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Id</td>
<td>Optional</td>
<td>Integer</td>
<td>Free entry. A unique identification number for each component.</td>
</tr>
<tr>
<td>Designator</td>
<td>Optional</td>
<td>String</td>
<td>Free entry. A unique reference identifier of the component on the PCB, e.g., "R1" for resistor 1.<br>It is adopted into the assembly name of the component entry.</td>
</tr>
<tr>
<td>Package</td>
<td>Optional</td>
<td>String</td>
<td>Free entry. The housing or package type of the component, e.g., "0805" for SMD resistors.<br>It is not adopted into the component entry.</td>
</tr>
<tr>
<td>Quantity</td>
<td>Mandatory</td>
<td>Integer</td>
<td>The number of identical components required to create an instance.<br>It is adopted as the quantity of the entry.</td>
</tr>
<tr>
<td>Designation</td>
<td>Mandatory</td>
<td>String</td>
<td>Description or function of the component, e.g., resistor value "10kΩ" or capacitor value "100nF".<br>It is adopted into the name of the component entry.</td>
</tr>
<tr>
<td>Supplier and ref</td>
<td>Optional</td>
<td>String</td>
<td>Free entry. Can contain a distributor-specific value, for example.<br>It is adopted as a note to the component entry.</td>
</tr>
</tbody>
</table>
]]>
</target>
</segment>
</unit>
<unit id="MDJdKXv" name="project.bom_import.clear_existing_bom.help">
<segment state="translated">
<source>project.bom_import.clear_existing_bom.help</source>