Skip to content

Commit 6dac07f

Browse files
committed
📝 docs: update
1 parent 04dee29 commit 6dac07f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,18 @@ const files = [
6969
// ...
7070
]
7171

72-
// squeeze locale messages i18n locale messages of from single-file components
73-
const messages = squeeze('/path/to/src', files)
72+
// squeeze meta locale message from single-file components
73+
// NOTE: about scheme of meta locale message, see the `MetaLocaleMessage` type at `types/index.d.ts`
74+
const meta = squeeze('/path/to/src', files)
7475

75-
// write squeezed locale messages
76-
fs.writeFileSync('/path/to/src/messages.json')
76+
// write squeezed meta locale messages
77+
fs.writeFileSync('/path/to/src/meta.json', JSON.stringify(meta))
7778

78-
// after update locale messages with translation service or your code, it read locale messsages
79-
const translatedMessages = require('/path/to/src/translated')
79+
// after update meta locale message with 3rd vendor tools or your code, it read meta locale messsage
80+
const updatedMeta = require('/path/to/src/updated-meta.json')
8081

81-
// infuse locale message to single-file components
82-
const updatedFiles = infuse('/path/to/src', files, translatedMessages)
82+
// infuse meta locale message to single-file components
83+
const updatedFiles = infuse('/path/to/src', files, updatedMeta)
8384

8485
// write updated single-file component
8586
updateFiles.forEach(file => {

0 commit comments

Comments
 (0)