@fluid-app/fluid-cli-localization 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -13
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +506 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@ fluid countries prices DE --rate 0.92 --write --yes
|
|
|
24
24
|
fluid countries languages DE # which market languages are off, and the command to turn them on
|
|
25
25
|
fluid translations enable de --yes
|
|
26
26
|
fluid countries agreements DE --create --yes # the atlas agreements, in every atlas language
|
|
27
|
+
fluid countries forms DE # the atlas enrollment fields against the country's forms
|
|
28
|
+
fluid countries forms DE --create --yes # the country's enrollment form, as a draft to review
|
|
27
29
|
fluid countries status DE # check against the atlas
|
|
28
30
|
|
|
29
31
|
# Translate
|
|
@@ -63,18 +65,19 @@ and agents use the commands instead.
|
|
|
63
65
|
|
|
64
66
|
## `fluid countries`
|
|
65
67
|
|
|
66
|
-
| Command | What it does
|
|
67
|
-
| ----------------------- |
|
|
68
|
-
| `atlas <iso>` | The atlas for a market, without the agreement legal text. `--agreement <localId>` prints one agreement in full.
|
|
69
|
-
| `compliance <iso>` | Disclosure pages, cookie rule, tax display and unit pricing from the atlas.
|
|
70
|
-
| `list` | The countries the company sells in.
|
|
71
|
-
| `plan <iso> --mode <m>` | What `open` would send, with language and agreement status, warehouses and the launch checklist. Read-only.
|
|
72
|
-
| `open <iso> --mode <m>` | Adds the country, seeded from the atlas: currency, mode, tax name, tax-inclusive pricing, tax invoices, 3-D Secure, legal settings, address layout and payment method order.
|
|
73
|
-
| `update <iso>` | Changes only the settings you name on an open country (`--set key=value`, `--warehouse-id`, `--business-id`, `--entity-registered`, `--settlement-currency`), e.g. its entity. Nested settings merge into the current ones.
|
|
74
|
-
| `prices <iso>` | Converts each variant's price from another country (`--from-country`, default `US`) into this country's currency. A dry run unless `--write`.
|
|
75
|
-
| `languages <iso>` | The market's major languages and whether each is on, with the `fluid translations enable` command for the ones that are off.
|
|
76
|
-
| `agreements <iso>` | Atlas agreements matched to the company's by title. `--create` adds the missing ones; `--translate` writes the atlas translations onto ones already on the country.
|
|
77
|
-
| `
|
|
68
|
+
| Command | What it does |
|
|
69
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| `atlas <iso>` | The atlas for a market, without the agreement legal text. `--agreement <localId>` prints one agreement in full. |
|
|
71
|
+
| `compliance <iso>` | Disclosure pages, cookie rule, tax display and unit pricing from the atlas. |
|
|
72
|
+
| `list` | The countries the company sells in. |
|
|
73
|
+
| `plan <iso> --mode <m>` | What `open` would send, with language and agreement status, warehouses and the launch checklist. Read-only. |
|
|
74
|
+
| `open <iso> --mode <m>` | Adds the country, seeded from the atlas: currency, mode, tax name, tax-inclusive pricing, tax invoices, 3-D Secure, legal settings, address layout and payment method order. |
|
|
75
|
+
| `update <iso>` | Changes only the settings you name on an open country (`--set key=value`, `--warehouse-id`, `--business-id`, `--entity-registered`, `--settlement-currency`), e.g. its entity. Nested settings merge into the current ones. |
|
|
76
|
+
| `prices <iso>` | Converts each variant's price from another country (`--from-country`, default `US`) into this country's currency. A dry run unless `--write`. |
|
|
77
|
+
| `languages <iso>` | The market's major languages and whether each is on, with the `fluid translations enable` command for the ones that are off. |
|
|
78
|
+
| `agreements <iso>` | Atlas agreements matched to the company's by title. `--create` adds the missing ones; `--translate` writes the atlas translations onto ones already on the country. |
|
|
79
|
+
| `forms <iso>` | The atlas enrollment fields against the country's Post Purchase forms: which are collected, which are missing, and what `--create` would send. `--create` makes the country's enrollment form or adds the missing fields to it. |
|
|
80
|
+
| `status <iso>` | Compares the country with the atlas, checks that every variant of your active products has a price there and something is on sale and that enrollment asks for the atlas fields, then lists the commands to run and the work left for a person. |
|
|
78
81
|
|
|
79
82
|
`open` takes `--warehouse-id`, `--business-id`, `--entity-registered` and
|
|
80
83
|
`--settlement-currency` for what the atlas can't know, and `--set key=value`
|
|
@@ -117,6 +120,55 @@ rounding, counts, and a sample of before and after prices. Nothing is saved.
|
|
|
117
120
|
`--overwrite` is refused for these companies, so a price someone set in the
|
|
118
121
|
price editor is never replaced from here.
|
|
119
122
|
|
|
123
|
+
### Setting up the enrollment form
|
|
124
|
+
|
|
125
|
+
Enrollment checkout shows every active Post Purchase form for the cart's
|
|
126
|
+
country after payment, merged into one. `fluid countries forms DE` reads
|
|
127
|
+
those forms and prints, for each atlas enrollment field, the element it maps
|
|
128
|
+
to and whether enrollment asks for it (`collected`, `inDraft`, `missing` or
|
|
129
|
+
`byHand`), with `plan`: what `--create` would send. Nothing is saved.
|
|
130
|
+
|
|
131
|
+
| Atlas component | Element type |
|
|
132
|
+
| ------------------------------------------------ | ---------------------------------------------------------------------------- |
|
|
133
|
+
| `LegalName`, `FullName`, `Email`, `PhoneNumber` | `input`, `puck_type` `legal_name`, `full_name`, `email`, `phone_number` |
|
|
134
|
+
| `DateOfBirth` | `input`, `puck_type` `date_of_birth`, stored sensitive |
|
|
135
|
+
| `ShortTextEntry`, `LongTextEntry`, `NumberEntry` | `short_text_entry`, `long_text_entry`, `number_entry` |
|
|
136
|
+
| `YesNo`, `MultipleChoice` | `yes_no_entry`, `multiple_choice_entry` |
|
|
137
|
+
| `FileUpload`, `Checkbox` | `file_upload`, `checkbox` |
|
|
138
|
+
| `SocialSecurityNumber` | Not created, nor is a text field labelled as an ID, tax, bank or card number |
|
|
139
|
+
|
|
140
|
+
- **The form.** `--create` makes `Enrollment - <Country>`, a Post Purchase
|
|
141
|
+
form scoped to the country alone, the same form the admin's country
|
|
142
|
+
checklist makes. If it exists, as a draft or published, the missing fields
|
|
143
|
+
are added to it instead. `--form <id>` adds to another Post Purchase form
|
|
144
|
+
scoped to the country alone.
|
|
145
|
+
- **Draft first.** A new form is a draft, so a person reviews it in the form
|
|
146
|
+
builder before enrollment asks for it. `--activate` publishes it (or the
|
|
147
|
+
existing draft) in the same run.
|
|
148
|
+
- **Only what's missing.** A field any active Post Purchase form for the
|
|
149
|
+
country already collects is not added again. An identity field (name,
|
|
150
|
+
email, phone, date of birth) matches by type; any other field by type and
|
|
151
|
+
label.
|
|
152
|
+
- **Nothing removed.** Adding to a form reads it again and sends back each of
|
|
153
|
+
its components with its element id, so nothing on it is deactivated and no
|
|
154
|
+
field's sensitivity changes.
|
|
155
|
+
- **Other countries.** A form shared with other countries is read, never
|
|
156
|
+
changed: a field one country's atlas asks for doesn't belong on another
|
|
157
|
+
country's enrollment. What it lacks goes on the country's own form.
|
|
158
|
+
- **Member types.** A Post Purchase form reaches everyone who enrolls in the
|
|
159
|
+
country, so a field the atlas asks only some member types for (dates of
|
|
160
|
+
birth, and most tax questions) is listed under `byHand` with the reason
|
|
161
|
+
instead. So are multiple choices the atlas gives no choices for.
|
|
162
|
+
- **Data forms must not collect.** An SSN, and any field that takes a value
|
|
163
|
+
(anything but a yes/no or checkbox) whose label names a national or tax ID number, bank or card details, or a
|
|
164
|
+
password (a CPF, a TIN, an IBAN), is never created; it's listed under
|
|
165
|
+
`byHand`. Collect those through your tax or payout provider.
|
|
166
|
+
- **Sensitive fields.** A date of birth is stored sensitive, so roles without
|
|
167
|
+
the forms view-sensitive permission see its answers masked. Creating one
|
|
168
|
+
needs the forms manage-sensitive permission; without it the API refuses the
|
|
169
|
+
whole save and the command says so. `--skip-sensitive` creates the rest and
|
|
170
|
+
lists the ones it left out.
|
|
171
|
+
|
|
120
172
|
## `fluid translations`
|
|
121
173
|
|
|
122
174
|
| Command | What it does |
|
|
@@ -170,7 +222,7 @@ These have no API that translates them, so they stay in fluid-admin or with a
|
|
|
170
222
|
person:
|
|
171
223
|
|
|
172
224
|
- Promotions (title, description, terms).
|
|
173
|
-
-
|
|
225
|
+
- Translations of enrollment form fields and other form labels.
|
|
174
226
|
- Fluid's own labels ("New", "Trending"), which Fluid translates.
|
|
175
227
|
- Section settings written as literal text rather than as a locale key. Use
|
|
176
228
|
the page editor's translate mode, which turns the setting into a key, then
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/countries/commands.ts","../src/translations/commands.ts","../src/index.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/countries/commands.ts","../src/translations/commands.ts","../src/index.ts"],"mappings":";;;;iBAiMgB,yBAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;;;iBCnGS,4BAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;;;;AD+FP;;;;;cElLM,MAAA,EAAQ,WAAA"}
|