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

Commit b0a2826

Browse files
committed
Fixing "TouchDevelop" text and adding loc hooks
1 parent e2809a7 commit b0a2826

40 files changed

+420
-134
lines changed

Diff for: CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
# Contributing
44

5-
TouchDevelop is currently accepting contributions in the form of bug fixes, features or design changes.
5+
Touch Develop is currently accepting contributions in the form of bug fixes, features or design changes.
66

77
## Contributing bug fixes
8-
A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TouchDevelop team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the issue clearly stating that you've submitted a PR request, to avoid anyone else doing the same.
8+
A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the Touch Develop team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the issue clearly stating that you've submitted a PR request, to avoid anyone else doing the same.
99

1010
## Contributing features or design changes
11-
Features or design changes (things that add new or improved functionality to TouchDevelop) may be accepted, but will need to first be approved (marked as "Milestone == Community" by a TouchDevelop coordinator with the message "Approved") in the suggestion issue.
11+
Features or design changes (things that add new or improved functionality to Touch Develop) may be accepted, but will need to first be approved (marked as "Milestone == Community" by a Touch Develop coordinator with the message "Approved") in the suggestion issue.
1212

1313
## Legal
1414

Diff for: Jakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ task('log', [], { async: false }, function () {
382382

383383
// Our targets are the concatenated files, which are the final result of the
384384
// compilation. We also re-run the CSS prefixes thingy everytime.
385-
desc('build the whole TouchDevelop project')
385+
desc('build the whole Touch Develop project')
386386
task('default', [
387387
'css-prefixes',
388388
'build/client.js',

Diff for: ast/ast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2649,7 +2649,7 @@ module TDev.AST {
26492649
{ cap: PlatformCapability.Tiles, id: "tiles", name: lf("Tiles") },
26502650
{ cap: PlatformCapability.Npm, id: "npm", name: lf("Node Package Manager") },
26512651
{ cap: PlatformCapability.Cordova, id: "cordova", name: lf("Cordova Plugin Manager") },
2652-
{ cap: PlatformCapability.Shell, id: "shell", name: lf("TouchDevelop Local Shell") },
2652+
{ cap: PlatformCapability.Shell, id: "shell", name: lf("Touch Develop Local Shell") },
26532653
];
26542654

26552655
static capabilityName(p:PlatformCapability)

Diff for: ast/diff.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ module TDev.AST.Diff {
14091409
var allowedStrings:any = {};
14101410

14111411
([
1412-
"TouchDevelop is cool!", "tap to create bubbles", "hello", "hello world", "hello world!"
1412+
"Touch Develop is cool!", "tap to create bubbles", "hello", "hello world", "hello world!"
14131413
]).forEach(s => {
14141414
allowedStrings[quote(s)] = 1
14151415
})

Diff for: ast/help.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ module TDev {
422422
}, {
423423
id: "videoptr",
424424
name: "TouchDevelop Video",
425-
description: lf("TouchDevelop video (/td/videos/...)"),
425+
description: lf("Touch Develop video (/td/videos/...)"),
426426
parseIds: (text, ismeta) => {
427427
var pref = Cloud.getServiceUrl().replace(/(test|stage|live)/, "www")
428428
var m = /^(https:\/\/[^\/]+)\/(\S+)/.exec(text)
@@ -2372,7 +2372,7 @@ module TDev {
23722372
w.document.write(html);
23732373
w.document.close();
23742374
} catch(e) {
2375-
ModalDialog.info(":( can't print from here", "Your browser might have blocked the print page or try to print from another device...");
2375+
ModalDialog.info(":( can't print from here", lf("Your browser might have blocked the print page or try to print from another device..."));
23762376
}
23772377
}
23782378

Diff for: editor/collab.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,13 @@ module TDev {
481481
var s = AstSession;
482482
AstSession.log("discard cache because it is marooned");
483483
Script.editorState.collabSessionId = undefined;
484-
ModalDialog.infoAsync("Project Discontinued", "This project has been discontinued. You can continue to edit the script, but it will no longer synchronize with other team members.")
484+
ModalDialog.infoAsync("Project Discontinued", lf("This project has been discontinued. You can continue to edit the script, but it will no longer synchronize with other team members."))
485485
.thenalways(() => TDev.TheEditor.goToHubAsync()).done();
486486
astSessionSlot.disconnect(true, "project discontinued"); // deletes the file from disk
487487
}
488488
else if (AstSession.faulted) {
489489
AstSession.log("local cache is corrupted - deleting");
490-
ModalDialog.infoAsync("Cache Corrupted", "Sorry... we encountered a problem with the stored project state. Please try again to get the latest state from the server.")
490+
ModalDialog.infoAsync("Cache Corrupted", lf("Sorry... we encountered a problem with the stored project state. Please try again to get the latest state from the server."))
491491
.thenalways(() => TDev.TheEditor.goToHubAsync()).done();
492492
return astSessionSlot.disconnect(true, "cache corrupted"); // deletes the file from disk
493493
}

Diff for: editor/default.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module TDev
5757
if (!upd && window.localStorage["appUpdated"]) {
5858
window.localStorage.removeItem("appUpdated");
5959
if (dbg)
60-
upd = div("app-updated", lf("The TouchDevelop app has been updated."));
60+
upd = div("app-updated", lf("The Touch Develop app has been updated."));
6161
}
6262

6363
if (upd) {
@@ -424,8 +424,7 @@ module TDev
424424
if (updateCnt >= 30) {
425425
ProgressOverlay.hide()
426426
window.localStorage["lastForcedUpdate"] = Date.now()
427-
ModalDialog.info("couldn't connect to cloud services",
428-
msg + " failed; we are now using offline mode; make sure your internet connection working")
427+
ModalDialog.info("couldn't connect to cloud services",lf("{0} failed; we are now using offline mode;\n make sure your internet connection is working",msg))
429428
} else {
430429
Util.setTimeout(1000, checkUpdate)
431430
}

Diff for: editor/editor.ts

+45-43
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,8 @@ module TDev
632632
TheEditor.goToLocation(loc)
633633
} else {
634634
var m = ModalDialog.info("error in library",
635-
"it appears that the error is in fact in a library. " +
636-
"you need to locate the relevant library reference and tap on [edit library].")
635+
lf("it appears that the error is in fact in a library. ") +
636+
lf("you need to locate the relevant library reference and tap on [edit library]."))
637637
m.addHTML("<b>message:</b> " + Util.formatText(error))
638638
loc = new CodeLocation(<AST.Decl>Script.libraries()[0]||Script)
639639
TheEditor.goToLocation(loc)
@@ -1703,7 +1703,7 @@ module TDev
17031703
var missing = this.currentRt.compiled.missingApis;
17041704
if (!this.complainedAboutMissingAPIs && missing.length > 0) {
17051705
ProgressOverlay.hide();
1706-
ModalDialog.ask("the following APIs are not implemented on the current device: " +
1706+
ModalDialog.ask(lf("the following APIs are not implemented on the current device: ") +
17071707
missing.join(", "),
17081708
lf("run anyway"),
17091709
() => {
@@ -4222,8 +4222,8 @@ module TDev
42224222
var progressBar = HTML.mkProgressBar();
42234223
progressDialog.add(progressBar);
42244224
progressDialog.add(div("wall-dialog-header", div("", lf("signing out"))));
4225-
progressDialog.add(div("wall-dialog-body", div('', "cleaning up browser data...")));
4226-
progressDialog.add(div("wall-dialog-body", div('', "(please wait, it can take up to a minute)")));
4225+
progressDialog.add(div("wall-dialog-body", div('', lf("cleaning up browser data..."))));
4226+
progressDialog.add(div("wall-dialog-body", div('', lf("(please wait, it can take up to a minute)"))));
42274227
progressDialog.show();
42284228
progressBar.start();
42294229

@@ -4278,7 +4278,7 @@ module TDev
42784278
var progressBar = HTML.mkProgressBar();
42794279
progressDialog.add(progressBar);
42804280
progressDialog.add(div("wall-dialog-header", div("", lf("sign out"))));
4281-
progressDialog.add(div("wall-dialog-body", div('', "checking status...")));
4281+
progressDialog.add(div("wall-dialog-body", div('', lf("checking status..."))));
42824282
progressDialog.show();
42834283
progressBar.start();
42844284

@@ -4322,40 +4322,42 @@ module TDev
43224322
return window.localStorage["always_beta"] === "yes";
43234323
}
43244324

4325-
public popupMenu()
4326-
{
4327-
var m = new ModalDialog();
4328-
m.addClass("accountSettings")
4329-
var betaDiv = null
4330-
4331-
var relId = (<any>window).betaFriendlyId;
4332-
if (!relId) relId = "(local)";
4333-
var mtch = /-(\d+)\//.exec(Ticker.mainJsName)
4334-
if (mtch) relId = "v" + mtch[1];
4335-
4336-
betaDiv = div("wall-dialog-body",
4337-
Editor.mkHelpLink("beta"),
4338-
HTML.mkCheckBox(
4339-
lf("always use beta version of TouchDevelop"),
4340-
Editor.setAlwaysBeta, Editor.isAlwaysBeta()),
4341-
div("clear"));
4342-
if (World.switchToChannel) {
4343-
if ((<any>window).betaFriendlyId) {
4344-
betaDiv.appendChild(HTML.mkButton(
4345-
lf("stop beta testing"),
4346-
() => {
4347-
Editor.setAlwaysBeta(false);
4348-
World.switchToChannel("current");
4349-
m.dismiss();
4350-
}))
4351-
} else {
4352-
betaDiv.appendChild(HTML.mkButton(lf("start beta testing"),
4353-
() => {
4354-
World.switchToChannel("beta");
4355-
m.dismiss();
4356-
}))
4357-
}
4358-
}
4325+
public popupMenu()
4326+
{
4327+
var m = new ModalDialog();
4328+
m.addClass("accountSettings")
4329+
var betaDiv = null
4330+
4331+
4332+
var relId = (<any>window).betaFriendlyId;
4333+
if (!relId) relId = "(local)";
4334+
var mtch = /-(\d+)\//.exec(Ticker.mainJsName)
4335+
if (mtch) relId = "v" + mtch[1];
4336+
4337+
4338+
betaDiv = div("wall-dialog-body",
4339+
Editor.mkHelpLink("beta"),
4340+
HTML.mkCheckBox(
4341+
lf("always use beta version of TouchDevelop"),
4342+
Editor.setAlwaysBeta, Editor.isAlwaysBeta()),
4343+
div("clear"));
4344+
if (World.switchToChannel) {
4345+
if ((<any>window).betaFriendlyId) {
4346+
betaDiv.appendChild(HTML.mkButton(
4347+
lf("stop beta testing"),
4348+
() => {
4349+
Editor.setAlwaysBeta(false);
4350+
World.switchToChannel("current");
4351+
m.dismiss();
4352+
}))
4353+
} else {
4354+
betaDiv.appendChild(HTML.mkButton(lf("start beta testing"),
4355+
() => {
4356+
World.switchToChannel("beta");
4357+
m.dismiss();
4358+
}))
4359+
}
4360+
}
43594361

43604362
var zoomSlide = HTML.mkTextInput("range", lf("zoom factor"));
43614363
zoomSlide.className = "colorSlider";
@@ -4372,7 +4374,7 @@ module TDev
43724374

43734375

43744376
m.add([
4375-
div("wall-dialog-header", lf("TouchDevelop settings")),
4377+
div("wall-dialog-header", lf("Touch Develop settings")),
43764378
div("wall-dialog-body", HTML.mkCheckBox(lf("access and use your location"),
43774379
(v) => RuntimeSettings.setLocation(v), RuntimeSettings.location())),
43784380
div("wall-dialog-body", HTML.mkCheckBox(lf("play sounds and music"),
@@ -4389,7 +4391,7 @@ module TDev
43894391
if (TDev.dbg) {
43904392
var chaosOfflineEdit = HTML.mkCheckBox(lf("chaos offline mode"), (v) => Cloud.setChaosOffline(v), Cloud.isChaosOffline());
43914393
m.add([
4392-
div("wall-dialog-body", "under the hood (dbg): ",
4394+
div("wall-dialog-body", lf("under the hood (dbg): "),
43934395
HTML.mkButton(lf("throw"), () => {
43944396
throw new Error("fake error, " + Util.guidGen())
43954397
})),
@@ -4412,7 +4414,7 @@ module TDev
44124414
HTML.mkButton(lf("save offline caches"), () =>
44134415
LocalProxy.saveCachesAsync().done())
44144416
),
4415-
div("wall-dialog-body", HTML.mkCheckBox("enable new intelli prediction",
4417+
div("wall-dialog-body", HTML.mkCheckBox(lf("enable new intelli prediction"),
44164418
(v) => { TheEditor.calculator.enableNewPredictor = v; }, TheEditor.calculator.enableNewPredictor)),
44174419
(Util.localTranslationTracking ? HTML.mkButtonTick(lf("translations"), Ticks.hubShowcaseMgmt, () => { ModalDialog.showText(Util.dumpTranslationFreqs()) }) : null),
44184420
(dbg ? HTML.mkButton(lf("show internal icons"), () => { ScriptProperties.showIcons(); }) : null),

Diff for: editor/hub.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ module TDev.Browser {
724724
lf("Number of codes: "), count,
725725
lf("Credit for each code: "), credit,
726726
lf("Number of uses for each code: "), numuses,
727-
lf("Code description (purpouse): "), desc,
727+
lf("Code description (purpose): "), desc,
728728
lf("Groups to join: "), groups,
729729
HTML.mkAsyncButton(lf("generate"), () => {
730730
var data = {
@@ -1717,7 +1717,7 @@ module TDev.Browser {
17171717
TipManager.update();
17181718
if (h[1] == "logout") {
17191719
// we may be hosed enough that ModalDialog.ask doesn't work anymore
1720-
if (window.confirm("Do you really want to sign out?\nAll your script data and any unsynchronized script changes will be lost.") == true) {
1720+
if (window.confirm(lf("Do you really want to sign out?\nAll your script data and any unsynchronized script changes will be lost.")) == true) {
17211721
TheEditor.logoutAsync(false).done();
17221722
return;
17231723
}
@@ -2436,8 +2436,8 @@ module TDev.Browser {
24362436
this.showingTemporarySignin = true;
24372437
var d = new ModalDialog();
24382438
d.add(div('wall-dialog-header', lf("Sign in to avoid losing your scripts!")));
2439-
d.add(div('wall-dialog-body', lf("Your browser does not allow TouchDevelop to store web site data. This usually happens if run in Private Mode (Safari), in InPrivate mode (Internet Explorer) or your security settings prevent data storage.")));
2440-
d.add(div('wall-dialog-body', lf("When you sign in, TouchDevelop will save your scripts in the cloud.")));
2439+
d.add(div('wall-dialog-body', lf("Your browser does not allow Touch Develop to store web site data. This usually happens if run in Private Mode (Safari), in InPrivate mode (Internet Explorer) or your security settings prevent data storage.")));
2440+
d.add(div('wall-dialog-body', lf("When you sign in, Touch Develop will save your scripts in the cloud.")));
24412441
d.add(div("wall-dialog-buttons",
24422442
HTML.mkButton(lf("skip this"), () => {
24432443
this.showingTemporarySignin = false;
@@ -2608,7 +2608,7 @@ module TDev.Browser {
26082608
yearofbirth = <HTMLSelectElement>textEntry(lf("year of birth"), HTML.mkComboBox([HTML.mkOption("0", "")].concat(settings.yearofbirthoptions.map(year => HTML.mkOption(year + "", year + "", settings.yearofbirth == year)))));
26092609

26102610
howfound = <HTMLSelectElement>textEntry(lf("how found"), HTML.mkComboBox([HTML.mkOption("", "")].concat(settings.howfoundoptions.map(s => HTML.mkOption(s, s, settings.howfound == s)))),
2611-
lf("How did you discover TouchDevelop?"));
2611+
lf("How did you discover Touch Develop?"));
26122612

26132613
programmingknowledge = <HTMLSelectElement>textEntry(lf("programming knowledge"), HTML.mkComboBox([HTML.mkOption("", "")].concat(settings.programmingknowledgeoptions.map(s => HTML.mkOption(s, s, settings.programmingknowledge == s)))),
26142614
lf("What is your level of programming knowledge?"));
@@ -2617,7 +2617,7 @@ module TDev.Browser {
26172617
lf("What is your occupation?"));
26182618

26192619
school = <HTMLInputElement>textEntry(lf("school"), HTML.mkTextInput("text", lf("school")),
2620-
lf("Enter your school affiliation if any."));
2620+
lf("Enter your school affiliation, if any."));
26212621
}
26222622

26232623
dialogBody.appendChild(div("form-title", lf("email and push notifications")));
@@ -2637,7 +2637,7 @@ module TDev.Browser {
26372637
var t = settings.emailnewsletter2;
26382638
if (notificationsOnly && !t) t = "yes";
26392639
emailnewsletter = <HTMLSelectElement>textEntry(lf("receive email newsletters"), HTML.mkComboBox([HTML.mkOption("", "")].concat(settings.emailnewsletter2options.map(s => HTML.mkOption(s, s, t == s)))),
2640-
lf("Do you want to receive informational TouchDevelop-related newsletters, e.g. about new features and upcoming events?"));
2640+
lf("Do you want to receive informational Touch Develop-related newsletters, e.g. about new features and upcoming events?"));
26412641
emailnewsletterDiv = lastDiv;
26422642

26432643
var u = settings.emailfrequency;
@@ -2659,7 +2659,7 @@ module TDev.Browser {
26592659
emailfrequencyDiv.style.display = "none";
26602660
if (pushNotificationsDiv) pushNotificationsDiv.style.display = "none";
26612661
var summary = div("formHint",
2662-
t == "yes" ? lf("You will get TouchDevelop newsletters.") : lf("You will not get TouchDevelop newsletters."),
2662+
t == "yes" ? lf("You will get Touch Develop newsletters.") : lf("You will not get Touch Develop newsletters."),
26632663
"You will get a ", span("emph", u), " email notification digest ", pushNotifications ? <any[]>["and ", span("emph", v == "yes" ? "mobile" : "no"), " push notifications"] : [], " when users engage with your publications or posts. ",
26642664
span("emph", lf("Change settings...")));
26652665
summary.onclick = () => {

Diff for: editor/libraryExtractor.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ module TDev
148148

149149
if (theRest.length > 0) {
150150
m.add(
151-
div("wall-dialog-header", "moving",
151+
div("wall-dialog-header", lf("moving"),
152152
DeclRender.mkBox(toMove.decl),
153-
"to library",
153+
lf("to library"),
154154
DeclRender.mkBox(this.split.getLib()),
155-
"requires moving",
155+
lf("requires moving"),
156156
theRest.map(dd => DeclRender.mkBox(dd.decl))
157157
)
158158
);
@@ -241,7 +241,7 @@ module TDev
241241
if (tc.length > 10) {
242242
var more = tc.length - 10;
243243
// TODO: make a button to expose the rest of the list
244-
rest.push(div("smallDecl", "load (" + more.toString() + " more)"));
244+
rest.push(div("smallDecl", lf("load ({0} more)", more.toString())));
245245
}
246246
rest.push(div("smallDecl", " "));
247247
}

0 commit comments

Comments
 (0)