@live-change/frontend-auto-form 0.9.131 → 0.9.133

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.
@@ -19,5 +19,44 @@
19
19
  "fromService": "from",
20
20
  "modelOption": "{model}",
21
21
  "modelOptionWithService": "{service} - {model}"
22
+ },
23
+ "actions": {
24
+ "list": "List",
25
+ "view": "View",
26
+ "edit": "Edit",
27
+ "delete": "Delete",
28
+ "access": "Access",
29
+ "create": "Create",
30
+ "save": "Save",
31
+ "reset": "Reset"
32
+ },
33
+ "crud": {
34
+ "notAuthorized": "Not authorized",
35
+ "savingDraft": "Saving draft...",
36
+ "draftChanged": "Draft changed",
37
+ "validationError": "Before saving, please correct the errors above.",
38
+ "noChanges": "No changes to save.",
39
+ "saveModel": "Save {model}",
40
+ "createModel": "Create {model}",
41
+ "createNew": "Create new {model}",
42
+ "executing": "Executing...",
43
+ "editModel": "Edit {model}",
44
+ "backwardRelations": "Backward relations"
45
+ },
46
+ "nav": {
47
+ "home": "Home",
48
+ "customers": "Customers",
49
+ "addNew": "Add New",
50
+ "search": "Search",
51
+ "purchases": "Purchases",
52
+ "messages": "Messages",
53
+ "calendar": "Calendar",
54
+ "stats": "Stats",
55
+ "inbox": "Inbox",
56
+ "notifications": "Notifications"
57
+ },
58
+ "common": {
59
+ "rejected": "Rejected",
60
+ "rejectedDetail": "You have rejected"
22
61
  }
23
62
  }
@@ -0,0 +1,50 @@
1
+ {
2
+ "languageName": "Polski",
3
+ "errors": {
4
+ "empty": "To pole jest wymagane.",
5
+ "tooShort": "Za krótkie, minimum {length} znaków.",
6
+ "tooLong": "Za długie, maksimum {length} znaków.",
7
+ "wrongUrl": "Nieprawidłowy URL. Akceptowalne formaty: https://example.com lub www.example.com"
8
+ },
9
+ "info": {
10
+ "minLength": "Minimalna długość - {minLength} znaków.",
11
+ "maxLength": "{length} / {maxLength}"
12
+ },
13
+ "autoform": {
14
+ "addItem": "Dodaj następny element"
15
+ },
16
+ "objectPicker": {
17
+ "selectObjectType": "Wybierz typ obiektu",
18
+ "currentType": "Wybierz",
19
+ "fromService": "z",
20
+ "modelOption": "{model}",
21
+ "modelOptionWithService": "{service} - {model}"
22
+ },
23
+ "actions": {
24
+ "list": "Lista",
25
+ "view": "Pokaż",
26
+ "edit": "Edytuj",
27
+ "delete": "Usuń",
28
+ "access": "Dostęp",
29
+ "create": "Utwórz",
30
+ "save": "Zapisz",
31
+ "reset": "Resetuj"
32
+ },
33
+ "crud": {
34
+ "notAuthorized": "Brak autoryzacji",
35
+ "savingDraft": "Zapisywanie szkicu...",
36
+ "draftChanged": "Szkic zmieniony",
37
+ "validationError": "Przed zapisaniem popraw błędy powyżej.",
38
+ "noChanges": "Brak zmian do zapisania.",
39
+ "saveModel": "Zapisz {model}",
40
+ "createModel": "Utwórz {model}",
41
+ "createNew": "Utwórz nowy {model}",
42
+ "executing": "Wykonywanie...",
43
+ "editModel": "Edytuj {model}",
44
+ "backwardRelations": "Relacje wsteczne"
45
+ },
46
+ "common": {
47
+ "rejected": "Odrzucone",
48
+ "rejectedDetail": "Odrzuciłeś"
49
+ }
50
+ }
@@ -3,28 +3,28 @@
3
3
  <div class="flex flex-col mt-2 md:mt-0">
4
4
  <div v-if="savingDraft" class="text-surface-500 dark:text-surface-300 mr-2 flex flex-row items-center">
5
5
  <i class="pi pi-spin pi-spinner mr-2" style="font-size: 1.23rem"></i>
6
- <span>Saving draft...</span>
6
+ <span>{{ t('crud.savingDraft') }}</span>
7
7
  </div>
8
8
  <div v-else-if="draftChanged" class="text-sm text-surface-500 dark:text-surface-300 mr-2">
9
- Draft changed
9
+ {{ t('crud.draftChanged') }}
10
10
  </div>
11
11
  <Message v-else-if="validationResult" severity="error" variant="simple" size="small" class="mr-2">
12
- Before saving, please correct the errors above.
12
+ {{ t('crud.validationError') }}
13
13
  </Message>
14
14
  <div v-else-if="!changed" class="">
15
- No changes to save.
15
+ {{ t('crud.noChanges') }}
16
16
  </div>
17
17
  </div>
18
18
  <div class="flex flex-row">
19
19
  <slot name="submit" v-if="!validationResult">
20
20
  <div class="ml-2">
21
- <Button v-if="exists" type="submit" :label="'Save '+model.name" :disabled="!changed" icon="pi pi-save" />
22
- <Button v-else type="submit" :label="'Create '+model.name" :disabled="!changed" icon="pi pi-sparkles" />
21
+ <Button v-if="exists" type="submit" :label="t('crud.saveModel', { model: model.name })" :disabled="!changed" icon="pi pi-save" />
22
+ <Button v-else type="submit" :label="t('crud.createModel', { model: model.name })" :disabled="!changed" icon="pi pi-sparkles" />
23
23
  </div>
24
24
  </slot>
25
25
  <slot name="reset" v-if="resetButton">
26
26
  <div>
27
- <Button type="reset" label="Reset" class="ml-2" :disabled="!changed" icon="pi pi-eraser"/>
27
+ <Button type="reset" :label="t('actions.reset')" class="ml-2" :disabled="!changed" icon="pi pi-eraser"/>
28
28
  </div>
29
29
  </slot>
30
30
  </div>
@@ -36,6 +36,8 @@
36
36
  import Message from "primevue/message"
37
37
 
38
38
  import { ref, computed, onMounted, defineProps, defineEmits, toRefs, getCurrentInstance, unref } from 'vue'
39
+ import { useI18n } from 'vue-i18n'
40
+ const { t } = useI18n()
39
41
 
40
42
  const props = defineProps({
41
43
  editor: {
@@ -20,9 +20,9 @@
20
20
  />
21
21
  </div>
22
22
  <div class="flex flex-row flex-wrap justify-between align-items-top gap-2">
23
- <Button label="Access" icon="pi pi-key" class="p-button mb-6" @click="showAccessControl" />
23
+ <Button :label="t('actions.access')" icon="pi pi-key" class="p-button mb-6" @click="showAccessControl" />
24
24
  <router-link :to="editRoute">
25
- <Button label="Edit" icon="pi pi-pencil" class="p-button mb-6" />
25
+ <Button :label="t('actions.edit')" icon="pi pi-pencil" class="p-button mb-6" />
26
26
  </router-link>
27
27
  </div>
28
28
  </div>
@@ -124,7 +124,7 @@
124
124
  <pre>preparedRelations = {{ preparedRelations }}</pre>
125
125
 
126
126
  <div v-if="backwardRelations">
127
- <h4>Backward relations</h4>
127
+ <h4>{{ t('crud.backwardRelations') }}</h4>
128
128
  <pre>{{
129
129
  backwardRelations.map(
130
130
  ({ from, relation, what }) => ({ from: from.serviceName + '_' + from.name, relation, what })
@@ -156,6 +156,8 @@
156
156
 
157
157
  import pluralize from 'pluralize'
158
158
  import { ref, computed, onMounted, defineProps, defineEmits, toRefs } from 'vue'
159
+ import { useI18n } from 'vue-i18n'
160
+ const { t } = useI18n()
159
161
  import { RangeViewer, injectComponent, InjectComponent } from "@live-change/vue3-components"
160
162
 
161
163
  import ObjectPath from './ObjectPath.vue'
package/index.js CHANGED
@@ -52,5 +52,6 @@ export { SchemaFromDefinition }
52
52
  export * from './front/src/logic/schema.js'
53
53
 
54
54
  import en from "./front/locales/en.json"
55
- const locales = { en }
55
+ import pl from "./front/locales/pl.json"
56
+ const locales = { en, pl }
56
57
  export { locales }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-auto-form",
3
- "version": "0.9.131",
3
+ "version": "0.9.133",
4
4
  "scripts": {
5
5
  "memDev": "node server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -22,16 +22,16 @@
22
22
  "type": "module",
23
23
  "dependencies": {
24
24
  "@fortawesome/fontawesome-free": "^6.7.2",
25
- "@live-change/cli": "^0.9.131",
26
- "@live-change/dao": "^0.9.131",
27
- "@live-change/dao-vue3": "^0.9.131",
28
- "@live-change/dao-websocket": "^0.9.131",
29
- "@live-change/framework": "^0.9.131",
30
- "@live-change/image-frontend": "^0.9.131",
31
- "@live-change/image-service": "^0.9.131",
32
- "@live-change/session-service": "^0.9.131",
33
- "@live-change/vue3-components": "^0.9.131",
34
- "@live-change/vue3-ssr": "^0.9.131",
25
+ "@live-change/cli": "^0.9.133",
26
+ "@live-change/dao": "^0.9.133",
27
+ "@live-change/dao-vue3": "^0.9.133",
28
+ "@live-change/dao-websocket": "^0.9.133",
29
+ "@live-change/framework": "^0.9.133",
30
+ "@live-change/image-frontend": "^0.9.133",
31
+ "@live-change/image-service": "^0.9.133",
32
+ "@live-change/session-service": "^0.9.133",
33
+ "@live-change/vue3-components": "^0.9.133",
34
+ "@live-change/vue3-ssr": "^0.9.133",
35
35
  "@vueuse/core": "^12.3.0",
36
36
  "codeceptjs-assert": "^0.0.5",
37
37
  "compression": "^1.7.5",
@@ -52,7 +52,7 @@
52
52
  "vue3-scroll-border": "0.1.7"
53
53
  },
54
54
  "devDependencies": {
55
- "@live-change/codeceptjs-helper": "^0.9.131",
55
+ "@live-change/codeceptjs-helper": "^0.9.133",
56
56
  "codeceptjs": "^3.6.10",
57
57
  "generate-password": "1.7.1",
58
58
  "playwright": "1.49.1",
@@ -63,5 +63,5 @@
63
63
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
64
64
  "license": "ISC",
65
65
  "description": "",
66
- "gitHead": "3431deb86db4b740bcf04375b274697e0669fff4"
66
+ "gitHead": "455a7c9d204a89196f6599c42acd8eaeb45532e1"
67
67
  }