Skip to content

Commit

Permalink
Merge pull request #10788 from vivekmore/correct-typos
Browse files Browse the repository at this point in the history
Correct typos
  • Loading branch information
murdos authored May 22, 2020
2 parents 4de6089 + 3f94b95 commit d66bc7a
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 10 deletions.
2 changes: 1 addition & 1 deletion generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ module.exports = class extends BaseBlueprintGenerator {
});
},

askFori18n: prompts.askFori18n,
askFori18n: prompts.askForI18n,
};
}

Expand Down
15 changes: 13 additions & 2 deletions generators/app/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
askForInsightOptIn,
askForApplicationType,
askForModuleName,
askForI18n,
askFori18n,
askForTestOpts,
askForMoreModules,
Expand All @@ -40,7 +41,7 @@ function askForInsightOptIn() {
default: true,
}).then(prompt => {
if (prompt.insight !== undefined) {
statistics.setOptoutStatus(!prompt.insight);
statistics.setOptOutStatus(!prompt.insight);
}
done();
});
Expand Down Expand Up @@ -106,11 +107,21 @@ function askForModuleName() {
this.askModuleName(this);
}

function askFori18n() {
function askForI18n() {
if (this.skipI18n || this.existingProject) return;
this.aski18n(this);
}

/**
* @deprecated Use askForI18n() instead.
* This method will be removed in JHipster v7.
*/
function askFori18n() {
// eslint-disable-next-line no-console
console.log(chalk.yellow('\nPlease use askForI18n() instead. This method will be removed in v7\n'));
this.askForI18n();
}

function askForTestOpts(meta) {
if (!meta && this.existingProject) return;

Expand Down
2 changes: 1 addition & 1 deletion generators/aws-containers/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ function askDeployNow() {
{
type: 'confirm',
name: 'deployNow',
message: 'Would you like to deploy now?.',
message: 'Would you like to deploy now?',
default: true,
},
];
Expand Down
2 changes: 1 addition & 1 deletion generators/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ module.exports = class extends BaseBlueprintGenerator {
return {
askForModuleName: prompts.askForModuleName,
askForClient: prompts.askForClient,
askFori18n: prompts.askFori18n,
askFori18n: prompts.askForI18n,
askForClientTheme: prompts.askForClientTheme,
askForClientThemeVariant: prompts.askForClientThemeVariant,

Expand Down
13 changes: 12 additions & 1 deletion generators/client/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const REACT = constants.SUPPORTED_CLIENT_FRAMEWORKS.REACT;
module.exports = {
askForModuleName,
askForClient,
askForI18n,
askFori18n,
askForClientTheme,
askForClientThemeVariant,
Expand Down Expand Up @@ -78,12 +79,22 @@ function askForClient(meta) {
});
}

function askFori18n() {
function askForI18n() {
if (this.existingProject || this.configOptions.skipI18nQuestion) return;

this.aski18n(this);
}

/**
* @deprecated Use askForI18n() instead.
* This method will be removed in JHipster v7.
*/
function askFori18n() {
// eslint-disable-next-line no-console
console.log(chalk.yellow('\nPlease use askForI18n() instead. This method will be removed in v7\n'));
this.askForI18n();
}

function askForClientTheme(meta) {
if (!meta && this.existingProject) {
return;
Expand Down
2 changes: 1 addition & 1 deletion generators/generator-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ module.exports = class extends PrivateBase {
}

/**
* check if Right-to-Left support is necesary for i18n
* check if Right-to-Left support is necessary for i18n
* @param {string[]} languages - languages array
*/
isI18nRTLSupportNecessary(languages) {
Expand Down
2 changes: 1 addition & 1 deletion generators/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ module.exports = class extends BaseBlueprintGenerator {
askForModuleName: prompts.askForModuleName,
askForServerSideOpts: prompts.askForServerSideOpts,
askForOptionalItems: prompts.askForOptionalItems,
askFori18n: prompts.askFori18n,
askFori18n: prompts.askForI18n,

setSharedConfigOptions() {
this.configOptions.packageName = this.packageName;
Expand Down
13 changes: 12 additions & 1 deletion generators/server/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
askForModuleName,
askForServerSideOpts,
askForOptionalItems,
askForI18n,
askFori18n,
};

Expand Down Expand Up @@ -418,8 +419,18 @@ function askForOptionalItems(meta) {
}
}

function askFori18n() {
function askForI18n() {
if (this.existingProject || this.configOptions.skipI18nQuestion) return;

this.aski18n(this);
}

/**
* @deprecated Use askForI18n() instead.
* This method will be removed in JHipster v7.
*/
function askFori18n() {
// eslint-disable-next-line no-console
console.log(chalk.yellow('\nPlease use askForI18n() instead. This method will be removed in v7\n'));
this.askForI18n();
}
13 changes: 12 additions & 1 deletion generators/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* limitations under the License.
*/
const { v4: uuid } = require('uuid');
const chalk = require('chalk');
const Config = require('conf');
const osLocale = require('os-locale');
const axios = require('axios');
Expand Down Expand Up @@ -141,10 +142,20 @@ class Statistics {
this.config.delete(key);
}

setOptoutStatus(status) {
setOptOutStatus(status) {
this.setConfig('optOut', status);
}

/**
* @deprecated Use setOptOutStatus(status) instead.
* This method will be removed in JHipster v7.
*/
setOptoutStatus(status) {
// eslint-disable-next-line no-console
console.log(chalk.yellow('\nPlease use setOptOutStatus() instead. This method will be removed in v7\n'));
this.setOptOutStatus(status);
}

setLinkedStatus(status) {
this.setConfig('isLinked', status);
}
Expand Down

0 comments on commit d66bc7a

Please sign in to comment.