You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+85Lines changed: 85 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,91 @@ Infuse the meta of locale messages to i18n custom block at single-file component
156
156
157
157
`infuse` function will return new single-file components information that is updated with the single-file components information specified as `sources` and the meta of locale message as `meta`.
158
158
159
+
## :book: Provider: Specifications
160
+
161
+
You can use the `push` or `pull` commands to push the locale message to the l10n service as a resource for that service, and also to pull resources from the l10n service as the locale message.
162
+
163
+
<palign="center"><imgsrc="./assets/push-pull-command-image.png"alt="Push and Pull Image"></p>
164
+
165
+
When you run `push` or `pull` commands, you need the provider that implements the following.
166
+
167
+
- export provider factory function
168
+
- provider factory function must return a provider object that have the following I/F:
169
+
-`push` method
170
+
-`pull` method
171
+
172
+
The type definition with TypeScript is as follows:
As an implementation example of Provider, there is [`poeditor-service-provider`](https://github.com/kazupon/poeditor-service-provider) implemented as localization service provider of poeditor.
243
+
159
244
## :notebook: CLI: Locale message squeezing rules
160
245
161
246
The structure of locale messages to be squeezed is layered with the **directory structure** and **single-file component (`.vue`) filename**.
0 commit comments