Dealing with bilingual(spoken language) code?
Posted
by
user1525
on Programmers
See other posts from Programmers
or by user1525
Published on 2011-03-16T19:44:52Z
Indexed on
2011/03/17
0:19 UTC
Read the original article
Hit count: 130
So I've got to work with this set of code here for a re-write, and it's written by people who speak both English and French.
Here's a snapshot of what I'm talking about (only, about 4000 lines of this)
function refreshDest(FormEnCours,dest,hotel,duration) {
var GateEnCours;
GateEnCours = FormEnCours.gateway_dep.options[FormEnCours.gateway_dep.selectedIndex].value;
if (GateEnCours == "") {
FormEnCours.dest_dep.length = 0
} else if (FormEnCours.dest_dep != null && FormEnCours.dest_dep.type && FormEnCours.dest_dep.value != "ALL") {
if (Destinations[GateEnCours] == null || Destinations[GateEnCours].length == 0) {
RetreiveDestinations(FormEnCours,GateEnCours,dest,hotel,duration);
} else { refreshDestSuite(FormEnCours,GateEnCours,dest,hotel,duration); }
}
}
function refreshDuration(FormEnCours,GateEnCours,DestEnCours,hotel,duration) {
// Refresh durations
var FlagMoinsDe5Jours = "";
var Flag5a10jours = "";
var Flag11a16jours = "";
var FlagPlusDe16Jours = "";
.......
Is there any approach that I, as a speaker of only one of these languages, can use to make this entire process a lot less painful for both figuring out what everything does, and then refactoring it?
© Programmers or respective owner