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

Commit 4374445

Browse files
authored
Merge pull request #14995 from jha-g/jha-g/fixing-update-notification-locale
Fixing update notification locale issue, update notification was shown in English for all locales
2 parents 935efa1 + e0ea84e commit 4374445

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

src/brackets.config.dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"analyticsDataServerURL" : "https://cc-api-data.adobe.io/ingest",
44
"serviceKey" : "brackets-service",
55
"environment" : "production",
6-
"update_info_url" : "https://getupdates.brackets.io/getupdates/",
6+
"update_info_url" : "https://getupdates.brackets.io/getupdates?locale=<locale>",
77
"notification_info_url" : "https://getupdates.brackets.io/getnotifications?locale=<locale>",
88
"buildtype" : "production"
99
}

src/utils/UpdateNotification.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -115,33 +115,7 @@ define(function (require, exports, module) {
115115
locale = locale.substring(0, 2);
116116
}
117117

118-
//AUTOUPDATE_PRERELEASE_BEGIN
119-
// The following code is needed for supporting Auto Update in prerelease,
120-
//and will be removed eventually for stable releases
121-
{
122-
if (locale) {
123-
if(locale.length > 2) {
124-
locale = locale.substring(0, 2);
125-
}
126-
switch(locale) {
127-
case "de":
128-
break;
129-
case "es":
130-
break;
131-
case "fr":
132-
break;
133-
case "ja":
134-
break;
135-
case "en":
136-
default:
137-
locale = "en";
138-
}
139-
return brackets.config.update_info_url.replace("<locale>", locale);
140-
}
141-
}
142-
//AUTOUPDATE_PRERELEASE_END
143-
144-
return brackets.config.update_info_url + '?locale=' + locale;
118+
return brackets.config.update_info_url.replace('<locale>', locale || 'en');
145119
}
146120

147121
/**

0 commit comments

Comments
 (0)