elizagamedev / wolftrans

Translation tool for Wolf RPG Editor games
Mozilla Public License 2.0
47 stars 9 forks source link

invalid path specified for DB context line #1

Open N1nj4R4bb1D opened 8 years ago

N1nj4R4bb1D commented 8 years ago

wolftrans-0.2.0/lib/wolftrans/context.rb:178:in `from_string': invalid path specified for DB context line (line 5) (RuntimeError)

This problem crops up with many games because some Type names in User database contain "/" character. I fixed it for myself with a small dirty edit in context.rb:178

    if path.size != 4
      path = path.join("/")
      path = path.split(/\/(?=\[\d+\])/)
      if path.size != 4
        raise "invalid path specified for DB context line"
      end
    end

Maybe it's worth loking into!?

ikarosf commented 4 years ago

thank for fix