localization: Move assignment out of condition

This is easier to read.