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

Wordsmithing on Health Data strings #10833

Merged
merged 2 commits into from
Apr 7, 2015
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
8 changes: 4 additions & 4 deletions src/extensibility/ExtensionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ define(function (require, exports, module) {
/**
* @private
* @type {Object.<string, {metadata: Object, path: string, status: string}>}
* The set of all extensions (registry and locally installed) present in user location.
* The set of all extensions (in registry and locally installed) present in user location.
* The fields of each record are:
* registryInfo: object containing the info for this id from the main registry (containing metadata, owner,
* and versions).
* installInfo: object containing the info for a locally-installed extension:
* metadata: the package metadata loaded from the local package.json, or null if it's a legacy extension.
* path: the local path to the extension folder on disk
Expand Down Expand Up @@ -824,9 +822,11 @@ define(function (require, exports, module) {
exports.updateExtensions = updateExtensions;
exports.getAvailableUpdates = getAvailableUpdates;
exports.cleanAvailableUpdates = cleanAvailableUpdates;

exports.registryObject = registryObject;

exports.ENABLED = ENABLED;
exports.START_FAILED = START_FAILED;
exports.registryObject = registryObject;

exports.LOCATION_DEFAULT = LOCATION_DEFAULT;
exports.LOCATION_DEV = LOCATION_DEV;
Expand Down
10 changes: 5 additions & 5 deletions src/extensions/default/HealthData/HealthDataManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ define(function (require, exports, module) {
params.parse();

/**
* Get the health data which will be sent to the server. Initially it is only one time data.
* Get the Health Data which will be sent to the server. Initially it is only one time data.
*/
function getHealthData() {
var result = new $.Deferred(),
Expand Down Expand Up @@ -98,7 +98,7 @@ define(function (require, exports, module) {
result.resolve();
})
.fail(function (jqXHR, status, errorThrown) {
console.error("Error in sending health data. Response : " + jqXHR.responseText + ". Status : " + status + ". Error : " + errorThrown);
console.error("Error in sending Health Data. Response : " + jqXHR.responseText + ". Status : " + status + ". Error : " + errorThrown);
result.reject();
});
})
Expand All @@ -110,8 +110,8 @@ define(function (require, exports, module) {
}

/*
* Check if the health data is to be sent to the server. If the user has enabled tracking, health data will be sent once every 24 hours.
* Send health data to the server if the period is more than 24 hours.
* Check if the Health Data is to be sent to the server. If the user has enabled tracking, Health Data will be sent once every 24 hours.
* Send Health Data to the server if the period is more than 24 hours.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we need to capitalize every place we use the phrase "health data," since it's not the official name of the feature or anything. I could see capitalizing (part of) the phrase "Health Report data" since that matches the user-facing feature name. Not a big deal either way though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought that was the official name, and I wanted to harmonize all the different notations a little.

* We are sending the data as soon as the user launches brackets. The data will be sent to the server only after the notification dialog
* for opt-out/in is closed.
*/
Expand All @@ -126,7 +126,7 @@ define(function (require, exports, module) {
currentTime = (new Date()).getTime();

if (!lastTimeSent || (currentTime >= lastTimeSent + ONE_DAY)) {
//Setting the time here to avoid any chance of sending data before ONE_DAY. Whether the request to server gets completed or failed we will be sending the data only after ONE_DAY.
// Setting the time here to avoid any chance of sending data before ONE_DAY. Whether or not the request to the server is successful, we will be sending the data only after ONE_DAY has passed.
PreferencesManager.setViewState("lastTimeSentData", (new Date()).getTime());
sendHealthDataToServer()
.done(function () {
Expand Down
5 changes: 2 additions & 3 deletions src/extensions/default/HealthData/HealthDataNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ define(function (require, exports, module) {
// Parse URL params
var params = new UrlParams();
/**
* Show dialog for fist time to the user regarding log capturing by Brackets
* Show dialog for first time to the user regarding data capturing by Brackets
*/
function showDialogHealthDataNotification() {
var hdPref = prefs.get("healthDataTracking"),
Expand Down Expand Up @@ -79,7 +79,7 @@ define(function (require, exports, module) {

AppInit.appReady(function () {
params.parse();
// check for showing the HealthData Notification to the user. It will be shown one time. Does not check in testing environment
// Check whether the notification dialog should be shown. It will be shown one time. Does not check in testing environment.
if (!params.get("skipHealthDataNotification")) {
var isShown = PreferencesManager.getViewState("healthDataNotificationShown");

Expand All @@ -94,5 +94,4 @@ define(function (require, exports, module) {

exports.showDialogHealthDataNotification = showDialogHealthDataNotification;
exports.handleHealthDataStatistics = handleHealthDataStatistics;

});
3 changes: 1 addition & 2 deletions src/extensions/default/HealthData/HealthDataPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ define(function (require, exports, module) {
ExtensionUtils.loadStyleSheet(module, "styles.css");

/**
* Show the dialog for previewing the Health data, to be sent to the server.
* Show the dialog for previewing the Health Data that will be sent.
*/
function previewHealthData() {
var result = new $.Deferred();
Expand Down Expand Up @@ -74,5 +74,4 @@ define(function (require, exports, module) {
}

exports.previewHealthData = previewHealthData;

});
2 changes: 1 addition & 1 deletion src/extensions/default/HealthData/HealthDataUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ define(function (require, exports, module) {

/**
* @private
* Check for each user installed extensions if present in registry.
* For each user installed extension, check if it's present in the registry.
* @param {Object} object that contains information about extensions fetched from registry
* @param {Object} all user installed extensions
* return {Array} userInstalledExtensions
Expand Down
4 changes: 2 additions & 2 deletions src/extensions/default/HealthData/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ define(function (require, exports, module) {
var menu = Menus.getMenu(Menus.AppMenuBar.HELP_MENU),
healthDataCmdId = "healthData.healthDataStatistics";

//handles the command execution for healthData menu item
// Handles the command execution for Health Data menu item
function handleHealthDataStatistics() {
HealthDataNotification.handleHealthDataStatistics();
}

// Register the command and add the menu item for the HealthData Statistics
// Register the command and add the menu item for the Health Data Statistics
function addCommand() {
CommandManager.register(Strings.CMD_HEALTH_DATA_STATISTICS, healthDataCmdId, handleHealthDataStatistics);

Expand Down
15 changes: 7 additions & 8 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,12 @@ define({
"LANGUAGE_CANCEL" : "Cancel",
"LANGUAGE_SYSTEM_DEFAULT" : "System Default",

// extensions/default/HealthData
"HEALTH_DATA_NOTIFICATION" : "Health Data Preferences",
"HEALTH_DATA_DO_TRACK" : "Yes, I would like to share information on how I use Brackets.",
"HEALTH_DATA_NOTIFICATION_MESSAGE" : "In order to improve Brackets, we periodically send <strong>anonymous</strong> data about how you use Brackets.",
"HEALTH_DATA_PREVIEW" : "Health Data Preview",

// extensions/default/InlineTimingFunctionEditor
"INLINE_TIMING_EDITOR_TIME" : "Time",
"INLINE_TIMING_EDITOR_PROGRESSION" : "Progression",
Expand Down Expand Up @@ -623,12 +629,5 @@ define({
"CMD_TOGGLE_RECENT_PROJECTS" : "Recent Projects",

// extensions/default/WebPlatformDocs
"DOCS_MORE_LINK" : "Read more",

//Health Data
"HEALTH_DATA_NOTIFICATION" : "HealthData Preferences",
"HEALTH_DATA_DO_TRACK" : "Yes, I would like to share information on how I use the Brackets.",
"HEALTH_DATA_NOTIFICATION_MESSAGE" : "In order to improve Brackets, we periodically send <strong>anonymous</strong> data about how you use the Brackets.",
"HEALTH_DATA_PREVIEW" : "Health Data Preview File",
"HEALTH_DATA_PREVIEW_MESSAGE" : "No Data to Show"
"DOCS_MORE_LINK" : "Read more"
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This string was never used.