diff --git a/src/Controller/ProjectController.php b/src/Controller/ProjectController.php index ec9147c1..2a6d19ee 100644 --- a/src/Controller/ProjectController.php +++ b/src/Controller/ProjectController.php @@ -149,6 +149,7 @@ class ProjectController extends AbstractController 'choices' => [ 'project.bom_import.type.kicad_pcbnew' => 'kicad_pcbnew', 'project.bom_import.type.kicad_schematic' => 'kicad_schematic', + 'project.bom_import.type.generic_csv' => 'generic_csv', ] ]); $builder->add('clear_existing_bom', CheckboxType::class, [ @@ -176,7 +177,7 @@ class ProjectController extends AbstractController try { // For schematic imports, redirect to field mapping step - if ($import_type === 'kicad_schematic') { + if (in_array($import_type, ['kicad_schematic', 'generic_csv'], true)) { // Store file content and options in session for field mapping step $file_content = $form->get('file')->getData()->getContent(); $clear_existing = $form->get('clear_existing_bom')->getData(); diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index bbbbb075..888384da 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -12333,7 +12333,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.ips.element14.apiKey.help - You can register for an API key on <a href="https://partner.element14.com/">https://partner.element14.com/</a>. + https://partner.element14.com/.]]> @@ -12345,7 +12345,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.ips.element14.storeId.help - The store domain to retrieve the data from. This decides the language and currency of results. See <a href="https://partner.element14.com/docs/Product_Search_API_REST__Description">here</a> for a list of valid domains. + here for a list of valid domains.]]> @@ -12363,7 +12363,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.ips.tme.token.help - You can get an API token and secret on <a href="https://developers.tme.eu/en/">https://developers.tme.eu/en/</a>. + https://developers.tme.eu/en/.]]> @@ -12411,7 +12411,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.ips.mouser.apiKey.help - You can register for an API key on <a href="https://eu.mouser.com/api-hub/">https://eu.mouser.com/api-hub/</a>. + https://eu.mouser.com/api-hub/.]]> @@ -12489,7 +12489,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.system.attachments - Attachments & Files + @@ -12513,7 +12513,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.system.attachments.allowDownloads.help - With this option users can download external files into Part-DB by providing an URL. <b>Attention: This can be a security issue, as it might allow users to access intranet ressources via Part-DB!</b> + Attention: This can be a security issue, as it might allow users to access intranet ressources via Part-DB!]]> @@ -12687,8 +12687,8 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.system.localization.base_currency_description - The currency that is used to store price information and exchange rates in. This currency is assumed, when no currency is set for a price information. -<b>Please note that the currencies are not converted, when changing this value. So changing the default currency after you already added price information, will result in wrong prices!</b> + Please note that the currencies are not converted, when changing this value. So changing the default currency after you already added price information, will result in wrong prices!]]> @@ -12718,7 +12718,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.misc.kicad_eda.category_depth.help - This value determines the depth of the category tree, that is visible inside KiCad. 0 means that only the top level categories are visible. Set to a value > 0 to show more levels. Set to -1, to show all parts of Part-DB inside a sigle cnategory in KiCad. + 0 to show more levels. Set to -1, to show all parts of Part-DB inside a sigle cnategory in KiCad.]]> @@ -12736,7 +12736,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.behavior.sidebar.items.help - The menus which appear at the sidebar by default. Order of items can be changed via drag & drop. + @@ -12784,7 +12784,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.behavior.table.parts_default_columns.help - The columns to show by default in part tables. Order of items can be changed via drag & drop. + @@ -12838,7 +12838,7 @@ Please note, that you can not impersonate a disabled user. If you try you will g settings.ips.oemsecrets.sortMode.M - Completeness & Manufacturer name + @@ -13057,371 +13057,377 @@ Please note, that you can not impersonate a disabled user. If you try you will g Redacted for security reasons - - - project.bom_import.map_fields - Map Fields - - - - - project.bom_import.map_fields.help - Configure how CSV columns map to BOM fields - - - - - project.bom_import.delimiter - Delimiter - - - - - project.bom_import.delimiter.comma - Comma (,) - - - - - project.bom_import.delimiter.semicolon - Semicolon (;) - - - - - project.bom_import.delimiter.tab - Tab - - - - - project.bom_import.field_mapping.title - Field Mapping - - - - - project.bom_import.field_mapping.csv_field - CSV Field - - - - - project.bom_import.field_mapping.maps_to - Maps To - - - - - project.bom_import.field_mapping.suggestion - Suggestion - - - - - project.bom_import.field_mapping.priority - Priority - - - - - project.bom_import.field_mapping.priority_help - Priority (lower number = higher priority) - - - - - project.bom_import.field_mapping.priority_short - P - - - - - project.bom_import.field_mapping.priority_note - Priority Tip: Lower numbers = higher priority. Default priority is 10. Use priorities 1-9 for most important fields, 10+ for normal priority. - - - - - project.bom_import.field_mapping.summary - Field Mapping Summary - - - - - project.bom_import.field_mapping.select_to_see_summary - Select field mappings to see summary - - - - - project.bom_import.field_mapping.no_suggestion - No suggestion - - - - - project.bom_import.preview - Preview - - - - - project.bom_import.flash.session_expired - Import session has expired. Please upload your file again. - - - - - project.bom_import.field_mapping.ignore - Ignore - - - - - project.bom_import.type.kicad_schematic - KiCAD Schematic BOM (CSV file) - - - - - common.back - Back - - - - - project.bom_import.validation.errors.required_field_missing - Line %line%: Required field "%field%" is missing or empty. Please ensure this field is mapped and contains data. - - - - - project.bom_import.validation.errors.no_valid_designators - Line %line%: Designator field contains no valid component references. Expected format: "R1,C2,U3" or "R1, C2, U3". - - - - - project.bom_import.validation.warnings.unusual_designator_format - Line %line%: Some component references may have unusual format: %designators%. Expected format: "R1", "C2", "U3", etc. - - - - - project.bom_import.validation.errors.duplicate_designators - Line %line%: Duplicate component references found: %designators%. Each component should be referenced only once per line. - - - - - project.bom_import.validation.errors.invalid_quantity - Line %line%: Quantity "%quantity%" is not a valid number. Please enter a numeric value (e.g., 1, 2.5, 10). - - - - - project.bom_import.validation.errors.quantity_zero_or_negative - Line %line%: Quantity must be greater than 0, got %quantity%. - - - - - project.bom_import.validation.warnings.quantity_unusually_high - Line %line%: Quantity %quantity% seems unusually high. Please verify this is correct. - - - - - project.bom_import.validation.warnings.quantity_not_whole_number - Line %line%: Quantity %quantity% is not a whole number, but you have %count% component references. This may indicate a mismatch. - - - - - project.bom_import.validation.errors.quantity_designator_mismatch - Line %line%: Mismatch between quantity and component references. Quantity: %quantity%, References: %count% (%designators%). These should match. Either adjust the quantity or check your component references. - - - - - project.bom_import.validation.errors.invalid_partdb_id - Line %line%: Part-DB ID "%id%" is not a valid number. Please enter a numeric ID. - - - - - project.bom_import.validation.errors.partdb_id_zero_or_negative - Line %line%: Part-DB ID must be greater than 0, got %id%. - - - - - project.bom_import.validation.warnings.partdb_id_not_found - Line %line%: Part-DB ID %id% not found in database. The component will be imported without linking to an existing part. - - - - - project.bom_import.validation.info.partdb_link_success - Line %line%: Successfully linked to Part-DB part "%name%" (ID: %id%). - - - - - project.bom_import.validation.warnings.no_component_name - Line %line%: No component name/designation provided (MPN, Designation, or Value). Component will be named "Unknown Component". - - - - - project.bom_import.validation.warnings.package_name_too_long - Line %line%: Package name "%package%" is unusually long. Please verify this is correct. - - - - - project.bom_import.validation.info.library_prefix_detected - Line %line%: Package "%package%" contains library prefix. This will be automatically removed during import. - - - - - project.bom_import.validation.errors.non_numeric_field - Line %line%: Field "%field%" contains non-numeric value "%value%". Please enter a valid number. - - - - - project.bom_import.validation.info.import_summary - Import summary: %total% total entries, %valid% valid, %invalid% with issues. - - - - - project.bom_import.validation.errors.summary - Found %count% validation error(s) that must be fixed before import can proceed. - - - - - project.bom_import.validation.warnings.summary - Found %count% warning(s). Please review these issues before proceeding. - - - - - project.bom_import.validation.info.all_valid - All entries passed validation successfully! - - - - - project.bom_import.validation.summary - Validation Summary - - - - - project.bom_import.validation.total_entries - Total Entries - - - - - project.bom_import.validation.valid_entries - Valid Entries - - - - - project.bom_import.validation.invalid_entries - Invalid Entries - - - - - project.bom_import.validation.success_rate - Success Rate - - - - - project.bom_import.validation.errors.title - Validation Errors - - - - - project.bom_import.validation.errors.description - The following errors must be fixed before the import can proceed: - - - - - project.bom_import.validation.warnings.title - Validation Warnings - - - - - project.bom_import.validation.warnings.description - The following warnings should be reviewed before proceeding: - - - - - project.bom_import.validation.info.title - Information - - - - - project.bom_import.validation.details.title - Detailed Validation Results - - - - - project.bom_import.validation.details.line - Line - - - - - project.bom_import.validation.details.status - Status - - - - - project.bom_import.validation.details.messages - Messages - - - - - project.bom_import.validation.details.valid - Valid - - - - - project.bom_import.validation.details.invalid - Invalid - - - - - project.bom_import.validation.all_valid - All entries are valid and ready for import! - - - - - project.bom_import.validation.fix_errors - Please fix the validation errors before proceeding with the import. - - + + + project.bom_import.map_fields + Map Fields + + + + + project.bom_import.map_fields.help + Configure how CSV columns map to BOM fields + + + + + project.bom_import.delimiter + Delimiter + + + + + project.bom_import.delimiter.comma + Comma (,) + + + + + project.bom_import.delimiter.semicolon + Semicolon (;) + + + + + project.bom_import.delimiter.tab + Tab + + + + + project.bom_import.field_mapping.title + Field Mapping + + + + + project.bom_import.field_mapping.csv_field + CSV Field + + + + + project.bom_import.field_mapping.maps_to + Maps To + + + + + project.bom_import.field_mapping.suggestion + Suggestion + + + + + project.bom_import.field_mapping.priority + Priority + + + + + project.bom_import.field_mapping.priority_help + Priority (lower number = higher priority) + + + + + project.bom_import.field_mapping.priority_short + P + + + + + project.bom_import.field_mapping.priority_note + Priority Tip: Lower numbers = higher priority. Default priority is 10. Use priorities 1-9 for most important fields, 10+ for normal priority. + + + + + project.bom_import.field_mapping.summary + Field Mapping Summary + + + + + project.bom_import.field_mapping.select_to_see_summary + Select field mappings to see summary + + + + + project.bom_import.field_mapping.no_suggestion + No suggestion + + + + + project.bom_import.preview + Preview + + + + + project.bom_import.flash.session_expired + Import session has expired. Please upload your file again. + + + + + project.bom_import.field_mapping.ignore + Ignore + + + + + project.bom_import.type.kicad_schematic + KiCAD Schematic BOM (CSV file) + + + + + common.back + Back + + + + + project.bom_import.validation.errors.required_field_missing + Line %line%: Required field "%field%" is missing or empty. Please ensure this field is mapped and contains data. + + + + + project.bom_import.validation.errors.no_valid_designators + Line %line%: Designator field contains no valid component references. Expected format: "R1,C2,U3" or "R1, C2, U3". + + + + + project.bom_import.validation.warnings.unusual_designator_format + Line %line%: Some component references may have unusual format: %designators%. Expected format: "R1", "C2", "U3", etc. + + + + + project.bom_import.validation.errors.duplicate_designators + Line %line%: Duplicate component references found: %designators%. Each component should be referenced only once per line. + + + + + project.bom_import.validation.errors.invalid_quantity + Line %line%: Quantity "%quantity%" is not a valid number. Please enter a numeric value (e.g., 1, 2.5, 10). + + + + + project.bom_import.validation.errors.quantity_zero_or_negative + Line %line%: Quantity must be greater than 0, got %quantity%. + + + + + project.bom_import.validation.warnings.quantity_unusually_high + Line %line%: Quantity %quantity% seems unusually high. Please verify this is correct. + + + + + project.bom_import.validation.warnings.quantity_not_whole_number + Line %line%: Quantity %quantity% is not a whole number, but you have %count% component references. This may indicate a mismatch. + + + + + project.bom_import.validation.errors.quantity_designator_mismatch + Line %line%: Mismatch between quantity and component references. Quantity: %quantity%, References: %count% (%designators%). These should match. Either adjust the quantity or check your component references. + + + + + project.bom_import.validation.errors.invalid_partdb_id + Line %line%: Part-DB ID "%id%" is not a valid number. Please enter a numeric ID. + + + + + project.bom_import.validation.errors.partdb_id_zero_or_negative + Line %line%: Part-DB ID must be greater than 0, got %id%. + + + + + project.bom_import.validation.warnings.partdb_id_not_found + Line %line%: Part-DB ID %id% not found in database. The component will be imported without linking to an existing part. + + + + + project.bom_import.validation.info.partdb_link_success + Line %line%: Successfully linked to Part-DB part "%name%" (ID: %id%). + + + + + project.bom_import.validation.warnings.no_component_name + Line %line%: No component name/designation provided (MPN, Designation, or Value). Component will be named "Unknown Component". + + + + + project.bom_import.validation.warnings.package_name_too_long + Line %line%: Package name "%package%" is unusually long. Please verify this is correct. + + + + + project.bom_import.validation.info.library_prefix_detected + Line %line%: Package "%package%" contains library prefix. This will be automatically removed during import. + + + + + project.bom_import.validation.errors.non_numeric_field + Line %line%: Field "%field%" contains non-numeric value "%value%". Please enter a valid number. + + + + + project.bom_import.validation.info.import_summary + Import summary: %total% total entries, %valid% valid, %invalid% with issues. + + + + + project.bom_import.validation.errors.summary + Found %count% validation error(s) that must be fixed before import can proceed. + + + + + project.bom_import.validation.warnings.summary + Found %count% warning(s). Please review these issues before proceeding. + + + + + project.bom_import.validation.info.all_valid + All entries passed validation successfully! + + + + + project.bom_import.validation.summary + Validation Summary + + + + + project.bom_import.validation.total_entries + Total Entries + + + + + project.bom_import.validation.valid_entries + Valid Entries + + + + + project.bom_import.validation.invalid_entries + Invalid Entries + + + + + project.bom_import.validation.success_rate + Success Rate + + + + + project.bom_import.validation.errors.title + Validation Errors + + + + + project.bom_import.validation.errors.description + The following errors must be fixed before the import can proceed: + + + + + project.bom_import.validation.warnings.title + Validation Warnings + + + + + project.bom_import.validation.warnings.description + The following warnings should be reviewed before proceeding: + + + + + project.bom_import.validation.info.title + Information + + + + + project.bom_import.validation.details.title + Detailed Validation Results + + + + + project.bom_import.validation.details.line + Line + + + + + project.bom_import.validation.details.status + Status + + + + + project.bom_import.validation.details.messages + Messages + + + + + project.bom_import.validation.details.valid + Valid + + + + + project.bom_import.validation.details.invalid + Invalid + + + + + project.bom_import.validation.all_valid + All entries are valid and ready for import! + + + + + project.bom_import.validation.fix_errors + Please fix the validation errors before proceeding with the import. + + + + + project.bom_import.type.generic_csv + Generic CSV + +