Skip to content

Commit

Permalink
remove unnecessary lang file key
Browse files Browse the repository at this point in the history
  • Loading branch information
brandenrodgers committed Apr 17, 2024
1 parent 201cb50 commit b08afe5
Show file tree
Hide file tree
Showing 124 changed files with 1,519 additions and 1,533 deletions.
2 changes: 1 addition & 1 deletion packages/cli/bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const notifier = updateNotifier({
shouldNotifyInNpmScript: true,
});

const i18nKey = 'cli.commands.generalErrors';
const i18nKey = 'commands.generalErrors';

const CLI_UPGRADE_MESSAGE =
chalk.bold('The CMS CLI is now the HubSpot CLI') +
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const info = require('./accounts/info');
const remove = require('./accounts/remove');
const clean = require('./accounts/clean');

const i18nKey = 'cli.commands.accounts';
const i18nKey = 'commands.accounts';

exports.command = 'accounts';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/accounts/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const {
} = require('@hubspot/local-dev-lib/errors/apiErrors');
const { uiAccountDescription } = require('../../lib/ui');

const i18nKey = 'cli.commands.accounts.subcommands.clean';
const i18nKey = 'commands.accounts.subcommands.clean';

exports.command = 'clean';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/accounts/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { loadAndValidateOptions } = require('../../lib/validation');
const { i18n } = require('../../lib/lang');
const { getTableContents } = require('../../lib/ui/table');

const i18nKey = 'cli.commands.accounts.subcommands.info';
const i18nKey = 'commands.accounts.subcommands.info';
exports.describe = i18n(`${i18nKey}.describe`);

exports.command = 'info [--account]';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/accounts/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const {
HUBSPOT_ACCOUNT_TYPE_STRINGS,
} = require('@hubspot/local-dev-lib/constants/config');

const i18nKey = 'cli.commands.accounts.subcommands.list';
const i18nKey = 'commands.accounts.subcommands.list';

exports.command = 'list';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/accounts/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { i18n } = require('../../lib/lang');
const { selectAccountFromConfig } = require('../../lib/prompts/accountsPrompt');
const { loadAndValidateOptions } = require('../../lib/validation');

const i18nKey = 'cli.commands.accounts.subcommands.remove';
const i18nKey = 'commands.accounts.subcommands.remove';

exports.command = 'remove [--account]';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/accounts/rename.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { trackCommandUsage } = require('../../lib/usageTracking');
const { loadAndValidateOptions } = require('../../lib/validation');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.accounts.subcommands.rename';
const i18nKey = 'commands.accounts.subcommands.rename';

exports.command = 'rename <accountName> <newName>';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/accounts/use.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { i18n } = require('../../lib/lang');
const { selectAccountFromConfig } = require('../../lib/prompts/accountsPrompt');
const { loadAndValidateOptions } = require('../../lib/validation');

const i18nKey = 'cli.commands.accounts.subcommands.use';
const i18nKey = 'commands.accounts.subcommands.use';

exports.command = 'use [--account]';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/commands/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const { EXIT_CODES } = require('../lib/enums/exitCodes');
const { uiFeatureHighlight } = require('../lib/ui');
const { logErrorInstance } = require('../lib/errorHandlers/standardErrors');

const i18nKey = 'cli.commands.auth';
const i18nKey = 'commands.auth';

const TRACKING_STATUS = {
STARTED: 'started',
Expand Down Expand Up @@ -166,14 +166,14 @@ exports.handler = async options => {
logger.log('');
if (setAsDefault) {
logger.success(
i18n(`cli.lib.prompts.setAsDefaultAccountPrompt.setAsDefaultAccount`, {
i18n(`lib.prompts.setAsDefaultAccountPrompt.setAsDefaultAccount`, {
accountName,
})
);
} else {
const config = getConfig();
logger.info(
i18n(`cli.lib.prompts.setAsDefaultAccountPrompt.keepingCurrentDefault`, {
i18n(`lib.prompts.setAsDefaultAccountPrompt.keepingCurrentDefault`, {
accountName: config.defaultPortal,
})
);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const lighthouseScore = require('./cms/lighthouseScore');
const convertFields = require('./cms/convertFields');
const reactModules = require('./cms/reactModules');

const i18nKey = 'cli.commands.cms';
const i18nKey = 'commands.cms';

exports.command = 'cms';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/cms/convertFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {

const { trackConvertFieldsUsage } = require('../../lib/usageTracking');
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
const i18nKey = 'cli.commands.convertFields';
const i18nKey = 'commands.convertFields';

exports.command = 'convert-fields';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/cms/lighthouseScore.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { HUBSPOT_FOLDER, MARKETPLACE_FOLDER } = require('../../lib/constants');
const { uiLink } = require('../../lib/ui');
const { EXIT_CODES } = require('../../lib/enums/exitCodes');

const i18nKey = 'cli.commands.cms.subcommands.lighthouseScore';
const i18nKey = 'commands.cms.subcommands.lighthouseScore';

const DEFAULT_TABLE_HEADER = [
'Accessibility',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/cms/reactModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { i18n } = require('../../lib/lang');
const path = require('path');
const { trackCommandUsage } = require('../../lib/usageTracking');

const i18nKey = 'cli.commands.cms.subcommands.reactModule';
const i18nKey = 'commands.cms.subcommands.reactModule';

exports.command = 'get-react-module [--name] [--dest]';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { addConfigOptions, addAccountOptions } = require('../lib/commonOpts');
const { i18n } = require('../lib/lang');
const set = require('./config/set');

const i18nKey = 'cli.commands.config';
const i18nKey = 'commands.config';

exports.command = 'config';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/config/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { setDefaultMode } = require('./set/defaultMode');
const { setHttpTimeout } = require('./set/httpTimeout');
const { setAllowUsageTracking } = require('./set/allowUsageTracking');

const i18nKey = 'cli.commands.config.subcommands.set';
const i18nKey = 'commands.config.subcommands.set';

exports.command = 'set';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/commands/config/set/allowUsageTracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ const { trackCommandUsage } = require('../../../lib/usageTracking');
const { promptUser } = require('../../../lib/prompts/promptUtils');
const { i18n } = require('../../../lib/lang');

const i18nKey =
'cli.commands.config.subcommands.set.options.allowUsageTracking';
const i18nKey = 'commands.config.subcommands.set.options.allowUsageTracking';

const enableOrDisableUsageTracking = async () => {
const { isEnabled } = await promptUser([
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/config/set/defaultMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { trackCommandUsage } = require('../../../lib/usageTracking');
const { promptUser } = require('../../../lib/prompts/promptUtils');
const { i18n } = require('../../../lib/lang');

const i18nKey = 'cli.commands.config.subcommands.set.options.defaultMode';
const i18nKey = 'commands.config.subcommands.set.options.defaultMode';

const ALL_MODES = Object.values(MODE);

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/config/set/httpTimeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { promptUser } = require('../../../lib/prompts/promptUtils');
const { trackCommandUsage } = require('../../../lib/usageTracking');
const { i18n } = require('../../../lib/lang');

const i18nKey = 'cli.commands.config.subcommands.set.options.httpTimeout';
const i18nKey = 'commands.config.subcommands.set.options.httpTimeout';

const enterTimeout = async () => {
const { timeout } = await promptUser([
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const { trackCommandUsage } = require('../lib/usageTracking');
const assets = require('./create/index');
const { i18n } = require('../lib/lang');

const i18nKey = 'cli.commands.create';
const i18nKey = 'commands.create';

const SUPPORTED_ASSET_TYPES = Object.keys(assets)
.filter(t => !assets[t].hidden)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/create/api-sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {
} = require('@hubspot/local-dev-lib/github');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.create.subcommands.apiSample';
const i18nKey = 'commands.create.subcommands.apiSample';

module.exports = {
hidden: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/create/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { createModulePrompt } = require('../../lib/prompts/createModulePrompt');
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');
const { EXIT_CODES } = require('../../lib/enums/exitCodes');

const i18nKey = 'cli.commands.create.subcommands.module';
const i18nKey = 'commands.create.subcommands.module';

module.exports = {
dest: ({ dest }) => dest,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/create/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
const { i18n } = require('../../lib/lang');
const { EXIT_CODES } = require('../../lib/enums/exitCodes');

const i18nKey = 'cli.commands.create.subcommands.template';
const i18nKey = 'commands.create.subcommands.template';

module.exports = {
dest: ({ dest }) => dest,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/customObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { i18n } = require('../lib/lang');
const { logger } = require('@hubspot/local-dev-lib/logger');
const { uiBetaTag, uiLink } = require('../lib/ui');

const i18nKey = 'cli.commands.customObject';
const i18nKey = 'commands.customObject';

exports.command = ['custom-object', 'custom', 'co'];
exports.describe = uiBetaTag(i18n(`${i18nKey}.describe`), false);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/customObject/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {
} = require('@hubspot/local-dev-lib/api/customObjects');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.customObject.subcommands.create';
const i18nKey = 'commands.customObject.subcommands.create';
const { EXIT_CODES } = require('../../lib/enums/exitCodes');

exports.command = 'create <name> <definition>';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/customObject/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const listCommand = require('./schema/list');
const updateSchema = require('./schema/update');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.customObject.subcommands.schema';
const i18nKey = 'commands.customObject.subcommands.schema';

exports.command = 'schema';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/commands/customObject/schema/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const {
const { getHubSpotWebsiteOrigin } = require('@hubspot/local-dev-lib/urls');
const { i18n } = require('../../../lib/lang');

const i18nKey =
'cli.commands.customObject.subcommands.schema.subcommands.create';
const i18nKey = 'commands.customObject.subcommands.schema.subcommands.create';
const { EXIT_CODES } = require('../../../lib/enums/exitCodes');

exports.command = 'create <definition>';
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/commands/customObject/schema/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const {
} = require('@hubspot/local-dev-lib/api/customObjects');
const { i18n } = require('../../../lib/lang');

const i18nKey =
'cli.commands.customObject.subcommands.schema.subcommands.delete';
const i18nKey = 'commands.customObject.subcommands.schema.subcommands.delete';

exports.command = 'delete <name>';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/commands/customObject/schema/fetch-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ const {
const { i18n } = require('../../../lib/lang');
const { logSchemas } = require('../../../lib/schema');

const i18nKey =
'cli.commands.customObject.subcommands.schema.subcommands.fetchAll';
const i18nKey = 'commands.customObject.subcommands.schema.subcommands.fetchAll';

exports.command = 'fetch-all [dest]';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/commands/customObject/schema/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ const { trackCommandUsage } = require('../../../lib/usageTracking');
const { getAccountId } = require('../../../lib/commonOpts');
const { i18n } = require('../../../lib/lang');

const i18nKey =
'cli.commands.customObject.subcommands.schema.subcommands.fetch';
const i18nKey = 'commands.customObject.subcommands.schema.subcommands.fetch';

exports.command = 'fetch <name> [dest]';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/customObject/schema/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { getAccountId } = require('../../../lib/commonOpts');
const { listSchemas } = require('../../../lib/schema');
const { i18n } = require('../../../lib/lang');

const i18nKey = 'cli.commands.customObject.subcommands.schema.subcommands.list';
const i18nKey = 'commands.customObject.subcommands.schema.subcommands.list';

exports.command = 'list';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/commands/customObject/schema/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const {
const { getHubSpotWebsiteOrigin } = require('@hubspot/local-dev-lib/urls');
const { i18n } = require('../../../lib/lang');

const i18nKey =
'cli.commands.customObject.subcommands.schema.subcommands.update';
const i18nKey = 'commands.customObject.subcommands.schema.subcommands.update';
const { EXIT_CODES } = require('../../../lib/enums/exitCodes');

exports.command = 'update <name> <definition>';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
shouldOpenBrowserPrompt,
} = require('../lib/prompts/feedbackPrompt');

const i18nKey = 'cli.commands.project.subcommands.feedback';
const i18nKey = 'commands.project.subcommands.feedback';

exports.command = 'feedback';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { validateMode, loadAndValidateOptions } = require('../lib/validation');
const { trackCommandUsage } = require('../lib/usageTracking');
const { i18n } = require('../lib/lang');

const i18nKey = 'cli.commands.fetch';
const i18nKey = 'commands.fetch';
const { EXIT_CODES } = require('../lib/enums/exitCodes');
const { logErrorInstance } = require('../lib/errorHandlers/standardErrors');

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const upload = require('./filemanager/upload');
const fetch = require('./filemanager/fetch');
const { i18n } = require('../lib/lang');

const i18nKey = 'cli.commands.filemanager';
const i18nKey = 'commands.filemanager';

exports.command = 'filemanager';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/filemanager/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { loadAndValidateOptions } = require('../../lib/validation');
const { trackCommandUsage } = require('../../lib/usageTracking');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.filemanager.subcommands.fetch';
const i18nKey = 'commands.filemanager.subcommands.fetch';
const { EXIT_CODES } = require('../../lib/enums/exitCodes');
const { logErrorInstance } = require('../../lib/errorHandlers/standardErrors');

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/filemanager/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const { loadAndValidateOptions } = require('../../lib/validation');
const { trackCommandUsage } = require('../../lib/usageTracking');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.filemanager.subcommands.upload';
const i18nKey = 'commands.filemanager.subcommands.upload';
const { EXIT_CODES } = require('../../lib/enums/exitCodes');

exports.command = 'upload <src> <dest>';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const deploy = require('./functions/deploy');
const server = require('./functions/server');
const { i18n } = require('../lib/lang');

const i18nKey = 'cli.commands.functions';
const i18nKey = 'commands.functions';

exports.command = 'functions';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/functions/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { loadAndValidateOptions } = require('../../lib/validation');
const { outputBuildLog } = require('../../lib/serverlessLogs');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.functions.subcommands.deploy';
const i18nKey = 'commands.functions.subcommands.deploy';

const pollBuildStatus = (accountId, buildId) => {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/functions/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { trackCommandUsage } = require('../../lib/usageTracking');
const { loadAndValidateOptions } = require('../../lib/validation');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.functions.subcommands.list';
const i18nKey = 'commands.functions.subcommands.list';
const { EXIT_CODES } = require('../../lib/enums/exitCodes');

exports.command = 'list';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/functions/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { start: startTestServer } = require('@hubspot/serverless-dev-runtime');
const { loadAndValidateOptions } = require('../../lib/validation');
const { i18n } = require('../../lib/lang');

const i18nKey = 'cli.commands.functions.subcommands.server';
const i18nKey = 'commands.functions.subcommands.server';

exports.command = 'server <path>';
exports.describe = false;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/commands/hubdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const deleteCommand = require('./hubdb/delete');
const clearCommand = require('./hubdb/clear');
const { i18n } = require('../lib/lang');

const i18nKey = 'cli.commands.hubdb';
const i18nKey = 'commands.hubdb';

exports.command = 'hubdb';
exports.describe = i18n(`${i18nKey}.describe`);
Expand Down
Loading

0 comments on commit b08afe5

Please sign in to comment.