diff --git a/app/views/model_files/_problem.html.erb b/app/views/model_files/_problem.html.erb
new file mode 100644
index 000000000..8b9f01d5c
--- /dev/null
+++ b/app/views/model_files/_problem.html.erb
@@ -0,0 +1,11 @@
+<%= card(problem_severity(problem), t("problems.model_file_#{problem.category}.title")) do %>
+ <%= t("problems.model_file_#{problem.category}.description", note: problem.note ) %>
+
+ <% unless @duplicates.empty? %>
+
+ <% @duplicates.each do |file| %>
+ - <%= link_to "#{file.model.name}/#{file.filename}", [file.model.library, file.model, file]%>
+ <% end %>
+
+ <% end %>
+<% end %>
diff --git a/app/views/model_files/show.html.erb b/app/views/model_files/show.html.erb
index 99a579095..591fac15a 100644
--- a/app/views/model_files/show.html.erb
+++ b/app/views/model_files/show.html.erb
@@ -29,18 +29,7 @@
<%= render 'form' %>
<% end %>
- <% unless @duplicates.empty? %>
- <%= card :warning, t('.duplicate_card.title') do %>
-
- <%= t('.duplicate_card.message') %>
-
-
- <% @duplicates.each do |file| %>
- - <%= link_to "#{file.model.name}/#{file.filename}", [file.model.library, file.model, file]%>
- <% end %>
-
- <% end %>
- <% end %>
+ <%= render partial: "problem", collection: @file.problems %>
<%= card :secondary, "Actions" do %>
<%= link_to "#{icon('cloud-download', 'Download')} Download".html_safe, library_model_model_file_path(@library, @model, @file, @file.extension.to_sym), {class: "btn btn-secondary"} %>
diff --git a/app/views/models/_problem.html.erb b/app/views/models/_problem.html.erb
new file mode 100644
index 000000000..dec2ac9a8
--- /dev/null
+++ b/app/views/models/_problem.html.erb
@@ -0,0 +1,16 @@
+<%= card(problem_severity(problem), t("problems.model_#{problem.category}.title")) do %>
+ <%= t("problems.model_#{problem.category}.description", note: problem.note ) %>
+
+ <% if @model.contains_other_models? %>
+
+ <% @model.contained_models.each do |target| %>
+ - <%= link_to target.name, library_model_path(@library, target)%>
+ <% end %>
+
+
+ <%= t("problems.model_nesting.warning") %>
+
+ <%= link_to "Merge all", merge_library_model_path(@library, @model, all: true), class: "btn btn-danger", method: :post %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/models/show.html.erb b/app/views/models/show.html.erb
index 5cfd5962e..da0ebf451 100644
--- a/app/views/models/show.html.erb
+++ b/app/views/models/show.html.erb
@@ -84,22 +84,7 @@
<% end %>
<% end %>
- <% if @model.contains_other_models? %>
- <%= card :warning, "Contained Models" do %>
-
- The model folder on disk contains other models. You may wish to merge them into this one, or move them out.
-
-
- <% @model.contained_models.each do |target| %>
- - <%= link_to target.name, library_model_path(@library, target)%>
- <% end %>
-
-
- Bulk merging moves all files from the models above into this one, and removes them. File metadata is preserved, but any model metadata will be lost!
-
- <%= link_to "Merge all", merge_library_model_path(@library, @model, all: true), class: "btn btn-danger", method: :post %>
- <% end %>
- <% end %>
+ <%= render partial: "problem", collection: @model.problems %>
<%= card(:secondary, 'Notes') do %>
<%= sanitize @model.notes %>
diff --git a/app/views/problems/_library_missing.html.erb b/app/views/problems/_library_missing.html.erb
index 1087f0155..823d25e31 100644
--- a/app/views/problems/_library_missing.html.erb
+++ b/app/views/problems/_library_missing.html.erb
@@ -1,4 +1,4 @@
-<%= icon("boxes", "Missing library") %> |
+<%= icon("boxes", t(".title")) %> |
<%= link_to problem.problematic.name, problem.problematic %> |
-<%= t "problems.library.missing" %> |
+<%= t ".title" %> |
|
diff --git a/app/views/problems/_model_empty.html.erb b/app/views/problems/_model_empty.html.erb
index 8bb51d44d..2f83b5b81 100644
--- a/app/views/problems/_model_empty.html.erb
+++ b/app/views/problems/_model_empty.html.erb
@@ -1,4 +1,4 @@
-<%= icon("folder-x", "Empty model") %> |
+<%= icon("folder-x", t(".title")) %> |
<%= link_to problem.problematic.name, [problem.problematic.library, problem.problematic] %> |
-<%= t "problems.model.empty" %> |
+<%= t ".title" %> |
<%= link_to "Purge", [problem.problematic.library, problem.problematic], method: :delete, class: "btn btn-danger" %> |
diff --git a/app/views/problems/_model_file_duplicate.html.erb b/app/views/problems/_model_file_duplicate.html.erb
index e9434126a..4fa48d7ed 100644
--- a/app/views/problems/_model_file_duplicate.html.erb
+++ b/app/views/problems/_model_file_duplicate.html.erb
@@ -1,4 +1,4 @@
-<%= icon("files", t(".description")) %> |
+<%= icon("files", t(".title")) %> |
<%= link_to problem.problematic.name, [problem.problematic.model.library, problem.problematic.model, problem.problematic] %> |
-<%= t ".description" %> |
+<%= t ".title" %> |
<%= link_to "Open", [problem.problematic.model.library, problem.problematic.model, problem.problematic], class: "btn btn-primary" %> |
diff --git a/app/views/problems/_model_file_inefficient.html.erb b/app/views/problems/_model_file_inefficient.html.erb
index 3785b244d..07a04d3ab 100644
--- a/app/views/problems/_model_file_inefficient.html.erb
+++ b/app/views/problems/_model_file_inefficient.html.erb
@@ -1,4 +1,4 @@
-<%= icon("fire", t(".description")) %> |
+<%= icon("fire", t(".title")) %> |
<%= link_to problem.problematic.name, [problem.problematic.model.library, problem.problematic.model, problem.problematic] %> |
-<%= t ".description" %>: <%= problem.note %> |
+<%= t ".title" %>: <%= problem.note %> |
<%= link_to "Open", [problem.problematic.model.library, problem.problematic.model, problem.problematic], class: "btn btn-primary" %> |
diff --git a/app/views/problems/_model_file_missing.html.erb b/app/views/problems/_model_file_missing.html.erb
index 21f924ae8..847dd116d 100644
--- a/app/views/problems/_model_file_missing.html.erb
+++ b/app/views/problems/_model_file_missing.html.erb
@@ -1,4 +1,4 @@
-<%= icon("file-x", "Missing file") %> |
+<%= icon("file-x", t(".title")) %> |
<%= link_to problem.problematic.name, [problem.problematic.model.library, problem.problematic.model, problem.problematic] %> |
-<%= t "problems.model_file.missing" %> |
+<%= t ".title" %> |
<%= link_to "Purge", [problem.problematic.model.library, problem.problematic.model, problem.problematic], method: :delete, class: "btn btn-danger" %> |
diff --git a/app/views/problems/_model_missing.html.erb b/app/views/problems/_model_missing.html.erb
index 68881199d..2f83b5b81 100644
--- a/app/views/problems/_model_missing.html.erb
+++ b/app/views/problems/_model_missing.html.erb
@@ -1,4 +1,4 @@
-<%= icon("folder-x", "Missing model") %> |
+<%= icon("folder-x", t(".title")) %> |
<%= link_to problem.problematic.name, [problem.problematic.library, problem.problematic] %> |
-<%= t "problems.model.missing" %> |
+<%= t ".title" %> |
<%= link_to "Purge", [problem.problematic.library, problem.problematic], method: :delete, class: "btn btn-danger" %> |
diff --git a/app/views/problems/_model_nesting.html.erb b/app/views/problems/_model_nesting.html.erb
index 56fc67c0d..210e34ddb 100644
--- a/app/views/problems/_model_nesting.html.erb
+++ b/app/views/problems/_model_nesting.html.erb
@@ -1,4 +1,4 @@
-<%= icon("files-alt", "Nested model") %> |
+<%= icon("files-alt", t(".title")) %> |
<%= link_to problem.problematic.name, [problem.problematic.library, problem.problematic] %> |
-<%= t "problems.model.nesting" %> |
+<%= t ".title" %> |
<%= link_to "Open", [problem.problematic.library, problem.problematic], class: "btn btn-primary" %> |
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 142efd2b1..75c711e59 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -55,11 +55,6 @@ en:
CC0-10: Creative Commons Zero
LicenseRef-Commercial: Commercial; private use only
MIT: MIT
- model_files:
- show:
- duplicate_card:
- message: This file is duplicated in other models. You may wish to remove some.
- title: Duplicated files
problems:
categories:
duplicate: Duplicate files
@@ -67,18 +62,27 @@ en:
inefficient: Inefficient formats
missing: Missing files or folders
nesting: Model contains other models
- library:
- missing: Library folder not found
- model:
- empty: Model has no files
- missing: Model folder not found
- nesting: Model contains other models
- model_file:
- missing: File not found
+ library_missing:
+ title: Folder not found
+ model_empty:
+ description: This model contains no files. Either delete it, or find where its files went!
+ title: No files
model_file_duplicate:
- description: Duplicated file
+ description: This file is duplicated in other models. You may wish to remove some.
+ title: Duplicated file
model_file_inefficient:
- description: Inefficient file format
+ description: This file is in %{note}, an inefficient file format. Consider converting it to a binary format such as 3MF to save disk space.
+ title: Inefficient format
+ model_file_missing:
+ description: This file is missing on disk; either delete it, or find where it went!
+ title: File not found
+ model_missing:
+ description: The folder for this model is missing on disk; either delete it, or find where it went!
+ title: Folder not found
+ model_nesting:
+ description: The model folder on disk contains other models. You may wish to merge them into this one, or move them out.
+ title: Contains other models
+ warning: Bulk merging moves all files from the models above into this one, and removes them. File metadata is preserved, but any model metadata will be lost!
severities:
danger: Danger
info: Info