Skip to content

Commit

Permalink
fix bug where french drupal6 pages use english term names
Browse files Browse the repository at this point in the history
  • Loading branch information
demetrios-koziris committed Dec 27, 2016
1 parent 41411c9 commit ad64002
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions src/js/addProfLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ The GNU General Public License can also be found at <http://www.gnu.org/licenses

function makeProfLinks() {



terms = {
'Fall': {
'code': 9,
Expand Down Expand Up @@ -62,24 +60,19 @@ function makeProfLinks() {
}

for (let termKey in terms) {

const profsTermSource = profsFullSource.split("(" + termKey + ")");
termName = ( isNewStyle ? termKey : termNames[lang][terms[termKey].code] );
const profsTermSource = profsFullSource.split("(" + termName + ")");
if (profsTermSource.length > 1) {
profsForTerm = profsTermSource[0].split(",");

for (let p=0; p<profsForTerm.length; p++) {

let newProfObject = generateProfObject(minervaProfs, profsForTerm[p], termKey);
if (newProfObject.key in profs) {
// add term to prof object
profs[newProfObject.key].termsTeaching[termKey] = terms[termKey];
console.log(terms[termKey]);
}
else {
if (!(newProfObject.key in profs)) {
profs[newProfObject.key] = newProfObject;
profs[newProfObject.key].termsTeaching[termKey] = terms[termKey];
console.log(newProfObject);
}
// add term info to prof object
profs[newProfObject.key].termsTeaching[termKey] = terms[termKey];
}
profsFullSource = profsTermSource[1];
}
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "McGill Enhanced",
"author": "Demetrios Koziris",
"manifest_version": 2,
"version": "3.0.28",
"version": "3.0.289",
"description": "Enhance the functionality of McGill.ca",
"permissions" : [
"declarativeContent",
Expand Down

0 comments on commit ad64002

Please sign in to comment.