Skip to content

Commit b55d18a

Browse files
hbugdollcb1kenobi
andauthored
chore: fixed further typos and wording (#14341)
Co-authored-by: Chris Barber <chris@cb1inc.com>
1 parent d2a91c5 commit b55d18a

File tree

314 files changed

+859
-839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

314 files changed

+859
-839
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
uses: actions/download-artifact@v4
139139
with:
140140
name: mobilesdk-${{ env.vtag }}-linux
141-
- name: Download MacOS artifact
141+
- name: Download macOS artifact
142142
uses: actions/download-artifact@v4
143143
with:
144144
name: mobilesdk-${{ env.vtag }}-osx

MIGRATION_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ The following APIs were removed in 9.0.0:
127127
| `Ti.UI.View#finishLayout()` | Use the `#applyProperties()` method to batch-update layout properties. |
128128
| `Ti.UI.View#startLayout()` | Use the `#applyProperties()` method to batch-update layout properties. |
129129
| `Ti.UI.View#updateLayout()` | Use the `#applyProperties()` method to batch-update layout properties. |
130-
| `Ti.UI.WebView.error.message` | Use the `error` property instead. Removed on ios in 8.0.0. Removed on android in 9.0.0. |
131-
| `Ti.UI.WebView.error.errorCode` | Use the `code` property instead. Removed on ios in 8.0.0. Removed on android in 9.0.0. |
130+
| `Ti.UI.WebView.error.message` | Use the `error` property instead. Removed on iOS in 8.0.0. Removed on Android in 9.0.0. |
131+
| `Ti.UI.WebView.error.errorCode` | Use the `code` property instead. Removed on iOS in 8.0.0. Removed on Android in 9.0.0. |
132132
| `Ti.UI.WebView.onStopBlacklistedUrl` | Use the cross-platform `blacklisturl` event instead. |
133133
| `Ti.UI.Window.android:back` | Use the `Ti.UI.Window.androidback` event instead. |
134134
| `Ti.UI.Window.android:camera` | Use the `Ti.UI.Window.androidcamera` event instead. |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ npm run test:ipad
250250

251251
The test suite generates a single Titanium SDK project targeting the specified platform(s), builds the project for emulator, launches the app on the emulator and then runs a series of tests defined via ti-mocha and should.js.
252252

253-
The tests spit out their results to the console log, and the test scripts listen to the logs to gather the results. We then generate an overview on the console as well as a junit report xml file (to be consume by CI build systems like Jenkins).
253+
The tests spit out their results to the console log, and the test scripts listen to the logs to gather the results. We then generate an overview on the console as well as a junit report XML file (to be consume by CI build systems like Jenkins).
254254

255255
#### How to modify the tests locally and in your PRs
256256

STARTUP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ At SDK build time, `./android/titanium/prebuild.js` script is run which takes JS
1515
- then call...
1616

1717
`V8Runtime#nativeInit()`
18-
- from java down to JNI
18+
- from Java down to JNI
1919
- sets up platform, isolate, debugger, then calls...
2020
`V8Runtime#bootstrap()`
2121
- sets up `EventEmitter` in C code
@@ -40,7 +40,7 @@ back to `V8Runtime#bootstrap()`
4040
- set up `global.global`
4141
- set default `global.__dirname` and `__filename`
4242

43-
back to java `V8Runtime#initRuntime()`
43+
back to Java `V8Runtime#initRuntime()`
4444
- start debugger
4545
- load external native modules
4646

android/.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SpacesInParentheses: false
2121
TabWidth: 4
2222
UseTab: ForContinuationAndIndentation
2323
SpaceAfterCStyleCast: true
24-
# Spaces inside {} for array literals, i.e. "new Object[] { args }"
24+
# Spaces inside {} for array literals, e.g. "new Object[] { args }"
2525
Cpp11BracedListStyle: false
2626
ReflowComments: false
2727
JavaImportGroups: ['java', 'javax', 'org', 'android', 'com']

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ tasks.register('checkstyleChanged', Checkstyle) {
5555
include getChangedFiles()
5656
}
5757

58-
// Used to strip the src dir prefixes from the changed java files
58+
// Used to strip the src dir prefixes from the changed Java files
5959
def getChangedFiles() {
6060
if (!project.hasProperty('changedFiles')) {
6161
return new ArrayList<>()

android/cli/commands/_build.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class AndroidBuilder extends Builder {
9797
// we hook into the pre-validate event so that we can stop the build before
9898
// prompting if we know the build is going to fail.
9999
//
100-
// this is also where we can detect android and jdk environments before
100+
// this is also where we can detect Android and JDK environments before
101101
// prompting occurs. because detection is expensive we also do it here instead
102102
// of during config() because there's no sense detecting if config() is being
103103
// called because of the help command.
@@ -110,13 +110,13 @@ class AndroidBuilder extends Builder {
110110

111111
async.series([
112112
function (next) {
113-
// detect android environment
113+
// detect Android environment
114114
androidDetect(config, { packageJson: _t.packageJson }, function (androidInfo) {
115115
_t.androidInfo = androidInfo;
116116
assertIssue(logger, androidInfo.issues, 'ANDROID_JDK_NOT_FOUND');
117117
assertIssue(logger, androidInfo.issues, 'ANDROID_JDK_PATH_CONTAINS_AMPERSANDS');
118118

119-
// if --android-sdk was not specified, then we simply try to set a default android sdk
119+
// if --android-sdk was not specified, then we simply try to set a default Android SDK
120120
if (!cli.argv['android-sdk']) {
121121
let androidSdkPath = config.android && config.android.sdkPath;
122122
if (!androidSdkPath && androidInfo.sdk) {
@@ -130,7 +130,7 @@ class AndroidBuilder extends Builder {
130130
},
131131

132132
function (next) {
133-
// detect java development kit
133+
// detect JDK
134134
appc.jdk.detect(config, null, function (jdkInfo) {
135135
assertIssue(logger, jdkInfo.issues, 'JDK_NOT_INSTALLED');
136136
assertIssue(logger, jdkInfo.issues, 'JDK_MISSING_PROGRAMS');
@@ -252,7 +252,7 @@ class AndroidBuilder extends Builder {
252252
}));
253253
},
254254
validate: function (value, callback) {
255-
// if there's a value, then they entered something, otherwise let the cli prompt
255+
// if there's a value, then they entered something, otherwise let the CLI prompt
256256
if (value) {
257257
const selectedAlias = value.toLowerCase(),
258258
alias = _t.keystoreAlias = _t.keystoreAliases.filter(function (a) { return a.name && a.name.toLowerCase() === selectedAlias; }).shift();
@@ -300,19 +300,19 @@ class AndroidBuilder extends Builder {
300300
} else if (_t.androidInfo.sdk && _t.androidInfo.sdk.path === afs.resolvePath(value)) {
301301
callback(null, value);
302302
} else {
303-
// attempt to find android sdk
303+
// attempt to find Android SDK
304304
android.findSDK(value, config, loadPackageJson(__dirname), function () {
305305

306-
// NOTE: ignore errors when finding sdk, let gradle validate the sdk
306+
// NOTE: ignore errors when finding SDK, let gradle validate the SDK
307307

308308
function next() {
309-
// set the android sdk in the config just in case a plugin or something needs it
309+
// set the Android SDK in the config just in case a plugin or something needs it
310310
config.set('android.sdkPath', value);
311311

312312
// path looks good, do a full scan again
313313
androidDetect(config, { packageJson: _t.packageJson, bypassCache: true }, function (androidInfo) {
314314

315-
// assume sdk is valid, let gradle validate the sdk
315+
// assume SDK is valid, let gradle validate the SDK
316316
if (!androidInfo.sdk) {
317317
androidInfo.sdk = { path: value };
318318
}
@@ -322,8 +322,8 @@ class AndroidBuilder extends Builder {
322322
});
323323
}
324324

325-
// new android sdk path looks good
326-
// if we found an android sdk in the pre-validate hook, then we need to kill the other sdk's adb server
325+
// new Android SDK path looks good
326+
// if we found an Android SDK in the pre-validate hook, then we need to kill the other SDK's adb server
327327
if (_t.androidInfo.sdk) {
328328
new ADB(config).stopServer(next);
329329
} else {
@@ -335,7 +335,7 @@ class AndroidBuilder extends Builder {
335335
},
336336
'avd-abi': {
337337
abbr: 'B',
338-
desc: 'the abi for the Android emulator; deprecated, use --device-id',
338+
desc: 'the ABI for the Android emulator; deprecated, use --device-id',
339339
hint: 'abi'
340340
},
341341
'avd-id': {
@@ -462,15 +462,15 @@ class AndroidBuilder extends Builder {
462462
name = 'titanium_' + cli.argv['avd-id'] + '_';
463463

464464
if (avds.length) {
465-
// try finding the first avd that starts with the avd id
465+
// try finding the first AVD that starts with the AVD id
466466
avds = avds.filter(function (avd) {
467467
return avd.indexOf(name) === 0;
468468
});
469469
if (avds.length === 1) {
470470
cli.argv['device-id'] = avds[0];
471471
return callback();
472472
} else if (avds.length > 1) {
473-
// next try using the avd skin
473+
// next try using the AVD skin
474474
if (!cli.argv['avd-skin']) {
475475
// we have more than one match
476476
logger.error(`Found ${avds.length} avd${avds.length === 1 ? '' : 's'} with id "${cli.argv['avd-id']}"`);
@@ -499,7 +499,7 @@ class AndroidBuilder extends Builder {
499499
cli.argv['device-id'] = avds[0];
500500
return callback();
501501
} else if (!cli.argv['avd-abi']) {
502-
// we have more than one matching avd, but no abi to filter by so we have to error
502+
// we have more than one matching AVD, but no ABI to filter by so we have to error
503503
logger.error(`Found ${
504504
avds.length
505505
} avd${avds.length === 1 ? '' : 's'} with id "${
@@ -523,9 +523,9 @@ class AndroidBuilder extends Builder {
523523
});
524524
}
525525
if (avds.length === 0) {
526-
logger.error(`No emulators found with id "${cli.argv['avd-id']}", skin "${cli.argv['avd-skin']}", and abi "${cli.argv['avd-abi']}"\n`);
526+
logger.error(`No emulators found with id "${cli.argv['avd-id']}", skin "${cli.argv['avd-skin']}", and ABI "${cli.argv['avd-abi']}"\n`);
527527
} else {
528-
// there is one or more avds, but we'll just return the first one
528+
// there is one or more AVDs, but we'll just return the first one
529529
cli.argv['device-id'] = avds[0];
530530
return callback();
531531
}
@@ -536,7 +536,7 @@ class AndroidBuilder extends Builder {
536536

537537
logger.warn(`${'--avd-*'.cyan} options have been ${'deprecated'.red}, please use ${'--device-id'.cyan}\n`);
538538

539-
// print list of available avds
539+
// print list of available AVDs
540540
if (results.length && !cli.argv.prompt) {
541541
logger.log('Available Emulators:');
542542
results.forEach(function (emu) {
@@ -980,7 +980,7 @@ class AndroidBuilder extends Builder {
980980
logger.error('The app id must consist only of letters, numbers, dashes, and underscores.');
981981
logger.error('Note: Android does not allow dashes.');
982982
logger.error('The first character must be a letter or underscore.');
983-
logger.error('Usually the app id is your company\'s reversed Internet domain name. (i.e. com.example.myapp)\n');
983+
logger.error('Usually the app id is your company\'s reversed Internet domain name. (e.g. com.example.myapp)\n');
984984
process.exit(1);
985985
}
986986

@@ -989,7 +989,7 @@ class AndroidBuilder extends Builder {
989989
logger.error('The app id must consist of letters, numbers, and underscores.');
990990
logger.error('The first character must be a letter or underscore.');
991991
logger.error('The first character after a period must not be a number.');
992-
logger.error('Usually the app id is your company\'s reversed Internet domain name. (i.e. com.example.myapp)\n');
992+
logger.error('Usually the app id is your company\'s reversed Internet domain name. (e.g. com.example.myapp)\n');
993993
process.exit(1);
994994
}
995995

@@ -1033,7 +1033,7 @@ class AndroidBuilder extends Builder {
10331033
process.exit(1);
10341034
}
10351035

1036-
// map sdk versions to sdk targets instead of by id
1036+
// map SDK versions to SDK targets instead of by id
10371037
const targetSDKMap = {
10381038
// placeholder for gradle to use
10391039
[this.compileSdkVersion]: {
@@ -1080,7 +1080,7 @@ class AndroidBuilder extends Builder {
10801080
process.exit(1);
10811081
}
10821082

1083-
// validate the sdk levels
1083+
// validate the SDK levels
10841084
const usesSDK = this.customAndroidManifest ? this.customAndroidManifest.getUsesSdk() : null;
10851085

10861086
this.minSDK = this.minSupportedApiLevel;
@@ -1111,7 +1111,7 @@ class AndroidBuilder extends Builder {
11111111
usesSDK.maxSdkVersion && (this.maxSDK = usesSDK.maxSdkVersion);
11121112
}
11131113

1114-
// we need to translate the sdk to a real api level (i.e. L => 20, MNC => 22) so that
1114+
// we need to translate the SDK to a real API level (e.g. L => 20, MNC => 22) so that
11151115
// we can validate them
11161116
function getRealAPILevel(ver) {
11171117
return (ver && targetSDKMap[ver] && targetSDKMap[ver].sdk) || ver;
@@ -1120,7 +1120,7 @@ class AndroidBuilder extends Builder {
11201120
this.realTargetSDK = getRealAPILevel(this.targetSDK);
11211121
this.realMaxSDK = getRealAPILevel(this.maxSDK);
11221122

1123-
// min sdk is too old
1123+
// min SDK is too old
11241124
if (this.minSDK && this.realMinSDK < this.minSupportedApiLevel) {
11251125
logger.error(`The minimum supported SDK API version must be ${
11261126
this.minSupportedApiLevel
@@ -1156,7 +1156,7 @@ class AndroidBuilder extends Builder {
11561156
}
11571157

11581158
if (this.targetSDK) {
1159-
// target sdk is too old
1159+
// target SDK is too old
11601160
if (this.realTargetSDK < this.minTargetApiLevel) {
11611161
logger.error(`The target SDK API ${
11621162
this.targetSDK
@@ -1192,7 +1192,7 @@ class AndroidBuilder extends Builder {
11921192
process.exit(1);
11931193
}
11941194

1195-
// target sdk < min sdk
1195+
// target SDK < min SDK
11961196
if (this.realTargetSDK < this.realMinSDK) {
11971197
logger.error(`The target SDK API must be greater than or equal to the minimum SDK ${
11981198
this.minSDK
@@ -1211,7 +1211,7 @@ class AndroidBuilder extends Builder {
12111211
this.realTargetSDK = this.targetSDK;
12121212
}
12131213

1214-
// check that we have this target sdk installed
1214+
// check that we have this target SDK installed
12151215
this.androidTargetSDK = targetSDKMap[this.targetSDK];
12161216

12171217
if (!this.androidTargetSDK) {
@@ -1784,7 +1784,7 @@ class AndroidBuilder extends Builder {
17841784
this.logger.info('Profiler disabled');
17851785
}
17861786

1787-
this.logger.info(`Transpile javascript: ${(this.transpile ? 'true' : 'false').cyan}`);
1787+
this.logger.info(`Transpile JavaScript: ${(this.transpile ? 'true' : 'false').cyan}`);
17881788
this.logger.info(`Generate source maps: ${(this.sourceMaps ? 'true' : 'false').cyan}`);
17891789
}
17901790

@@ -1854,15 +1854,15 @@ class AndroidBuilder extends Builder {
18541854
return true;
18551855
}
18561856

1857-
// if encryptJS changed, then we need to recompile the java files
1857+
// if encryptJS changed, then we need to recompile the Java files
18581858
if (this.encryptJS !== manifest.encryptJS) {
18591859
this.logger.info('Forcing rebuild: JavaScript encryption flag changed');
18601860
this.logger.info(` Was: ${manifest.encryptJS}`);
18611861
this.logger.info(` Now: ${this.encryptJS}`);
18621862
return true;
18631863
}
18641864

1865-
// check if the titanium sdk paths are different
1865+
// check if the Titanium SDK paths are different
18661866
if (this.platformPath !== manifest.platformPath) {
18671867
this.logger.info('Forcing rebuild: Titanium SDK path changed since last build');
18681868
this.logger.info(` Was: ${manifest.platformPath}`);
@@ -2535,7 +2535,7 @@ class AndroidBuilder extends Builder {
25352535
combined = gather.mergeMaps(allModulesResults);
25362536

25372537
// Ok, so we have a Map<string, FileInfo> for the full set of unique relative paths
2538-
// now categorize (i.e. lump into buckets of js/css/html/assets/generic resources)
2538+
// now categorize (e.g. lump into buckets of js/css/html/assets/generic resources)
25392539
const categorizer = new gather.Categorizer({
25402540
tiappIcon: this.tiapp.icon,
25412541
jsFilesNotToProcess: Object.keys(this.htmlJsFiles),
@@ -2545,7 +2545,7 @@ class AndroidBuilder extends Builder {
25452545
}
25462546

25472547
/**
2548-
* Optionally mifies the input css files and copies them to the app
2548+
* Optionally minifies the input CSS files and copies them to the app
25492549
* @param {Map<string,object>} files map from filename to file info
25502550
* @returns {Promise<void>}
25512551
*/
@@ -2677,7 +2677,7 @@ class AndroidBuilder extends Builder {
26772677
});
26782678
await task.run();
26792679
if (this.useWebpack) {
2680-
// Merge Ti symbols from Webpack with the ones from legacy js processing
2680+
// Merge Ti symbols from Webpack with the ones from legacy JS processing
26812681
Object.keys(task.data.tiSymbols).forEach(file => {
26822682
const existingSymbols = this.tiSymbols[file] || [];
26832683
const additionalSymbols = task.data.tiSymbols[file];
@@ -2714,7 +2714,7 @@ class AndroidBuilder extends Builder {
27142714
}
27152715

27162716
/**
2717-
* @param {string[]} jsBootstrapFiles list of bootstrap js files to add to listing we generate
2717+
* @param {string[]} jsBootstrapFiles list of bootstrap JS files to add to listing we generate
27182718
* @returns {Promise<void>}
27192719
*/
27202720
async writeBootstrapJson(jsBootstrapFiles) {
@@ -2874,7 +2874,7 @@ class AndroidBuilder extends Builder {
28742874
throw new Error('Could not load encryption library!');
28752875
}
28762876

2877-
this.logger.info('Encrypting javascript assets...');
2877+
this.logger.info('Encrypting JavaScript assets...');
28782878

28792879
// NOTE: maintain 'build.android.titaniumprep' hook for remote encryption policy.
28802880
const hook = this.cli.createHook('build.android.titaniumprep', this, async function (exe, args, opts, next) {

android/cli/commands/_buildModule.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class AndroidModuleBuilder extends Builder {
211211

212212
this.manifest = this.cli.manifest;
213213

214-
// detect android environment
214+
// detect Android environment
215215
androidDetect(config, { packageJson: this.packageJson }, function (androidInfo) {
216216
this.androidInfo = androidInfo;
217217

@@ -232,7 +232,7 @@ export class AndroidModuleBuilder extends Builder {
232232
// check the Android SDK we require to build exists
233233
this.androidCompileSDK = targetSDKMap[this.compileSdkVersion];
234234

235-
// if no target sdk, then default to most recent supported/installed
235+
// if no target SDK, then default to most recent supported/installed
236236
if (!this.targetSDK) {
237237
this.targetSDK = this.maxSupportedApiLevel;
238238
}
@@ -280,7 +280,7 @@ export class AndroidModuleBuilder extends Builder {
280280
this.javacMaxMemory = cli.timodule.properties['android.javac.maxMemory'].value;
281281
}
282282

283-
// detect java development kit
283+
// detect JDK
284284
appc.jdk.detect(config, null, function (jdkInfo) {
285285
if (!jdkInfo.version) {
286286
logger.error('Unable to locate the Java Development Kit\n');
@@ -957,7 +957,7 @@ export class AndroidModuleBuilder extends Builder {
957957
}
958958
}
959959

960-
// create the builder instance and expose the public api
960+
// create the builder instance and expose the public API
961961
const moduleBuilder = new AndroidModuleBuilder();
962962
export const config = moduleBuilder.config.bind(moduleBuilder);
963963
export const validate = moduleBuilder.validate.bind(moduleBuilder);

android/cli/lib/detect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export { detect };
2828
* Detects connected Android emulators.
2929
* @param {Object} config - The CLI config object
3030
* @param {Object} [opts] - Detection options
31-
* @param {String} [opts.type] - The type of emulator to load (avd, genymotion); defaults to all
31+
* @param {String} [opts.type] - The type of emulator to load (AVD, genymotion); defaults to all
3232
* @param {Function} finished - Callback when detection is finished
3333
*/
3434
export function detectEmulators(config, opts, finished) {

0 commit comments

Comments
 (0)