Skip to content

Commit 44ca1e7

Browse files
authored
docs: fix typo and polish (#1043)
1 parent 38c1d88 commit 44ca1e7

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

docs/guide/essentials/syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ As result the below:
202202

203203
### Custom Modifiers
204204

205-
If you want to use a non built-in modifiers, you can use your custom modifiers.
205+
If you want to use non built-in modifiers, you can use your custom modifiers.
206206

207207
To use custom modifiers, you must specify them in `modifiers` option of `createI18n`:
208208

packages/message-compiler/src/generator.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,17 +313,14 @@ export const generate = (
313313
function getMappingName(node: CodeGenNode): string | undefined {
314314
switch (node.type) {
315315
case NodeTypes.Text:
316+
case NodeTypes.Literal:
317+
case NodeTypes.LinkedModifier:
318+
case NodeTypes.LinkedKey:
316319
return node.value
317320
case NodeTypes.List:
318321
return node.index.toString()
319322
case NodeTypes.Named:
320323
return node.key
321-
case NodeTypes.Literal:
322-
return node.value
323-
case NodeTypes.LinkedModifier:
324-
return node.value
325-
case NodeTypes.LinkedKey:
326-
return node.value
327324
default:
328325
return undefined
329326
}

packages/vue-i18n-core/src/composer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export type DefaultNumberFormatSchema<
224224
export type MissingHandler = (
225225
locale: Locale,
226226
key: Path,
227-
insttance?: ComponentInternalInstance,
227+
instance?: ComponentInternalInstance,
228228
type?: string
229229
) => string | void
230230

0 commit comments

Comments
 (0)