Line 24: |
Line 24: |
| local formNum = mw.ustring.find(shipmodule.data[shipNum]["name"][1], "[改甲航]") | | local formNum = mw.ustring.find(shipmodule.data[shipNum]["name"][1], "[改甲航]") |
| if formNum == nil then | | if formNum == nil then |
− | if mw.ustring.find(shipmodule.data[shipNum]["name"][1], "zwei") ~= nil then | + | if mw.ustring.find(shipmodule.data[shipNum]["name"][1], "%szwei") ~= nil then |
− | kanji = mw.text.split(shipmodule.data[shipNum]["name"][1], "%s")[1] | + | formNum = mw.ustring.find(shipmodule.data[shipNum]["name"][1], "%szwei") |
| + | kanji = mw.ustring.sub(shipmodule.data[shipNum]["name"][1], 1, formNum - 1) |
| form = " zwei" | | form = " zwei" |
− | elseif mw.ustring.find(shipmodule.data[shipNum]["name"][1], "drei") ~= nil then | + | elseif mw.ustring.find(shipmodule.data[shipNum]["name"][1], "%sdrei") ~= nil then |
− | kanji = mw.text.split(shipmodule.data[shipNum]["name"][1], "%s")[1] | + | formNum = mw.ustring.find(shipmodule.data[shipNum]["name"][1], "%sdrei") |
| + | kanji = mw.ustring.sub(shipmodule.data[shipNum]["name"][1], 1, formNum - 1) |
| form = " drei" | | form = " drei" |
− | elseif mw.ustring.find(shipmodule.data[shipNum]["name"][1], "due") ~= nil then | + | elseif mw.ustring.find(shipmodule.data[shipNum]["name"][1], "%sdue") ~= nil then |
− | kanji = mw.text.split(shipmodule.data[shipNum]["name"][1], "%s")[1] | + | formNum = mw.ustring.find(shipmodule.data[shipNum]["name"][1], "%sdue") |
| + | kanji = mw.ustring.sub(shipmodule.data[shipNum]["name"][1], 1, formNum - 1) |
| form = " due" | | form = " due" |
| else | | else |