Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fixing update notification locale issue, update notification was shown in English for all locales #14995

Merged
merged 2 commits into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/brackets.config.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"analyticsDataServerURL" : "https://cc-api-data.adobe.io/ingest",
"serviceKey" : "brackets-service",
"environment" : "production",
"update_info_url" : "https://getupdates.brackets.io/getupdates/",
"update_info_url" : "https://getupdates.brackets.io/getupdates?locale=<locale>",
"notification_info_url" : "https://getupdates.brackets.io/getnotifications?locale=<locale>",
"buildtype" : "production"
}
28 changes: 1 addition & 27 deletions src/utils/UpdateNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,33 +115,7 @@ define(function (require, exports, module) {
locale = locale.substring(0, 2);
}

//AUTOUPDATE_PRERELEASE_BEGIN
g-217 marked this conversation as resolved.
Show resolved Hide resolved
// The following code is needed for supporting Auto Update in prerelease,
//and will be removed eventually for stable releases
{
if (locale) {
if(locale.length > 2) {
locale = locale.substring(0, 2);
}
switch(locale) {
case "de":
break;
case "es":
break;
case "fr":
break;
case "ja":
break;
case "en":
default:
locale = "en";
}
return brackets.config.update_info_url.replace("<locale>", locale);
}
}
//AUTOUPDATE_PRERELEASE_END

return brackets.config.update_info_url + '?locale=' + locale;
return brackets.config.update_info_url.replace('<locale>', locale || 'en');
}

/**
Expand Down