Regulären Ausdruck so angepasst, dass auch '- BG', bzw. Variationen davon aus der Bezeichnung entfernt wird. Ohne Entfernung wird beim Migrieren an das bereits bestehende '- BG' nochmal ein '- BG' angehängt
This commit is contained in:
+1
-1
@@ -408,7 +408,7 @@ class CadItem(DataModel):
|
||||
# Spezial: Abkürzungen .kpl rausschmeissen. Text eventuell kürzen
|
||||
if "bezeichnung1_sivas" in translated_data:
|
||||
text = translated_data["bezeichnung1_sivas"]
|
||||
substituted_text = re.sub(r"\s+kpl[.|\s]", "", text, flags=re.I)
|
||||
substituted_text = re.sub(r"\s+(?:-\s*bg|kpl)[.|\s]*", "", text, flags=re.I)
|
||||
if substituted_text != text:
|
||||
translated_data["bezeichnung1_neu"] = substituted_text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user