Thai submarine to replace German technology with Chinese engine