Skip to content

Commit 7a66a70

Browse files
committed
fix: Don't import description as item name
1 parent 781933f commit 7a66a70

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/Services/Parser/SC/AbstractCommodityItem.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ protected function getDescriptionText(string $description): string
114114
protected function getName(array $attachDef, string $default): string
115115
{
116116
$key = substr($attachDef['Localization']['Name'], 1);
117+
if (str_contains($key, '_Desc_')) {
118+
$key = str_replace('_Desc_', '_Name_', $key);
119+
}
117120
$name = $this->labels->getData()->get($key);
118121
$nameP = $this->labels->getData()->get($key.',P');
119122
$name = $this->cleanString(trim($name ?? $nameP ?? $default));

0 commit comments

Comments
 (0)