@firecms/collection_editor 3.1.0-canary.1df3b2c → 3.1.0-canary.75005e4

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.
Files changed (67) hide show
  1. package/dist/index.es.js +6984 -3759
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.umd.js +6982 -3757
  4. package/dist/index.umd.js.map +1 -1
  5. package/dist/locales/de.d.ts +118 -0
  6. package/dist/locales/en.d.ts +118 -0
  7. package/dist/locales/es.d.ts +118 -0
  8. package/dist/locales/fr.d.ts +118 -0
  9. package/dist/locales/hi.d.ts +118 -0
  10. package/dist/locales/it.d.ts +118 -0
  11. package/dist/locales/pt.d.ts +118 -0
  12. package/dist/ui/collection_editor/AICollectionGeneratorPopover.d.ts +5 -1
  13. package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +4 -0
  14. package/dist/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -1
  15. package/package.json +12 -12
  16. package/src/ConfigControllerProvider.tsx +1 -0
  17. package/src/locales/de.ts +123 -0
  18. package/src/locales/en.ts +143 -0
  19. package/src/locales/es.ts +123 -0
  20. package/src/locales/fr.ts +123 -0
  21. package/src/locales/hi.ts +123 -0
  22. package/src/locales/it.ts +123 -0
  23. package/src/locales/pt.ts +123 -0
  24. package/src/ui/EditorCollectionAction.tsx +3 -3
  25. package/src/ui/EditorEntityAction.tsx +3 -2
  26. package/src/ui/NewCollectionButton.tsx +3 -1
  27. package/src/ui/NewCollectionCard.tsx +7 -4
  28. package/src/ui/PropertyAddColumnComponent.tsx +3 -2
  29. package/src/ui/collection_editor/AICollectionGeneratorPopover.tsx +29 -11
  30. package/src/ui/collection_editor/CollectionDetailsForm.tsx +28 -25
  31. package/src/ui/collection_editor/CollectionEditorDialog.tsx +55 -42
  32. package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +23 -19
  33. package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +12 -10
  34. package/src/ui/collection_editor/DisplaySettingsForm.tsx +19 -17
  35. package/src/ui/collection_editor/EntityActionsEditTab.tsx +11 -12
  36. package/src/ui/collection_editor/EntityActionsSelectDialog.tsx +5 -6
  37. package/src/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +5 -5
  38. package/src/ui/collection_editor/EnumForm.tsx +6 -2
  39. package/src/ui/collection_editor/ExtendSettingsForm.tsx +8 -7
  40. package/src/ui/collection_editor/GeneralSettingsForm.tsx +42 -42
  41. package/src/ui/collection_editor/GetCodeDialog.tsx +13 -12
  42. package/src/ui/collection_editor/KanbanConfigSection.tsx +11 -9
  43. package/src/ui/collection_editor/LayoutModeSwitch.tsx +7 -4
  44. package/src/ui/collection_editor/PropertyEditView.tsx +75 -66
  45. package/src/ui/collection_editor/SubcollectionsEditTab.tsx +16 -19
  46. package/src/ui/collection_editor/ViewModeSwitch.tsx +8 -6
  47. package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +6 -3
  48. package/src/ui/collection_editor/import/CollectionEditorImportMapping.tsx +5 -2
  49. package/src/ui/collection_editor/properties/BooleanPropertyField.tsx +3 -1
  50. package/src/ui/collection_editor/properties/CommonPropertyFields.tsx +6 -4
  51. package/src/ui/collection_editor/properties/DateTimePropertyField.tsx +20 -18
  52. package/src/ui/collection_editor/properties/EnumPropertyField.tsx +5 -4
  53. package/src/ui/collection_editor/properties/MapPropertyField.tsx +8 -7
  54. package/src/ui/collection_editor/properties/MarkdownPropertyField.tsx +22 -23
  55. package/src/ui/collection_editor/properties/NumberPropertyField.tsx +3 -1
  56. package/src/ui/collection_editor/properties/ReferencePropertyField.tsx +5 -4
  57. package/src/ui/collection_editor/properties/StoragePropertyField.tsx +46 -51
  58. package/src/ui/collection_editor/properties/StringPropertyField.tsx +3 -1
  59. package/src/ui/collection_editor/properties/UrlPropertyField.tsx +12 -10
  60. package/src/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +7 -4
  61. package/src/ui/collection_editor/properties/conditions/ConditionsEditor.tsx +8 -3
  62. package/src/ui/collection_editor/properties/validation/ArrayPropertyValidation.tsx +5 -2
  63. package/src/ui/collection_editor/properties/validation/GeneralPropertyValidation.tsx +7 -5
  64. package/src/ui/collection_editor/properties/validation/NumberPropertyValidation.tsx +10 -7
  65. package/src/ui/collection_editor/properties/validation/StringPropertyValidation.tsx +11 -9
  66. package/src/ui/collection_editor/properties/validation/ValidationPanel.tsx +4 -1
  67. package/src/useCollectionEditorPlugin.tsx +22 -6
@@ -7,7 +7,8 @@ import {
7
7
  singular,
8
8
  toSnakeCase,
9
9
  useAuthController,
10
- useCustomizationController
10
+ useCustomizationController,
11
+ useTranslation
11
12
  } from "@firecms/core";
12
13
  import {
13
14
  BooleanSwitchWithLabel,
@@ -17,7 +18,9 @@ import {
17
18
  DebouncedTextField,
18
19
  Dialog,
19
20
  ExpandablePanel,
21
+ HistoryIcon,
20
22
  IconButton,
23
+ SearchIcon,
21
24
  Select,
22
25
  SelectItem,
23
26
  TextField,
@@ -53,6 +56,7 @@ export function GeneralSettingsForm({
53
56
 
54
57
  const authController = useAuthController();
55
58
  const customizationController = useCustomizationController();
59
+ const { t } = useTranslation();
56
60
 
57
61
  const updateDatabaseId = (databaseId: string) => {
58
62
  setFieldValue("databaseId", databaseId ?? undefined);
@@ -88,12 +92,12 @@ export function GeneralSettingsForm({
88
92
  <div>
89
93
  <div className="flex flex-row gap-2 py-2 pt-3 items-center">
90
94
  <Typography variant={!isNewCollection ? "h5" : "h4"} className={"flex-grow"}>
91
- {isNewCollection ? "New collection" : `${values?.name} collection`}
95
+ {isNewCollection ? t("new_collection") : t("collection_with_name", { name: values?.name })}
92
96
  </Typography>
93
97
  <DefaultDatabaseField databaseId={values.databaseId}
94
98
  onDatabaseIdUpdate={updateDatabaseId} />
95
99
 
96
- <Tooltip title={"Change icon"}
100
+ <Tooltip title={t("change_icon")}
97
101
  asChild={true}>
98
102
  <IconButton
99
103
  shape={"square"}
@@ -105,7 +109,7 @@ export function GeneralSettingsForm({
105
109
 
106
110
  {parentCollection && <Chip colorScheme={"tealDarker"}>
107
111
  <Typography variant={"caption"}>
108
- This is a subcollection of <b>{parentCollection.name}</b>
112
+ {t("is_subcollection_of")} <b>{parentCollection.name}</b>
109
113
  </Typography>
110
114
  </Chip>}
111
115
 
@@ -118,12 +122,12 @@ export function GeneralSettingsForm({
118
122
  <TextField
119
123
  value={values.name ?? ""}
120
124
  onChange={(e: any) => updateName(e.target.value)}
121
- label={"Name"}
125
+ label={t("name")}
122
126
  autoFocus={true}
123
127
  required
124
128
  error={showErrors && Boolean(errors.name)} />
125
129
  <FieldCaption error={touched.name && Boolean(errors.name)}>
126
- {touched.name && Boolean(errors.name) ? errors.name : "Name of this collection, usually a plural name (e.g. Products)"}
130
+ {touched.name && Boolean(errors.name) ? errors.name : t("collection_name_description")}
127
131
  </FieldCaption>
128
132
  </div>
129
133
 
@@ -131,14 +135,14 @@ export function GeneralSettingsForm({
131
135
  <div className={cls("col-span-12")}>
132
136
  <Field name={"path"}
133
137
  as={DebouncedTextField}
134
- label={"Path"}
138
+ label={t("path")}
135
139
  required
136
140
  error={showErrors && Boolean(errors.path)} />
137
141
 
138
142
  <FieldCaption error={touched.path && Boolean(errors.path)}>
139
143
  {touched.path && Boolean(errors.path)
140
144
  ? errors.path
141
- : isSubcollection ? "Relative path to the parent (no need to include the parent path)" : "Path that this collection is stored in, in the database"}
145
+ : isSubcollection ? t("relative_path_to_parent") : t("path_in_database")}
142
146
  </FieldCaption>
143
147
  </div>
144
148
 
@@ -153,9 +157,9 @@ export function GeneralSettingsForm({
153
157
  return handleChange(e);
154
158
  }}
155
159
  value={values.singularName ?? ""}
156
- label={"Singular name"} />
160
+ label={t("singular_name")} />
157
161
  <FieldCaption error={showErrors && Boolean(errors.singularName)}>
158
- {showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities"}
162
+ {showErrors && Boolean(errors.singularName) ? errors.singularName : t("singular_name_description")}
159
163
  </FieldCaption>
160
164
  </div>
161
165
 
@@ -169,22 +173,22 @@ export function GeneralSettingsForm({
169
173
  multiline
170
174
  minRows={2}
171
175
  aria-describedby="description-helper-text"
172
- label="Description"
176
+ label={t("description")}
173
177
  />
174
178
  <FieldCaption error={showErrors && Boolean(errors.description)}>
175
- {showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown"}
179
+ {showErrors && Boolean(errors.description) ? errors.description : t("description_of_collection")}
176
180
  </FieldCaption>
177
181
  </div>
178
182
 
179
183
  {/* Collection ID */}
180
184
  <div className={"col-span-12"}>
181
185
  <Field name={"id"}
182
- as={DebouncedTextField}
183
- disabled={!isNewCollection}
184
- label={"Collection ID"}
185
- error={showErrors && Boolean(errors.id)} />
186
+ as={DebouncedTextField}
187
+ disabled={!isNewCollection}
188
+ label={t("collection_id")}
189
+ error={showErrors && Boolean(errors.id)} />
186
190
  <FieldCaption error={touched.id && Boolean(errors.id)}>
187
- {touched.id && Boolean(errors.id) ? errors.id : "This ID identifies this collection. Typically the same as the path."}
191
+ {touched.id && Boolean(errors.id) ? errors.id : t("collection_id_description")}
188
192
  </FieldCaption>
189
193
  </div>
190
194
 
@@ -193,13 +197,12 @@ export function GeneralSettingsForm({
193
197
  <BooleanSwitchWithLabel
194
198
  position={"start"}
195
199
  size={"large"}
196
- label="Collection group"
200
+ label={t("collection_group")}
197
201
  onValueChange={(v) => setFieldValue("collectionGroup", v)}
198
202
  value={values.collectionGroup ?? false}
199
203
  />
200
204
  <FieldCaption>
201
- A collection group consists of all collections with the same path. This allows
202
- you to query over multiple collections at once.
205
+ {t("collection_group_description")}
203
206
  </FieldCaption>
204
207
  </div>
205
208
 
@@ -207,7 +210,7 @@ export function GeneralSettingsForm({
207
210
 
208
211
  {/* Advanced Settings */}
209
212
  <ExpandablePanel
210
- title={<Typography variant="subtitle2">Advanced settings</Typography>}
213
+ title={<Typography variant="subtitle2">{t("advanced_settings")}</Typography>}
211
214
  initiallyExpanded={false}
212
215
  className="mt-4"
213
216
  innerClassName="p-4 flex flex-col gap-4"
@@ -218,16 +221,14 @@ export function GeneralSettingsForm({
218
221
  position={"start"}
219
222
  size={"large"}
220
223
  allowIndeterminate={true}
221
- label={values.history === null || values.history === undefined ? "Document history revisions enabled if enabled globally" : (
222
- values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled"
223
- )}
224
+ label={<span className="flex items-center gap-2"><HistoryIcon size={"smallest"} />{values.history === null || values.history === undefined ? t("doc_history_global") : (
225
+ values.history ? t("doc_history_enabled") : t("doc_history_not_enabled")
226
+ )}</span>}
224
227
  onValueChange={(v) => setFieldValue("history", v)}
225
228
  value={values.history === undefined ? null : values.history}
226
229
  />
227
230
  <FieldCaption>
228
- When enabled, each document in this collection will have a history of changes.
229
- This is useful for auditing purposes. The data is stored in a subcollection of the document
230
- in your database, called <b>__history</b>.
231
+ {t("doc_history_description")}
231
232
  </FieldCaption>
232
233
  </div>
233
234
 
@@ -235,7 +236,7 @@ export function GeneralSettingsForm({
235
236
  <div>
236
237
  <Select
237
238
  name="customId"
238
- label="Document IDs generation"
239
+ label={t("document_id_generation")}
239
240
  position={"item-aligned"}
240
241
  size={"large"}
241
242
  fullWidth={true}
@@ -254,27 +255,27 @@ export function GeneralSettingsForm({
254
255
  }
255
256
  renderValue={(value: any) => {
256
257
  if (value === "code_defined")
257
- return "Code defined";
258
+ return t("code_defined");
258
259
  else if (value === "true")
259
- return "Users must define an ID";
260
+ return t("users_must_define_id");
260
261
  else if (value === "optional")
261
- return "Users can define an ID, but it is not required";
262
+ return t("users_can_define_id");
262
263
  else
263
- return "Document ID is generated automatically";
264
+ return t("doc_id_auto_generated");
264
265
  }}
265
266
  >
266
267
  <SelectItem value={"false"}>
267
- Document ID is generated automatically
268
+ {t("doc_id_auto_generated")}
268
269
  </SelectItem>
269
270
  <SelectItem value={"true"}>
270
- Users must define an ID
271
+ {t("users_must_define_id")}
271
272
  </SelectItem>
272
273
  <SelectItem value={"optional"}>
273
- Users can define an ID, but it is not required
274
+ {t("users_can_define_id")}
274
275
  </SelectItem>
275
276
  </Select>
276
277
  <FieldCaption>
277
- Configure how document IDs are generated when creating new entities.
278
+ {t("config_doc_id_generation")}
278
279
  </FieldCaption>
279
280
  </div>
280
281
 
@@ -283,14 +284,12 @@ export function GeneralSettingsForm({
283
284
  <BooleanSwitchWithLabel
284
285
  position={"start"}
285
286
  size={"large"}
286
- label="Enable text search for this collection"
287
+ label={<span className="flex items-center gap-2"><SearchIcon size={"smallest"} />{t("enable_text_search")}</span>}
287
288
  onValueChange={(v) => setFieldValue("textSearchEnabled", v)}
288
289
  value={values.textSearchEnabled ?? false}
289
290
  />
290
291
  <FieldCaption>
291
- Allow text search for this collection. If you have not specified a text search
292
- delegate, this will use the built-in local text search. This is not recommended
293
- for large collections, as it may incur in performance and cost issues.
292
+ {t("text_search_description")}
294
293
  </FieldCaption>
295
294
  </div>
296
295
  </ExpandablePanel>
@@ -321,8 +320,9 @@ function DefaultDatabaseField({
321
320
  databaseId,
322
321
  onDatabaseIdUpdate
323
322
  }: { databaseId?: string, onDatabaseIdUpdate: (databaseId: string) => void }) {
323
+ const { t } = useTranslation();
324
324
 
325
- return <Tooltip title={"Database ID"}
325
+ return <Tooltip title={t("database_id")}
326
326
  side={"top"}
327
327
  align={"start"}>
328
328
  <TextField size={"small"}
@@ -330,6 +330,6 @@ function DefaultDatabaseField({
330
330
  inputClassName={"text-end"}
331
331
  value={databaseId ?? ""}
332
332
  onChange={(e: any) => onDatabaseIdUpdate(e.target.value)}
333
- placeholder={"(default)"}></TextField>
333
+ placeholder={t("default_text")}></TextField>
334
334
  </Tooltip>
335
335
  }
@@ -1,4 +1,4 @@
1
- import { EntityCollection, isEmptyObject, useSnackbarController } from "@firecms/core";
1
+ import { EntityCollection, isEmptyObject, useSnackbarController, useTranslation } from "@firecms/core";
2
2
  import { Button, ContentCopyIcon, Dialog, DialogActions, DialogContent, DialogTitle, Tab, Tabs, Typography } from "@firecms/ui";
3
3
  import React, { useState } from "react";
4
4
  import JSON5 from "json5";
@@ -13,17 +13,18 @@ export function GetCodeDialog({
13
13
  }: { onOpenChange: (open: boolean) => void, collection: any, open: any }) {
14
14
 
15
15
  const snackbarController = useSnackbarController();
16
+ const { t } = useTranslation();
16
17
  const [format, setFormat] = useState<"ts" | "json">("json");
17
18
 
18
19
  const collectionData = collectionToCode({ ...collection });
19
20
 
20
21
  const tsCode = collection
21
22
  ? "import { EntityCollection } from \"@firecms/core\";\n\nconst " + (collection?.name ? camelCase(collection.name) : "my") + "Collection:EntityCollection = " + JSON5.stringify(collectionData, null, "\t")
22
- : "No collection selected";
23
+ : t("no_collection_selected");
23
24
 
24
25
  const jsonCode = collection
25
26
  ? JSON.stringify(collectionData, null, 2)
26
- : "No collection selected";
27
+ : t("no_collection_selected");
27
28
 
28
29
  const code = format === "ts" ? tsCode : jsonCode;
29
30
 
@@ -31,7 +32,7 @@ export function GetCodeDialog({
31
32
  onOpenChange={onOpenChange}
32
33
  maxWidth={"4xl"}>
33
34
  <div className="flex items-center justify-between pr-6">
34
- <DialogTitle variant={"h6"}>Code for {collection.name}</DialogTitle>
35
+ <DialogTitle variant={"h6"}>{t("code_for_collection")} {collection.name}</DialogTitle>
35
36
  <Tabs value={format} onValueChange={(v) => setFormat(v as "ts" | "json")}>
36
37
  <Tab value="ts">TypeScript</Tab>
37
38
  <Tab value="json">JSON</Tab>
@@ -41,13 +42,13 @@ export function GetCodeDialog({
41
42
 
42
43
  <Typography variant={"body2"} className={"mb-4"}>
43
44
  {format === "json"
44
- ? "Use this config to define the collection in JSON format."
45
+ ? t("use_config_define_json")
45
46
  : <>
46
- If you want to customise the collection in code, you can add this collection code to your CMS
47
- app configuration.
48
- More info in the <a
47
+ {t("customise_collection_code")}
48
+ <br/>
49
+ <a
49
50
  rel="noopener noreferrer"
50
- href={"https://firecms.co/docs/cloud/quickstart"}>docs</a>.
51
+ href={"https://firecms.co/docs/cloud/quickstart"}>{t("more_info")}</a>
51
52
  </>}
52
53
  </Typography>
53
54
  <Highlight
@@ -84,14 +85,14 @@ export function GetCodeDialog({
84
85
  e.preventDefault();
85
86
  snackbarController.open({
86
87
  type: "success",
87
- message: "Copied"
88
+ message: t("copied")
88
89
  })
89
90
  return navigator.clipboard.writeText(code);
90
91
  }}>
91
92
  <ContentCopyIcon size={"small"} />
92
- Copy to clipboard
93
+ {t("copy")}
93
94
  </Button>
94
- <Button onClick={() => onOpenChange(false)}>Close</Button>
95
+ <Button onClick={() => onOpenChange(false)}>{t("cancel")}</Button>
95
96
  </DialogActions>
96
97
  </Dialog>;
97
98
  }
@@ -8,7 +8,8 @@ import {
8
8
  resolveCollection,
9
9
  unslugify,
10
10
  useAuthController,
11
- useCustomizationController
11
+ useCustomizationController,
12
+ useTranslation
12
13
  } from "@firecms/core";
13
14
  import {
14
15
  CloseIcon,
@@ -30,6 +31,7 @@ export function KanbanConfigSection({
30
31
  const authController = useAuthController();
31
32
  const customizationController = useCustomizationController();
32
33
  const { values, setFieldValue } = useFormex<EntityCollection>();
34
+ const { t } = useTranslation();
33
35
  const panelRef = useRef<HTMLDivElement>(null);
34
36
  const [columnPropertyDialogOpen, setColumnPropertyDialogOpen] = useState(false);
35
37
 
@@ -83,10 +85,10 @@ export function KanbanConfigSection({
83
85
 
84
86
  return (
85
87
  <div className={className} ref={panelRef}>
88
+ <Typography variant={"label"} color={"secondary"} className={"ml-3.5"}>{t("kanban_column_property")}</Typography>
86
89
  <Select
87
90
  key={`column-select-${enumStringProperties.length}`}
88
91
  name="kanban.columnProperty"
89
- label="Kanban Column Property"
90
92
  size={"large"}
91
93
  fullWidth={true}
92
94
  position={"item-aligned"}
@@ -105,10 +107,10 @@ export function KanbanConfigSection({
105
107
  }}
106
108
  renderValue={(value) => {
107
109
  if (columnPropertyMissing) {
108
- return <span className="text-red-500">{value} (not found)</span>;
110
+ return <span className="text-red-500">{value} ({t("not_found_suffix")})</span>;
109
111
  }
110
112
  const prop = enumStringProperties.find(p => p.key === value);
111
- if (!prop) return "Select a property";
113
+ if (!prop) return t("select_a_property");
112
114
  const fieldConfig = getFieldConfig(prop.property, customizationController.propertyConfigs);
113
115
  return (
114
116
  <div className="flex items-center gap-2">
@@ -138,7 +140,7 @@ export function KanbanConfigSection({
138
140
  <div>
139
141
  <div>{prop.label}</div>
140
142
  <Typography variant="caption" color="secondary">
141
- {fieldConfig?.name || "Enum"}
143
+ {fieldConfig?.name || "enum"}
142
144
  </Typography>
143
145
  </div>
144
146
  </div>
@@ -148,10 +150,10 @@ export function KanbanConfigSection({
148
150
  </Select>
149
151
  <FieldCaption error={columnPropertyMissing}>
150
152
  {columnPropertyMissing
151
- ? `Property "${kanbanConfig?.columnProperty}" does not exist or is not an enum string property. Please select a valid property or clear the selection.`
153
+ ? t("kanban_property_not_found", { property: kanbanConfig?.columnProperty ?? "" })
152
154
  : enumStringProperties.length === 0
153
- ? "No enum string properties found. Add a string property with enumValues to use Kanban view."
154
- : "Select a string property with enum values to group entities into columns"
155
+ ? t("no_enum_string_properties")
156
+ : t("kanban_column_description")
155
157
  }
156
158
  </FieldCaption>
157
159
 
@@ -162,7 +164,7 @@ export function KanbanConfigSection({
162
164
  className="ml-3.5 text-sm text-primary hover:text-primary-dark mt-2"
163
165
  onClick={() => setColumnPropertyDialogOpen(true)}
164
166
  >
165
- + Create "{dialogPropertyKey}" property
167
+ {t("create_property", { property: dialogPropertyKey })}
166
168
  </button>
167
169
  <PropertyFormDialog
168
170
  open={columnPropertyDialogOpen}
@@ -1,4 +1,5 @@
1
1
  import { cls, SquareIcon, ToggleButtonGroup, Typography, VerticalSplitIcon } from "@firecms/ui";
2
+ import { useTranslation } from "@firecms/core";
2
3
 
3
4
  export function LayoutModeSwitch({
4
5
  value,
@@ -10,8 +11,10 @@ export function LayoutModeSwitch({
10
11
  className?: string;
11
12
  }) {
12
13
 
14
+ const { t } = useTranslation();
15
+
13
16
  return <div className={cls(className)}>
14
- <Typography variant={"label"} color={"secondary"} className={"ml-3.5"}>Document view</Typography>
17
+ <Typography variant={"label"} color={"secondary"} className={"ml-3.5"}>{t("document_view")}</Typography>
15
18
  <div className={"my-2"}>
16
19
  <ToggleButtonGroup
17
20
  value={value}
@@ -19,17 +22,17 @@ export function LayoutModeSwitch({
19
22
  options={[
20
23
  {
21
24
  value: "side_panel",
22
- label: "Side panel",
25
+ label: t("side_panel"),
23
26
  icon: <VerticalSplitIcon />
24
27
  },
25
28
  {
26
29
  value: "full_screen",
27
- label: "Full screen",
30
+ label: t("full_screen"),
28
31
  icon: <SquareIcon />
29
32
  }
30
33
  ]}
31
34
  />
32
35
  </div>
33
- <Typography variant={"caption"} color={"secondary"} className={"ml-3.5"}>Should documents be opened full screen or in an inline side dialog</Typography>
36
+ <Typography variant={"caption"} color={"secondary"} className={"ml-3.5"}>{t("should_documents_opened_full_screen")}</Typography>
34
37
  </div>
35
38
  }