Merge pull request #823 from McGiverGim/bf-i18n_release_checker
i18n release checker and changelog action10.3.x-maintenance
commit
fb4fa32b42
|
@ -220,6 +220,18 @@
|
|||
"infoVersions": {
|
||||
"message" : "Running - OS: <strong>$1</strong>, Chrome: <strong>$2</strong>, Configurator: <strong>$3</strong>"
|
||||
},
|
||||
"releaseCheckLoaded": {
|
||||
"message" : "Loaded release information for $1 from GitHub."
|
||||
},
|
||||
"releaseCheckFailed": {
|
||||
"message" : "<b>GitHub query for $1 releases failed, using cached information. Reason: <code>$2</code></b>"
|
||||
},
|
||||
"releaseCheckCached": {
|
||||
"message" : "Using cached release information for $1 releases."
|
||||
},
|
||||
"releaseCheckNoInfo": {
|
||||
"message" : "No release information available for $1."
|
||||
},
|
||||
"tabSwitchConnectionRequired": {
|
||||
"message": "You need to <strong>connect</strong> before you can view any of the tabs."
|
||||
},
|
||||
|
@ -331,7 +343,7 @@
|
|||
},
|
||||
"defaultChangelogAction": {
|
||||
"message": "Changelog"
|
||||
},
|
||||
},
|
||||
"defaultChangelogHead": {
|
||||
"message": "Configurator - Changelog"
|
||||
},
|
||||
|
|
|
@ -19,7 +19,7 @@ ReleaseChecker.prototype.loadReleaseData = function (processFunction) {
|
|||
var cachedReleaseLastUpdate = result[self._releaseLastUpdateTag];
|
||||
if (!cacheReleaseData || !cachedReleaseLastUpdate || releaseDataTimestamp - cachedReleaseLastUpdate > 3600 * 1000) {
|
||||
$.get(self._releaseUrl, function (releaseData) {
|
||||
GUI.log(`Loaded release information for ${self._releaseName} from GitHub.`);
|
||||
GUI.log(chrome.i18n.getMessage('releaseCheckLoaded',[self._releaseName]));
|
||||
|
||||
var data = {};
|
||||
data[self._releaseDataTag] = releaseData
|
||||
|
@ -32,13 +32,13 @@ ReleaseChecker.prototype.loadReleaseData = function (processFunction) {
|
|||
if (data['responseJSON']) {
|
||||
message = data['responseJSON'].message;
|
||||
}
|
||||
GUI.log(`<b>GitHub query for ${self._releaseName} releases failed, using cached information. Reason: <code>${message}</code></b>`);
|
||||
GUI.log(chrome.i18n.getMessage('releaseCheckFailed',[self._releaseName,message]));
|
||||
|
||||
self._processReleaseData(cacheReleaseData, processFunction);
|
||||
});
|
||||
} else {
|
||||
if (cacheReleaseData) {
|
||||
GUI.log(`Using cached release information for ${self._releaseName} releases.`);
|
||||
GUI.log(chrome.i18n.getMessage('releaseCheckCached',[self._releaseName]));
|
||||
}
|
||||
|
||||
self._processReleaseData(cacheReleaseData, processFunction);
|
||||
|
@ -51,7 +51,7 @@ ReleaseChecker.prototype._processReleaseData = function (releaseData, processFun
|
|||
if (releaseData) {
|
||||
processFunction(releaseData);
|
||||
} else {
|
||||
GUI.log(`No release information available for ${self._releaseName}.`);
|
||||
GUI.log(chrome.i18n.getMessage('releaseCheckNoInfo',[self._releaseName]));
|
||||
|
||||
processFunction();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ TABS.landing.initialize = function (callback) {
|
|||
$("#content").addClass('log_open');
|
||||
state = true;
|
||||
}
|
||||
$(this).text(state ? 'Close' : 'Changelog');
|
||||
$(this).text(state ? chrome.i18n.getMessage('close') : chrome.i18n.getMessage('defaultChangelogAction'));
|
||||
$(this).data('state2', state);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue