-
-
Notifications
You must be signed in to change notification settings - Fork 362
docs: replace Legacy API usage with Composition API usage #2196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
docs: replace Legacy API usage with Composition API usage #2196
Conversation
WalkthroughThe documentation was updated to change the configuration option name from Changes
Suggested labels
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
docs/guide/essentials/fallback.md (1)
1-154
: 💡 Verification agent🧩 Analysis chain
Verify no leftover references to the old option.
Please search the docs to confirm there are no remaining occurrences of
formatFallbackMessages
.
🏁 Script executed:
#!/usr/bin/env bash # Ensure no lingering Legacy API references in documentation rg -n 'formatFallbackMessages' docs/guide/Length of output: 129
Remove legacy
formatFallbackMessages
referenceThe search revealed one remaining occurrence of the old option in the Composition API guide. Please update the table in
docs/guide/advanced/composition.md
to eliminate this reference:• docs/guide/advanced/composition.md:533
Suggested diff:
- | `formatFallbackMessages` | `fallbackFormat` |
🧰 Tools
🪛 LanguageTool
[typographical] ~9-~9: After the expression ‘for example’ a comma is usually used.
Context: ...llback is activated automatically. For examplede-DE-bavarian
would fallback 1. `de-...(COMMA_FOR_EXAMPLE)
[grammar] ~9-~9: The word “fallback” is a noun. The verb is spelled with a space.
Context: ...ly. For examplede-DE-bavarian
would fallback 1.de-DE-bavarian
1.de-DE
1.de
...(NOUN_VERB_CONFUSION)
[typographical] ~71-~71: After the expression ‘for example’ a comma is usually used.
Context: ...ocale by using an array of locales. For example ```javascript fallbackLocale: [ 'fr', ...(COMMA_FOR_EXAMPLE)
🪛 markdownlint-cli2 (0.17.2)
54-54: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
🧹 Nitpick comments (3)
docs/guide/essentials/fallback.md (3)
109-111
: Add a migration notice for Legacy API users.To aid developers migrating from the Legacy API, include a tip that the old option was named
formatFallbackMessages: true
in Legacy mode.Proposed snippet:
@@ ## Fallback interpolation - Set `fallbackFormat: true` to do template interpolation on translation keys when your language lacks a translation for a key. + Set `fallbackFormat: true` to do template interpolation on translation keys when your language lacks a translation for a key. +:::tip Migration Notice +In Legacy API mode, the equivalent option was `formatFallbackMessages: true`. +Refer to the Migration Guide for details. +:::
124-124
: Rephrase for clarity and conciseness.That sentence is a bit dense. Consider tightening it for better readability.
Example rewrite:
- In fact, you can even include template parameters in a key. Together with `fallbackFormat: true`, this lets you skip writing templates for your "base" language; the keys *are* your templates. + You can include template parameters directly in your keys. With `fallbackFormat: true`, these keys become your templates, removing the need for separate base-language templates.
136-136
: Unify code block language identifiers.This snippet is fenced as
javascript
, but earlier examples usejs
. For consistency across the guide, choose one.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/guide/essentials/fallback.md
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: release
- GitHub Check: Unit test (windows-latest, 20)
- GitHub Check: Build (windows-latest, 20)
- GitHub Check: Build (ubuntu-latest, 20)
- GitHub Check: Build (macos-latest, 20)
- GitHub Check: upload
Size ReportBundles
Usages
|
@intlify/core
@intlify/core-base
@intlify/devtools-types
@intlify/message-compiler
petite-vue-i18n
@intlify/shared
vue-i18n
@intlify/vue-i18n-core
commit: |
formatFallbackMessages
nuxt-modules/i18n#3670There are more places where the deprecated Legacy API is mentioned (on the fallback page at least), should these be removed?
This replaces the config key to enable fallback interpolation, instead of replacing we could add a notice pointing out the original config key.
Summary by CodeRabbit
formatFallbackMessages
tofallbackFormat
in descriptive text and examples.