chore($translate): using shims for trim and indexOf