diff --git a/FS25_ADSmartPickup/gui/SmartPickupFieldTab.lua b/FS25_ADSmartPickup/gui/SmartPickupFieldTab.lua
index a5f8828..fdd467d 100644
--- a/FS25_ADSmartPickup/gui/SmartPickupFieldTab.lua
+++ b/FS25_ADSmartPickup/gui/SmartPickupFieldTab.lua
@@ -53,11 +53,32 @@ function SmartPickupFrame:soilText(info)
return table.concat(texts, ", ")
end
-function SmartPickupFrame:fieldStatusText(field, info)
+-- Kort årsag til tabellens statuskolonne ("bredde ukendt" i stedet for hele forklaringen, som står i
+-- markens detaljer). Fritekst-årsager (fx "… er tom for X") forkortes til "se detaljer".
+function SmartPickupFrame:fieldReasonShort(reason)
+ if type(reason) ~= "table" then return nil end
+ if reason.text ~= nil then return self.i18n:getText("spu_field_reasonShort_text") end
+ local shortKey = reason.key ~= nil and string.gsub(reason.key, "^spu_field_reason_", "spu_field_reasonShort_") or nil
+ if shortKey ~= nil then
+ local okHas, has = pcall(function() return self.i18n.hasText == nil or self.i18n:hasText(shortKey) end)
+ if okHas and has then return self.i18n:getText(shortKey) end
+ end
+ return self:fieldReasonText(reason)
+end
+
+-- short = tabellens korte udgave (trin + kort årsag); ellers hele teksten (markens detaljer).
+function SmartPickupFrame:fieldStatusText(field, info, short)
local text = self.i18n:getText(ADFieldView.statusKey(field, info))
if info.markerId == nil then
return string.format(text, info.id)
end
+ if short then
+ if (field.stage == "idle" or field.stage == "ready") and info.kind ~= "bare" and info.readyRatio ~= nil then
+ text = string.format("%s %d %%", text, math.floor((info.readyRatio or 0) * 100 + 0.5))
+ end
+ local reason = self:fieldReasonShort(field.reason)
+ return reason ~= nil and (text .. ": " .. reason) or text
+ end
if (field.stage == "idle" or field.stage == "ready") and info.kind ~= "bare" and info.readyRatio ~= nil then
text = string.format("%s %d %%", text, math.floor((info.readyRatio or 0) * 100 + 0.5))
end
@@ -113,7 +134,7 @@ function SmartPickupFrame:fieldCells(row)
return {
name, crop, self:fieldPlanText(field, info),
self.i18n:getText(field.plan.mode == "auto" and "spu_field_mode_auto" or "spu_field_mode_manual"),
- self:fieldStatusText(field, info),
+ self:fieldStatusText(field, info, true),
ADFlowView.joinCounted(names, ", ", "-"),
}
end
diff --git a/FS25_ADSmartPickup/l10n/l10n_da.xml b/FS25_ADSmartPickup/l10n/l10n_da.xml
index a64c979..3546aea 100644
--- a/FS25_ADSmartPickup/l10n/l10n_da.xml
+++ b/FS25_ADSmartPickup/l10n/l10n_da.xml
@@ -51,6 +51,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -66,7 +77,7 @@
-
+
diff --git a/FS25_ADSmartPickup/l10n/l10n_en.xml b/FS25_ADSmartPickup/l10n/l10n_en.xml
index 38fc1b5..1f6fe64 100644
--- a/FS25_ADSmartPickup/l10n/l10n_en.xml
+++ b/FS25_ADSmartPickup/l10n/l10n_en.xml
@@ -51,6 +51,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -66,7 +77,7 @@
-
+
diff --git a/FS25_ADSmartPickup/modDesc.xml b/FS25_ADSmartPickup/modDesc.xml
index bccc863..e70b9ff 100644
--- a/FS25_ADSmartPickup/modDesc.xml
+++ b/FS25_ADSmartPickup/modDesc.xml
@@ -1,7 +1,7 @@
masterdraco
- 1.30.1.0
+ 1.30.2.0
AD Smart Pickup