fix: apply style guide to error messages and warnings (extended)#1076
Conversation
- Use direct, active voice: remove "Please", "You are using/attempting" - "in-line" → "inline" in CLI messages - Remove filler words and indirect phrasing - Use present tense instead of future where appropriate - Simplify verbose messages while preserving meaning Files changed across: next, react-core, cli, compiler, sanity, locadex
📝 WalkthroughWalkthroughThis PR systematically rewrites user-facing error messages, prompts, and warnings across 26+ files to remove "Please" and use more direct, concise phrasing. All changes are string literal modifications only, with no alterations to logic, control flow, or public API signatures. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (5)
packages/compiler/src/state/StringCollector.ts (1)
74-74: Use direct active voice to match the style guideLine 74 still uses the “you are trying” pattern. Consider rewriting to a direct active message for consistency with this PR’s style goal.
Proposed wording update
- 'Cannot have a counterId of -1. This likely means you are trying to register content from a namespace method invocation.' + 'Cannot use counterId -1. Namespace method invocation likely registered content.'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/compiler/src/state/StringCollector.ts` at line 74, The error message in StringCollector.ts that reads 'Cannot have a counterId of -1. This likely means you are trying to register content from a namespace method invocation.' should be rewritten in direct active voice; update the string (used in StringCollector) to something like "A counterId of -1 indicates registration of content from a namespace method invocation." so it follows the PR's style guide and preserves the same semantics.packages/cli/src/formats/json/parseJson.ts (1)
148-151: Consider updating this message for style guide consistency.Line 149 uses "You must specify..." which could be simplified to direct voice (e.g., "Specify a source item where its key matches the default locale"). This aligns with the PR's goal of removing "You are using/attempting" patterns.
♻️ Optional: Update to direct voice
if (!matchingItem.sourceItem) { logger.error( - `Source item not found at path: ${sourceObjectPointer}. You must specify a source item where its key matches the default locale` + `Source item not found at path: ${sourceObjectPointer}. Specify a source item where its key matches the default locale` ); return exitSync(1); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/src/formats/json/parseJson.ts` around lines 148 - 151, The logger.error message in parseJson.ts uses indirect phrasing ("You must specify..."); update the log string passed to logger.error (in the block that currently references sourceObjectPointer and calls exitSync(1)) to use direct voice — e.g., "Specify a source item where its key matches the default locale" — keeping the same context that includes sourceObjectPointer and then call exitSync(1) as before.packages/cli/src/formats/json/mergeJson.ts (1)
299-304: Consider updating this message for style guide consistency.Similar to the same message in
parseJson.ts, line 301 uses "You must specify..." which could be updated to direct voice for consistency with the PR's style guide goals.♻️ Optional: Update to direct voice
if (!matchingDefaultLocaleItem.sourceItem) { logger.error( - `Source item not found at path: ${sourceObjectPointer}. You must specify a source item where its key matches the default locale` + `Source item not found at path: ${sourceObjectPointer}. Specify a source item where its key matches the default locale` ); return exitSync(1); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/src/formats/json/mergeJson.ts` around lines 299 - 304, Update the error text logged in the block that checks matchingDefaultLocaleItem.sourceItem (the logger.error call that references sourceObjectPointer and calls exitSync(1)) to use a direct voice consistent with parseJson.ts (e.g., change "You must specify a source item..." to "Specify a source item..."); modify only the message string to match style guide tone while keeping the same context and existing variables in the log call.packages/cli/src/translation/validate.ts (1)
167-170: Consider centralizing this no-content message.This text is duplicated in translation flows; extracting a shared constant/helper would reduce drift risk for future copy updates.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/src/translation/validate.ts` around lines 167 - 170, The "No inline content or dictionaries were found for ${chalk.green(pkg)}..." string is duplicated—extract it into a shared constant or formatter (e.g., export a NO_INLINE_CONTENT_MESSAGE or formatNoContentMessage(pkg)) in a central translation/messages module and replace the literal in validateTranslations (the code around validate.ts that references pkg and chalk.green) and other translation flows to import and use that single helper so future edits only change one place.packages/react-core/src/errors-dir/createErrors.ts (1)
39-43: Minor inconsistency: Missing quotes around locale parameter.The locale parameter is displayed without quotes here (e.g.,
loadTranslations(${locale})), while the equivalent messages inpackages/next/src/errors/createErrors.ts(lines 10 and 13) display it with quotes (e.g.,loadTranslations("${locale}")). Consider aligning for consistency across packages.Proposed fix
export const customLoadTranslationsError = (locale: string = '') => - `${PACKAGE_NAME} Error: Failed to fetch locally stored translations. If using a custom loadTranslations(${locale}), make sure it is correctly implemented.`; + `${PACKAGE_NAME} Error: Failed to fetch locally stored translations. If using a custom loadTranslations("${locale}"), make sure it is correctly implemented.`; export const customLoadDictionaryWarning = (locale: string = '') => - `${PACKAGE_NAME} Error: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; + `${PACKAGE_NAME} Warning: Failed to fetch locally stored dictionary. If using a custom loadDictionary("${locale}"), make sure it is correctly implemented.`;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/react-core/src/errors-dir/createErrors.ts` around lines 39 - 43, Update the two error message factories customLoadTranslationsError and customLoadDictionaryWarning so the locale placeholder is wrapped in quotes (e.g., loadTranslations("...") / loadDictionary("...")) to match the style used in packages/next; locate these functions and adjust the template strings to include double quotes around ${locale} in both messages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/setup/userInput.ts`:
- Around line 21-31: The empty-input check fails because input.split(' ') always
yields at least one element; before creating localeList in the user input
validation (the code that uses localeList and gt.isValidLocale), trim the raw
input and return the "Enter at least one locale" error if trimmed input is
empty, or build localeList by splitting on whitespace and filtering out empty
strings (e.g., input.trim().split(/\s+/) or .split(' ').filter(Boolean)) so the
subsequent localeList.length check and gt.isValidLocale validations work
correctly.
In `@packages/cli/src/utils/installPackage.ts`:
- Line 83: The manual global install hint in installPackage.ts currently outputs
`npm install -g ${packageName}` and omits the optional `version`; update the
fallback string construction (where packageName is used to build the manual
command) to append `@${version}` when a version is provided so the hint becomes
`npm install -g ${packageName}@${version}` (ensure you handle empty/undefined
version to keep the original behavior). Locate the logic that produces the
messages referencing packageName (used in the installPackage utility) and modify
both occurrences to conditionally include `@${version}`.
In `@packages/next/src/errors/cacheComponents.ts`:
- Around line 21-22: The exported constant
cacheComponentsNonLocalTranslationsWarning currently contains a message prefixed
with "gt-next Error:", causing a severity mismatch; update the string value in
cacheComponentsNonLocalTranslationsWarning to use "gt-next Warning:" as the
message prefix (or alternatively rename the constant to
cacheComponentsNonLocalTranslationsError if you prefer an error-level label) so
the identifier and message severity are consistent—ensure the change is made
where cacheComponentsNonLocalTranslationsWarning is defined and any callers
still reference the same symbol.
In `@packages/react-core/src/errors-dir/createErrors.ts`:
- Around line 42-43: The exported function customLoadDictionaryWarning currently
produces a message prefixed with `${PACKAGE_NAME} Error:` which conflicts with
its "Warning" name; update the message string returned by
customLoadDictionaryWarning to use `${PACKAGE_NAME} Warning:` (preserving the
rest of the message and the locale interpolation) so the severity in the text
matches the function name and is consistent with the implementation in the other
package.
---
Nitpick comments:
In `@packages/cli/src/formats/json/mergeJson.ts`:
- Around line 299-304: Update the error text logged in the block that checks
matchingDefaultLocaleItem.sourceItem (the logger.error call that references
sourceObjectPointer and calls exitSync(1)) to use a direct voice consistent with
parseJson.ts (e.g., change "You must specify a source item..." to "Specify a
source item..."); modify only the message string to match style guide tone while
keeping the same context and existing variables in the log call.
In `@packages/cli/src/formats/json/parseJson.ts`:
- Around line 148-151: The logger.error message in parseJson.ts uses indirect
phrasing ("You must specify..."); update the log string passed to logger.error
(in the block that currently references sourceObjectPointer and calls
exitSync(1)) to use direct voice — e.g., "Specify a source item where its key
matches the default locale" — keeping the same context that includes
sourceObjectPointer and then call exitSync(1) as before.
In `@packages/cli/src/translation/validate.ts`:
- Around line 167-170: The "No inline content or dictionaries were found for
${chalk.green(pkg)}..." string is duplicated—extract it into a shared constant
or formatter (e.g., export a NO_INLINE_CONTENT_MESSAGE or
formatNoContentMessage(pkg)) in a central translation/messages module and
replace the literal in validateTranslations (the code around validate.ts that
references pkg and chalk.green) and other translation flows to import and use
that single helper so future edits only change one place.
In `@packages/compiler/src/state/StringCollector.ts`:
- Line 74: The error message in StringCollector.ts that reads 'Cannot have a
counterId of -1. This likely means you are trying to register content from a
namespace method invocation.' should be rewritten in direct active voice; update
the string (used in StringCollector) to something like "A counterId of -1
indicates registration of content from a namespace method invocation." so it
follows the PR's style guide and preserves the same semantics.
In `@packages/react-core/src/errors-dir/createErrors.ts`:
- Around line 39-43: Update the two error message factories
customLoadTranslationsError and customLoadDictionaryWarning so the locale
placeholder is wrapped in quotes (e.g., loadTranslations("...") /
loadDictionary("...")) to match the style used in packages/next; locate these
functions and adjust the template strings to include double quotes around
${locale} in both messages.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 16fc2953-2cda-4beb-af4a-8a2a5f8839bf
📒 Files selected for processing (29)
packages/cli/src/cli/base.tspackages/cli/src/cli/commands/upload.tspackages/cli/src/cli/react.tspackages/cli/src/config/generateSettings.tspackages/cli/src/config/validateSettings.tspackages/cli/src/console/index.tspackages/cli/src/console/logging.tspackages/cli/src/formats/files/aggregateFiles.tspackages/cli/src/formats/json/mergeJson.tspackages/cli/src/formats/json/parseJson.tspackages/cli/src/fs/determineFramework.tspackages/cli/src/locadex/setupFlow.tspackages/cli/src/react/parse/addVitePlugin/index.tspackages/cli/src/react/parse/addVitePlugin/updateViteConfig.tspackages/cli/src/setup/userInput.tspackages/cli/src/setup/wizard.tspackages/cli/src/translation/stage.tspackages/cli/src/translation/validate.tspackages/cli/src/utils/addExplicitAnchorIds.tspackages/cli/src/utils/installPackage.tspackages/cli/src/utils/packageManager.tspackages/cli/src/workflows/steps/BranchStep.tspackages/compiler/src/state/StringCollector.tspackages/locadex/src/logging/console.tspackages/next/src/errors/cacheComponents.tspackages/next/src/errors/createErrors.tspackages/next/src/errors/ssg.tspackages/react-core/src/errors-dir/createErrors.tspackages/sanity/src/serialization/serialize/index.ts
| const localeList = input.split(' '); | ||
| if (localeList.length === 0) { | ||
| return 'Please enter at least one locale'; | ||
| return 'Enter at least one locale'; | ||
| } | ||
| if (localeList.some((locale) => !locale.trim())) { | ||
| return 'Please enter a valid locale (e.g., es fr de)'; | ||
| return 'Enter a valid locale (e.g., es fr de)'; | ||
| } | ||
| for (const locale of localeList) { | ||
| if (!gt.isValidLocale(locale)) { | ||
| return 'Please enter a valid locale (e.g., es fr de)'; | ||
| return 'Enter a valid locale (e.g., es fr de)'; | ||
| } |
There was a problem hiding this comment.
Empty-input check is ineffective with current splitting.
Line 22 can never be true because split(' ') returns at least one element. Blank input falls through to the wrong validation message.
Suggested fix
- const localeList = input.split(' ');
- if (localeList.length === 0) {
+ const localeList = input.trim().split(/\s+/).filter(Boolean);
+ if (localeList.length === 0) {
return 'Enter at least one locale';
}
- if (localeList.some((locale) => !locale.trim())) {
- return 'Enter a valid locale (e.g., es fr de)';
- }
for (const locale of localeList) {
if (!gt.isValidLocale(locale)) {
return 'Enter a valid locale (e.g., es fr de)';
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const localeList = input.split(' '); | |
| if (localeList.length === 0) { | |
| return 'Please enter at least one locale'; | |
| return 'Enter at least one locale'; | |
| } | |
| if (localeList.some((locale) => !locale.trim())) { | |
| return 'Please enter a valid locale (e.g., es fr de)'; | |
| return 'Enter a valid locale (e.g., es fr de)'; | |
| } | |
| for (const locale of localeList) { | |
| if (!gt.isValidLocale(locale)) { | |
| return 'Please enter a valid locale (e.g., es fr de)'; | |
| return 'Enter a valid locale (e.g., es fr de)'; | |
| } | |
| const localeList = input.trim().split(/\s+/).filter(Boolean); | |
| if (localeList.length === 0) { | |
| return 'Enter at least one locale'; | |
| } | |
| for (const locale of localeList) { | |
| if (!gt.isValidLocale(locale)) { | |
| return 'Enter a valid locale (e.g., es fr de)'; | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/cli/src/setup/userInput.ts` around lines 21 - 31, The empty-input
check fails because input.split(' ') always yields at least one element; before
creating localeList in the user input validation (the code that uses localeList
and gt.isValidLocale), trim the raw input and return the "Enter at least one
locale" error if trimmed input is empty, or build localeList by splitting on
whitespace and filtering out empty strings (e.g., input.trim().split(/\s+/) or
.split(' ').filter(Boolean)) so the subsequent localeList.length check and
gt.isValidLocale validations work correctly.
| export const customLoadDictionaryWarning = (locale: string = '') => | ||
| `${PACKAGE_NAME} Error: fetching locally stored dictionary. If you are using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; | ||
| `${PACKAGE_NAME} Error: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; |
There was a problem hiding this comment.
Inconsistency: Function name says "Warning" but message says "Error".
The function is named customLoadDictionaryWarning, but the message prefix is ${PACKAGE_NAME} Error:. This creates a mismatch between the severity implied by the function name and the actual message. Compare with packages/next/src/errors/createErrors.ts (lines 12-13) which correctly uses "Warning" for the same function.
Proposed fix
export const customLoadDictionaryWarning = (locale: string = '') =>
- `${PACKAGE_NAME} Error: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`;
+ `${PACKAGE_NAME} Warning: Failed to fetch locally stored dictionary. If using a custom loadDictionary("${locale}"), make sure it is correctly implemented.`;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const customLoadDictionaryWarning = (locale: string = '') => | |
| `${PACKAGE_NAME} Error: fetching locally stored dictionary. If you are using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; | |
| `${PACKAGE_NAME} Error: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; | |
| export const customLoadDictionaryWarning = (locale: string = '') => | |
| `${PACKAGE_NAME} Warning: Failed to fetch locally stored dictionary. If using a custom loadDictionary("${locale}"), make sure it is correctly implemented.`; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/react-core/src/errors-dir/createErrors.ts` around lines 42 - 43, The
exported function customLoadDictionaryWarning currently produces a message
prefixed with `${PACKAGE_NAME} Error:` which conflicts with its "Warning" name;
update the message string returned by customLoadDictionaryWarning to use
`${PACKAGE_NAME} Warning:` (preserving the rest of the message and the locale
interpolation) so the severity in the text matches the function name and is
consistent with the implementation in the other package.
| export const customLoadDictionaryWarning = (locale: string = '') => | ||
| `${PACKAGE_NAME} Error: fetching locally stored dictionary. If you are using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; | ||
| `${PACKAGE_NAME} Error: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; |
There was a problem hiding this comment.
customLoadDictionaryWarning is named for a warning but the message uses "Error:" prefix. The corresponding function in packages/next/src/errors/createErrors.ts correctly uses "Warning:" — consider aligning this to match:
| export const customLoadDictionaryWarning = (locale: string = '') => | |
| `${PACKAGE_NAME} Error: fetching locally stored dictionary. If you are using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; | |
| `${PACKAGE_NAME} Error: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; | |
| export const customLoadDictionaryWarning = (locale: string = '') => | |
| `${PACKAGE_NAME} Warning: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/react-core/src/errors-dir/createErrors.ts
Line: 42-43
Comment:
`customLoadDictionaryWarning` is named for a warning but the message uses "Error:" prefix. The corresponding function in `packages/next/src/errors/createErrors.ts` correctly uses "Warning:" — consider aligning this to match:
```suggestion
export const customLoadDictionaryWarning = (locale: string = '') =>
`${PACKAGE_NAME} Warning: Failed to fetch locally stored dictionary. If using a custom loadDictionary(${locale}), make sure it is correctly implemented.`;
```
How can I resolve this? If you propose a fix, please make it concise.19ae4eb
into
generaltranslation:main
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## gt@2.7.1 ### Patch Changes - [#1085](#1085) [`dad7824`](dad7824) Thanks [@brian-lou](https://github.com/brian-lou)! - feat: Auth wizard supports both types of key creation - [#1082](#1082) [`3cb3bbd`](3cb3bbd) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Bumping CLI timeouts - [#1076](#1076) [`19ae4eb`](19ae4eb) Thanks [@moss-bryophyta](https://github.com/moss-bryophyta)! - Apply style guide to error messages and warnings: remove "Please", simplify verbose phrasing, fix `in-line` → `inline`. - Updated dependencies \[[`dad7824`](dad7824)]: - generaltranslation@8.1.14 ## @generaltranslation/compiler@1.1.25 ### Patch Changes - [#1076](#1076) [`19ae4eb`](19ae4eb) Thanks [@moss-bryophyta](https://github.com/moss-bryophyta)! - Apply style guide to error messages and warnings: remove "Please", simplify verbose phrasing, fix `in-line` → `inline`. - Updated dependencies \[[`dad7824`](dad7824)]: - generaltranslation@8.1.14 ## generaltranslation@8.1.14 ### Patch Changes - [#1085](#1085) [`dad7824`](dad7824) Thanks [@brian-lou](https://github.com/brian-lou)! - feat: Auth wizard supports both types of key creation ## gtx-cli@2.7.1 ### Patch Changes - Updated dependencies \[[`dad7824`](dad7824), [`3cb3bbd`](3cb3bbd), [`19ae4eb`](19ae4eb)]: - gt@2.7.1 ## gt-i18n@0.4.2 ### Patch Changes - Updated dependencies \[[`dad7824`](dad7824)]: - generaltranslation@8.1.14 - @generaltranslation/supported-locales@2.0.47 ## locadex@1.0.111 ### Patch Changes - [#1076](#1076) [`19ae4eb`](19ae4eb) Thanks [@moss-bryophyta](https://github.com/moss-bryophyta)! - Apply style guide to error messages and warnings: remove "Please", simplify verbose phrasing, fix `in-line` → `inline`. - Updated dependencies \[[`dad7824`](dad7824), [`3cb3bbd`](3cb3bbd), [`19ae4eb`](19ae4eb)]: - gt@2.7.1 ## gt-next@6.13.5 ### Patch Changes - [#1076](#1076) [`19ae4eb`](19ae4eb) Thanks [@moss-bryophyta](https://github.com/moss-bryophyta)! - Apply style guide to error messages and warnings: remove "Please", simplify verbose phrasing, fix `in-line` → `inline`. - Updated dependencies \[[`dad7824`](dad7824), [`19ae4eb`](19ae4eb)]: - generaltranslation@8.1.14 - @generaltranslation/compiler@1.1.25 - gt-i18n@0.4.2 - gt-react@10.11.4 - @generaltranslation/supported-locales@2.0.47 ## @generaltranslation/gt-next-lint@11.0.5 ### Patch Changes - Updated dependencies \[[`19ae4eb`](19ae4eb)]: - gt-next@6.13.5 ## gt-node@0.2.8 ### Patch Changes - Updated dependencies \[[`dad7824`](dad7824)]: - generaltranslation@8.1.14 - gt-i18n@0.4.2 ## gt-react@10.11.4 ### Patch Changes - Updated dependencies \[[`dad7824`](dad7824), [`19ae4eb`](19ae4eb)]: - generaltranslation@8.1.14 - @generaltranslation/react-core@1.5.4 - @generaltranslation/supported-locales@2.0.47 ## @generaltranslation/react-core@1.5.4 ### Patch Changes - [#1076](#1076) [`19ae4eb`](19ae4eb) Thanks [@moss-bryophyta](https://github.com/moss-bryophyta)! - Apply style guide to error messages and warnings: remove "Please", simplify verbose phrasing, fix `in-line` → `inline`. - Updated dependencies \[[`dad7824`](dad7824)]: - generaltranslation@8.1.14 - gt-i18n@0.4.2 - @generaltranslation/supported-locales@2.0.47 ## gt-sanity@1.1.21 ### Patch Changes - [#1076](#1076) [`19ae4eb`](19ae4eb) Thanks [@moss-bryophyta](https://github.com/moss-bryophyta)! - Apply style guide to error messages and warnings: remove "Please", simplify verbose phrasing, fix `in-line` → `inline`. - Updated dependencies \[[`dad7824`](dad7824)]: - generaltranslation@8.1.14 ## @generaltranslation/supported-locales@2.0.47 ### Patch Changes - Updated dependencies \[[`dad7824`](dad7824)]: - generaltranslation@8.1.14 ## gt-tanstack-start@0.1.11 ### Patch Changes - Updated dependencies \[[`dad7824`](dad7824), [`19ae4eb`](19ae4eb)]: - generaltranslation@8.1.14 - @generaltranslation/react-core@1.5.4 - gt-i18n@0.4.2 - gt-react@10.11.4 ## gt-next-middleware-e2e@0.1.5 ### Patch Changes - Updated dependencies \[[`19ae4eb`](19ae4eb)]: - gt-next@6.13.5 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Extends #1074 with a comprehensive pass across the entire monorepo.
Changes
Style guide compliance (29 files)
in-line→inlinein CLI messagesBug fixes (from main, not yet in #1074)
will like fallback→will likely fall backno locales→No locales)Packages touched
next(errors/cacheComponents, errors/createErrors, errors/ssg)react-core(errors-dir/createErrors)cli(console/index, console/logging, setup, config, formats, workflows, utils)compiler(state/StringCollector)locadex(logging/console)sanity(serialization/serialize)Summary by CodeRabbit
Greptile Summary
This PR extends #1074 with a comprehensive, monorepo-wide style guide pass across 29 files, applying direct voice to all error and warning messages (removing "Please", "You are using/attempting" patterns,
in-line→inline) while also fixing two correctness issues frommain: the typo"will like fallback"→"will likely fall back"and a missing sentence-start capitalisation inssg.ts.Key changes:
packages/next,packages/react-core,packages/cli,packages/compiler,packages/locadex, andpackages/sanitycreateSsrFunctionDuringSsgWarninginssg.tscorrects a long-standing typo and now ends with a period for consistencycustomLoadDictionaryWarningusesError:prefix but should useWarning:to match the function name and align with the corresponding function inpackages/next; since the file is touched by this PR it would be a low-cost fix to correct hereConfidence Score: 4/5
customLoadDictionaryWarninguses "Error:" prefix instead of "Warning:", which should be corrected while the file is open. The file is already being edited in this PR, making this a low-cost fix. All other style guide changes are correct and consistent.customLoadDictionaryWarningto match function name and the corresponding function inpackages/nextFlowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD subgraph packages["Packages with updated messages"] CLI["packages/cli<br/>(console/index, logging,<br/>base, react, config,<br/>formats, fs, locadex,<br/>setup, translation,<br/>utils, workflows)"] NEXT["packages/next<br/>(errors/cacheComponents,<br/>errors/createErrors,<br/>errors/ssg)"] RC["packages/react-core<br/>(errors-dir/createErrors)"] COMP["packages/compiler<br/>(state/StringCollector)"] LOC["packages/locadex<br/>(logging/console)"] SAN["packages/sanity<br/>(serialization/serialize)"] end subgraph changes["Style Changes Applied"] P["Remove 'Please'"] Y["Remove 'You are using/attempting'"] IL["in-line → inline"] TF["Typo fix: 'will like fallback'<br/>→ 'will likely fall back'"] CAP["Capitalise sentence starts"] end CLI --> P & Y & IL NEXT --> P & Y & TF & CAP RC --> P & Y COMP --> Y LOC --> P SAN --> PLast reviewed commit: 134fa69