Nonlinear elastic problems in dislocation theory: a gauge approach