@factorialco/rjsf-f0 3.9.0 → 3.9.1
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 +6 -3
- package/dist/styles.css +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,9 +95,11 @@ It does **not** bridge to f0's `F0FormField` `file`. That field is driven by an
|
|
|
95
95
|
|
|
96
96
|
### Localising the chrome
|
|
97
97
|
|
|
98
|
-
Every string this theme renders that the schema did not author goes through RJSF's `translateString` — `Add Item`, `Remove`, `Move up`, `Move down`, `Copy`, `Errors`, and the dropzone copy.
|
|
98
|
+
Every string this theme renders that the schema did not author goes through RJSF's `translateString` — `Add Item`, `Remove`, `Move up`, `Move down`, `Copy`, `Errors`, and the dropzone copy. Nothing in this package translates on its own: RJSF's default translator is the identity function and its `TranslatableString` values _are_ the English text (`RemoveButton` is the literal `'Remove'`), so used with plain RJSF, all of them stay English until a host supplies a translator.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Rendered through `@factorialco/fcode-react-forms` (`FcodeForm` or `FcodeJsonSchemaForm`), the form always gets one: the SDK picks the form's language from `locale` (then `fallbackLocale`) and translates these texts with its own table, so a Spanish form shows Spanish buttons and dropzone copy with no setup. Only Spanish ships a table today; any other language stays English.
|
|
101
|
+
|
|
102
|
+
One prop on the form replaces that translator, to add a language or change a wording:
|
|
101
103
|
|
|
102
104
|
```tsx
|
|
103
105
|
<FcodeForm
|
|
@@ -110,8 +112,9 @@ The dropzone's two defaults are keyed on their English text, since RJSF has no e
|
|
|
110
112
|
|
|
111
113
|
- `Drag a file here, or click to choose one`
|
|
112
114
|
- `Drag files here, or click to choose them` (when `multiple`)
|
|
115
|
+
- `The file could not be read. Choose it again.` (the alert when the browser fails to read a chosen file)
|
|
113
116
|
|
|
114
|
-
A form
|
|
117
|
+
A form in a language the SDK has no table for, rendered without this prop, shows English buttons next to translated field labels. `ui:options.dropzoneText` fixes only the dropzone; the translator fixes everything.
|
|
115
118
|
|
|
116
119
|
### Markdown alerts
|
|
117
120
|
|
package/dist/styles.css
CHANGED
|
@@ -1057,6 +1057,12 @@
|
|
|
1057
1057
|
margin: 0;
|
|
1058
1058
|
}
|
|
1059
1059
|
|
|
1060
|
+
/* A stepped form's own heading (root title and description), drawn once above
|
|
1061
|
+
* its steps by the SDK's step engine. */
|
|
1062
|
+
.fcode-steps-heading {
|
|
1063
|
+
margin-bottom: 1rem;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1060
1066
|
/*
|
|
1061
1067
|
* The actions row (rendered by the SDK's step engine) holds Back and
|
|
1062
1068
|
* Next/Submit as a footer, right-aligned like f0's wizard; it takes over the
|
package/package.json
CHANGED