@awes-io/ui 2.61.0 → 2.62.0

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 (36) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/components/1_atoms/AwDropdown.vue +1 -1
  3. package/components/2_molecules/AwButton.vue +1 -1
  4. package/components/2_molecules/AwIsland/AwIsland.vue +2 -2
  5. package/components/2_molecules/AwIsland/AwIslandBuilder.vue +6 -2
  6. package/components/2_molecules/AwSelect.vue +2 -2
  7. package/components/2_molecules/AwSelectObject.vue +2 -2
  8. package/components/3_organisms/AwAddressBlock.vue +21 -21
  9. package/components/3_organisms/AwBirthdayPicker.vue +3 -2
  10. package/components/3_organisms/AwBottomBar.vue +3 -3
  11. package/components/3_organisms/AwCodeSnippet.vue +1 -1
  12. package/components/3_organisms/AwCropper.vue +2 -2
  13. package/components/3_organisms/AwDisplayDate.vue +1 -3
  14. package/components/3_organisms/AwDownloadLink.vue +2 -2
  15. package/components/3_organisms/AwFetchData.vue +6 -2
  16. package/components/3_organisms/AwIslandAvatar.vue +4 -4
  17. package/components/3_organisms/AwMarkdownEditor.vue +3 -2
  18. package/components/3_organisms/AwModal.vue +2 -2
  19. package/components/3_organisms/AwModelEdit.vue +12 -6
  20. package/components/3_organisms/AwMultiBlockBuilder.vue +4 -4
  21. package/components/3_organisms/AwPagination.vue +3 -3
  22. package/components/3_organisms/AwSearch.vue +1 -12
  23. package/components/3_organisms/AwTable/AwTableBuilder.vue +3 -3
  24. package/components/3_organisms/AwUploader.vue +12 -4
  25. package/components/3_organisms/AwUploaderFiles.vue +2 -6
  26. package/components/4_pages/AwPage.vue +5 -4
  27. package/components/4_pages/AwPageModal.vue +2 -2
  28. package/components/5_layouts/AwLayoutCenter.vue +3 -1
  29. package/components/5_layouts/AwLayoutError.vue +2 -2
  30. package/components/5_layouts/_AwLayoutLogo.vue +1 -1
  31. package/components/5_layouts/_AwMobileMenu.vue +8 -8
  32. package/components/5_layouts/_AwOfflineNotify.vue +2 -2
  33. package/components/5_layouts/_AwUserMenu.vue +3 -3
  34. package/nuxt/layouts/center.vue +1 -1
  35. package/nuxt/templates/lang.plugin.js +1 -0
  36. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,34 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.62.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.61.1...@awes-io/ui@2.62.0) (2023-01-11)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * translations keys updated ([57e8dcc](https://github.com/awes-io/client/commit/57e8dcc44208fb567bc6196b2dac131095030e8e))
12
+
13
+
14
+ ### Features
15
+
16
+ * translation keys replaced with values ([90e58da](https://github.com/awes-io/client/commit/90e58dabb389c9c47a33115965f8724845f3ad75))
17
+ * translation keys replaced with values ([f4bcf3a](https://github.com/awes-io/client/commit/f4bcf3aa43231b8a12b39a68cef94059205162d4))
18
+
19
+
20
+
21
+
22
+
23
+ ## [2.61.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.61.0...@awes-io/ui@2.61.1) (2023-01-11)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **aw-bottom-bar:** action button listeners application fixed ([bfa4057](https://github.com/awes-io/client/commit/bfa4057da6f7c9a5c3393b0a2483ba2bd6c5f97b))
29
+
30
+
31
+
32
+
33
+
6
34
  # [2.61.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.60.0...@awes-io/ui@2.61.0) (2022-12-29)
7
35
 
8
36
 
@@ -55,7 +55,7 @@
55
55
  <slot v-if="isMobile" name="close">
56
56
  <AwButton
57
57
  theme="ghost"
58
- :text="$t('aw.dropdown.close')"
58
+ :text="$t('Close')"
59
59
  color="surface"
60
60
  size="lg"
61
61
  class="aw-dropdown__close"
@@ -168,7 +168,7 @@ export default {
168
168
  // loadingText() {
169
169
  // return (
170
170
  // (isType('String', this.loading) && this.loading) ||
171
- // this.$t('aw.button.loading')
171
+ // this.$t('Loading...')
172
172
  // )
173
173
  // },
174
174
 
@@ -276,14 +276,14 @@ export default {
276
276
  .then(() => {
277
277
  this.$notify({
278
278
  type: 'success',
279
- title: this.$t('ui.general.notify.updated')
279
+ title: this.$t('Saved')
280
280
  })
281
281
  this.isOpened = false
282
282
  })
283
283
  .catch(() => {
284
284
  this.$notify({
285
285
  type: 'error',
286
- title: this.$t('ui.general.notify.error')
286
+ title: this.$t('Error')
287
287
  })
288
288
  })
289
289
  }
@@ -16,7 +16,9 @@ export default {
16
16
  confirmText: {
17
17
  type: String,
18
18
  default() {
19
- return this.$t('aw.island_builder.cancel_all_changes')
19
+ return this.$t(
20
+ 'There is unsaved data on this page. Do you want to discard unsaved data and leave the page?'
21
+ )
20
22
  }
21
23
  }
22
24
  },
@@ -43,7 +45,9 @@ export default {
43
45
 
44
46
  created() {
45
47
  window.addEventListener('beforeunload', this._beforeWindowClose)
46
- this._unregisterRouteHook = this.$router.beforeEach(this._beforeRouteLeave)
48
+ this._unregisterRouteHook = this.$router.beforeEach(
49
+ this._beforeRouteLeave
50
+ )
47
51
 
48
52
  this.$once('hook:destroyed', () => {
49
53
  window.removeEventListener('beforeunload', this._beforeWindowClose)
@@ -235,7 +235,7 @@
235
235
  data-arrow-focus
236
236
  >
237
237
  <slot name="not-found" :searchPhrase="searchPhrase">
238
- {{ $t('aw.select.not_found') }}
238
+ {{ $t('Nothing found') }}
239
239
  </slot>
240
240
  </AwDropdownButton>
241
241
  </slot>
@@ -344,7 +344,7 @@ export default {
344
344
  createConfirmText: {
345
345
  type: String,
346
346
  default() {
347
- return this.$t('aw.select.new_one')
347
+ return this.$t('Are you sure, you want to create a new item?')
348
348
  }
349
349
  },
350
350
 
@@ -213,7 +213,7 @@
213
213
  <!-- not found -->
214
214
  <div v-if="_showNotFound" class="aw-select__notify">
215
215
  <slot name="not-found" :searchPhrase="searchPhrase">
216
- {{ $t('aw.select.empty') }}
216
+ {{ $t('Nothing found') }}
217
217
  </slot>
218
218
  </div>
219
219
 
@@ -223,7 +223,7 @@
223
223
  class="aw-select__notify aw-select__notify--loading"
224
224
  >
225
225
  <slot name="loading">
226
- {{ $t('aw.select.loading') }}
226
+ {{ $t('Loading...') }}
227
227
  </slot>
228
228
  </div>
229
229
 
@@ -4,7 +4,7 @@
4
4
  <AwAddress
5
5
  ref="address"
6
6
  :gm-language="$i18n.locale || 'en'"
7
- :label="$t('aw.address_block.address')"
7
+ :label="$t('Search for an address')"
8
8
  :error="addressError"
9
9
  :gm-key="gmKey"
10
10
  :timezone="timezone"
@@ -24,62 +24,62 @@
24
24
  </div>
25
25
 
26
26
  <AwGrid :col="{ md: 2 }">
27
- <AwInfo :label="$t('aw.address_block.street')">
27
+ <AwInfo :label="$t('Street')">
28
28
  <span v-if="model.address.address_1">
29
29
  {{ model.address.address_1 }}
30
30
  </span>
31
31
  <AwLink
32
32
  v-else
33
- :text="$t('aw.address_block.add')"
33
+ :text="$t('+ Add')"
34
34
  @click="openModal('address_1')"
35
35
  />
36
36
  </AwInfo>
37
37
 
38
- <AwInfo :label="$t('aw.address_block.apt')">
38
+ <AwInfo :label="$t('Apt, suite, etc (optional)')">
39
39
  <span v-if="model.address.apt">
40
40
  {{ model.address.apt }}
41
41
  </span>
42
42
  <AwLink
43
43
  v-else
44
- :text="$t('aw.address_block.add')"
44
+ :text="$t('+ Add')"
45
45
  @click="openModal('apt')"
46
46
  />
47
47
  </AwInfo>
48
48
 
49
- <AwInfo :label="$t('aw.address_block.city')">
49
+ <AwInfo :label="$t('City')">
50
50
  <span v-if="model.address.city">
51
51
  {{ model.address.city }}
52
52
  </span>
53
53
  <AwLink
54
54
  v-else
55
- :text="$t('aw.address_block.add')"
55
+ :text="$t('+ Add')"
56
56
  @click="openModal('city')"
57
57
  />
58
58
  </AwInfo>
59
59
 
60
- <AwInfo :label="$t('aw.address_block.region')">
60
+ <AwInfo :label="$t('Region / State')">
61
61
  <span v-if="model.address.region">
62
62
  {{ model.address.region }}
63
63
  </span>
64
64
  <AwLink
65
65
  v-else
66
- :text="$t('aw.address_block.add')"
66
+ :text="$t('+ Add')"
67
67
  @click="openModal('region')"
68
68
  />
69
69
  </AwInfo>
70
70
 
71
- <AwInfo :label="$t('aw.address_block.postal_code')">
71
+ <AwInfo :label="$t('ZIP code')">
72
72
  <span v-if="model.address.postal_code">
73
73
  {{ model.address.postal_code }}
74
74
  </span>
75
75
  <AwLink
76
76
  v-else
77
- :text="$t('aw.address_block.add')"
77
+ :text="$t('+ Add')"
78
78
  @click="openModal('postal_code')"
79
79
  />
80
80
  </AwInfo>
81
81
 
82
- <AwInfo :label="$t('aw.address_block.country')">
82
+ <AwInfo :label="$t('Country')">
83
83
  <span>
84
84
  {{ model.address.meta.google_country_name }}
85
85
  </span>
@@ -118,7 +118,7 @@
118
118
  :key="_uid"
119
119
  :param="false"
120
120
  :name="modalName"
121
- :title="$t('aw.address_block.modal.title')"
121
+ :title="$t('Change address')"
122
122
  @opened="onModalOpen"
123
123
  @closed="onModalClose"
124
124
  >
@@ -126,42 +126,42 @@
126
126
  <AwInput
127
127
  ref="address_1"
128
128
  v-model="address.address_1"
129
- :label="$t('aw.address_block.street')"
129
+ :label="$t('Street')"
130
130
  :error="model.errors['address.address_1']"
131
131
  />
132
132
 
133
133
  <AwInput
134
134
  ref="apt"
135
135
  v-model="address.apt"
136
- :label="$t('aw.address_block.apt')"
136
+ :label="$t('Apt, suite, etc (optional)')"
137
137
  :error="model.errors['address.apt']"
138
138
  />
139
139
 
140
140
  <AwInput
141
141
  ref="city"
142
142
  v-model="address.city"
143
- :label="$t('aw.address_block.city')"
143
+ :label="$t('City')"
144
144
  :error="model.errors['address.city']"
145
145
  />
146
146
 
147
147
  <AwInput
148
148
  ref="region"
149
149
  v-model="address.region"
150
- :label="$t('aw.address_block.region')"
150
+ :label="$t('Region / State')"
151
151
  :error="model.errors['address.region']"
152
152
  />
153
153
 
154
154
  <AwInput
155
155
  ref="postal_code"
156
156
  v-model="address.postal_code"
157
- :label="$t('aw.address_block.postal_code')"
157
+ :label="$t('ZIP code')"
158
158
  :error="model.errors['address.postal_code']"
159
159
  />
160
160
 
161
161
  <AwInput
162
162
  ref="country"
163
163
  :value="model.address.meta.google_country_name"
164
- :label="$t('aw.address_block.country')"
164
+ :label="$t('Country')"
165
165
  :error="model.errors['address.meta.google_country_name']"
166
166
  disabled
167
167
  />
@@ -170,7 +170,7 @@
170
170
  <template #buttons>
171
171
  <div class="flex items-center border-t w-full p-4">
172
172
  <AwButton
173
- :text="$t('aw.address_block.modal.save')"
173
+ :text="$t('Save')"
174
174
  style="margin-right: 1rem"
175
175
  @click="saveAddress"
176
176
  />
@@ -181,7 +181,7 @@
181
181
  @click="resetAddress"
182
182
  >
183
183
  <span class="text-dark-blue">
184
- {{ $t('aw.address_block.modal.cancel') }}
184
+ {{ $t('Cancel') }}
185
185
  </span>
186
186
  </AwButton>
187
187
  </div>
@@ -27,6 +27,7 @@ import birthdayMixin from '@AwMixins/birthday'
27
27
  import errorMixin from '@AwMixins/error'
28
28
  import { AwBirthdayPicker as _config } from '@AwConfig'
29
29
  import { conf } from '@AwUtils/component'
30
+ import { ucFirst } from '@AwUtils/string'
30
31
 
31
32
  const KEY_ATTR = 'data-key'
32
33
 
@@ -98,7 +99,7 @@ export default {
98
99
  label: {
99
100
  type: String,
100
101
  default() {
101
- return this.$t('aw.birthday_picker.birthday')
102
+ return this.$t('Birthday')
102
103
  }
103
104
  },
104
105
 
@@ -166,7 +167,7 @@ export default {
166
167
  key,
167
168
  [KEY_ATTR]: key,
168
169
  name: this._inputNames[i].name,
169
- placeholder: this.$t('aw.birthday_picker.' + key),
170
+ placeholder: this.$t(ucFirst(key)),
170
171
  pattern: MASK_MAP[key],
171
172
  maxlength: PLACEHOLDER_MAP[key].length,
172
173
  inputmode: 'numeric'
@@ -12,7 +12,7 @@
12
12
 
13
13
  <slot name="bottom-bar-toggler">
14
14
  <AwMenuItemIcon
15
- :text="$t('aw.bottom_bar.menu')"
15
+ :text="$t('Menu')"
16
16
  icon="menu-dots"
17
17
  :size="$options.ICON_SIZE"
18
18
  @click="$store.commit('awesIo/TOGGLE_MOBILE_MENU')"
@@ -72,12 +72,12 @@ export default {
72
72
 
73
73
  let result = { ...button, hideText: true }
74
74
 
75
- if (!button.href || (button.listeners && !button.listeners.click)) {
75
+ if (!button.href && !button.listeners?.click) {
76
76
  result = {
77
77
  ...button,
78
78
  listeners: {
79
79
  ...button.listeners,
80
- click: this.$root.$emit(
80
+ click: () => this.$root.$emit(
81
81
  'awes-io::bottom-bar-action:click'
82
82
  )
83
83
  }
@@ -52,7 +52,7 @@ export default {
52
52
  click: () => copyFn(props.code)
53
53
  }
54
54
  },
55
- [parent.$t('aw.code_snippet.copy')]
55
+ [parent.$t('Copy')]
56
56
  ),
57
57
  h(
58
58
  'pre',
@@ -12,7 +12,7 @@
12
12
  class="aw-cropper__rotate"
13
13
  content-class="px-2"
14
14
  theme="icon"
15
- :text="$t('aw.cropper.rotate')"
15
+ :text="$t('Rotate 90°')"
16
16
  color="default"
17
17
  @click="rotate"
18
18
  >
@@ -32,7 +32,7 @@
32
32
 
33
33
  <slot name="buttons" :rotate="rotate" :save="save">
34
34
  <!-- save -->
35
- <AwButton :text="$t('aw.cropper.save')" @click="save" />
35
+ <AwButton :text="$t('Save Image')" @click="save" />
36
36
  </slot>
37
37
  </div>
38
38
  </template>
@@ -59,9 +59,7 @@ export default {
59
59
  age = now.diff(date, 'year')
60
60
  }
61
61
 
62
- return age
63
- ? `${str} (${age} ${this.$t('aw.birthday_date.years')})`
64
- : str
62
+ return age ? `${str} (${age} ${this.$t('years')})` : str
65
63
  }
66
64
  }
67
65
  }
@@ -109,7 +109,7 @@ export default {
109
109
  type: String,
110
110
  /* Translatable word "Download" */
111
111
  default() {
112
- return this.$t('aw.download_link.download')
112
+ return this.$t('Download')
113
113
  }
114
114
  },
115
115
  /**
@@ -119,7 +119,7 @@ export default {
119
119
  type: String,
120
120
  /* Translatable word "Download" */
121
121
  default() {
122
- return this.$t('aw.download_link.download')
122
+ return this.$t('Download')
123
123
  }
124
124
  },
125
125
  /**
@@ -18,7 +18,7 @@
18
18
  slot="left"
19
19
  class="h-5 w-5"
20
20
  />
21
- {{ $t('aw.table_builder.loading') }}
21
+ {{ $t('Loading...') }}
22
22
  </AwChip>
23
23
  </slot>
24
24
  </div>
@@ -119,7 +119,11 @@ export default {
119
119
  })
120
120
  this.data = resp.data.data
121
121
  } catch (e) {
122
- this.error = pathOr('Request error', 'response.data.message', e)
122
+ this.error = pathOr(
123
+ this.$t('Request error'),
124
+ 'response.data.message',
125
+ e
126
+ )
123
127
  } finally {
124
128
  clearTimeout(timeout)
125
129
  this.loading = false
@@ -58,7 +58,7 @@
58
58
 
59
59
  <AwDropdownButton
60
60
  v-if="zoomable && src"
61
- :text="$t('aw.page_user.zoom')"
61
+ :text="$t('Zoom')"
62
62
  @click="openZoomModal"
63
63
  />
64
64
  <label
@@ -66,7 +66,7 @@
66
66
  class="aw-dropdown-button aw-dropdown-button_default"
67
67
  >
68
68
  <span tabindex="-1">
69
- {{ $t('aw.page_user.upload') }}
69
+ {{ $t('Change Image') }}
70
70
  </span>
71
71
  <input
72
72
  class="sr-only"
@@ -77,7 +77,7 @@
77
77
  </label>
78
78
  <AwDropdownButton
79
79
  v-if="editable && src"
80
- :text="$t('aw.page_user.remove')"
80
+ :text="$t('Remove Image')"
81
81
  color="error"
82
82
  @click="removeAvatar"
83
83
  />
@@ -144,7 +144,7 @@
144
144
  v-if="editable"
145
145
  ref="cropModal"
146
146
  :param="null"
147
- :title="$t('aw.page_user.modal_title')"
147
+ :title="$t('Upload avatar')"
148
148
  theme="fullscreen"
149
149
  >
150
150
  <AwCropper :src="uploadedAvatar" @save="saveAvatar" />
@@ -52,6 +52,7 @@ import autosize from 'autosize'
52
52
  import marked from 'marked'
53
53
  import Prism from 'prismjs'
54
54
  import insane from 'insane'
55
+ import { ucFirst } from '@AwUtils/string'
55
56
 
56
57
  const MODES = ['editor', 'preview']
57
58
 
@@ -129,7 +130,7 @@ export default {
129
130
 
130
131
  computed: {
131
132
  switchers() {
132
- return MODES.map((mode) => this.$t(`AwMarkdownEditor.${mode}`))
133
+ return MODES.map((mode) => this.$t(ucFirst(mode)))
133
134
  },
134
135
 
135
136
  isPreview() {
@@ -144,7 +145,7 @@ export default {
144
145
  return toPairs(SHORTCUTS).map(([name, { icon }]) => ({
145
146
  name,
146
147
  icon,
147
- text: this.$t(`AwMarkdownEditor.${name}`)
148
+ text: this.$t(ucFirst(name))
148
149
  }))
149
150
  }
150
151
  },
@@ -29,8 +29,8 @@
29
29
 
30
30
  <AwButton
31
31
  :class="elClasses.close"
32
- :title="$t('aw.modal.close')"
33
- :aria-label="$t('aw.modal.close')"
32
+ :title="$t('Close')"
33
+ :aria-label="$t('Close')"
34
34
  @click.prevent="close()"
35
35
  theme="ghost"
36
36
  color="default"
@@ -73,7 +73,7 @@ export default {
73
73
  saveText: {
74
74
  type: String,
75
75
  default() {
76
- return this.$t('aw.model_edit.save')
76
+ return this.$t('Save')
77
77
  }
78
78
  },
79
79
 
@@ -82,7 +82,7 @@ export default {
82
82
  cancelText: {
83
83
  type: String,
84
84
  default() {
85
- return this.$t('aw.model_edit.cancel')
85
+ return this.$t('Cancel')
86
86
  }
87
87
  },
88
88
 
@@ -179,7 +179,7 @@ export default {
179
179
 
180
180
  this.notify(
181
181
  'success',
182
- this.notifyText || this.$t('aw.model_edit.success')
182
+ this.notifyText || this.$t('Saved successfully')
183
183
  )
184
184
 
185
185
  if (this.isRedirect) {
@@ -189,7 +189,7 @@ export default {
189
189
  console.log(e)
190
190
 
191
191
  const msg = pathOr(
192
- this.$t('aw.model_edit.error'),
192
+ this.$t('Something went wrong'),
193
193
  this.saveErrorPath,
194
194
  e
195
195
  )
@@ -245,7 +245,11 @@ export default {
245
245
 
246
246
  ask() {
247
247
  if (this.model.changed()) {
248
- return this.$confirm(this.$t('aw.model_edit.cancel_all_changes'))
248
+ return this.$confirm(
249
+ this.$t(
250
+ 'There is unsaved data on this page. Do you want to discard unsaved data and leave the page?'
251
+ )
252
+ )
249
253
  } else {
250
254
  return Promise.resolve()
251
255
  }
@@ -287,7 +291,9 @@ export default {
287
291
  _onPageLeave($event) {
288
292
  $event.preventDefault()
289
293
 
290
- $event.returnValue = this.$t('aw.model_edit.cancel_all_changes')
294
+ $event.returnValue = this.$t(
295
+ 'There is unsaved data on this page. Do you want to discard unsaved data and leave the page?'
296
+ )
291
297
  }
292
298
  }
293
299
  }
@@ -21,7 +21,7 @@
21
21
  <h5 class="flex items-center draggable">
22
22
  <span>
23
23
  {{
24
- $t('aw.multi_block_builder.title', {
24
+ $t('{title} #{iteration}', {
25
25
  title,
26
26
  iteration: index + 1
27
27
  })
@@ -31,7 +31,7 @@
31
31
  icon="close"
32
32
  theme="icon"
33
33
  :text="
34
- $t('aw.multi_block_builder.remove', {
34
+ $t('Remove {title}', {
35
35
  title,
36
36
  iteration: index + 1
37
37
  })
@@ -55,7 +55,7 @@
55
55
  <slot name="add" v-bind="{ collection, title, add }">
56
56
  <!-- `<button>+ Add {title}</button>` -->
57
57
  <AwLink class="text-sm font-bold uppercase" @click="add">
58
- {{ $t('aw.multi_block_builder.add', { title }) }}
58
+ {{ $t('+ Add {title}', { title }) }}
59
59
  </AwLink>
60
60
  </slot>
61
61
  </div>
@@ -65,7 +65,7 @@
65
65
  <!-- `<button>Save</button>` -->
66
66
  <div class="mt-8">
67
67
  <AwButton :disabled="buttonDisabled" @click="collection.save()">
68
- {{ $t('aw.multi_block_builder.save') }}
68
+ {{ $t('Save') }}
69
69
  </AwButton>
70
70
  </div>
71
71
  </slot>
@@ -2,7 +2,7 @@
2
2
  <div v-if="pagesTotal > 1" class="flex items-center lg:px-6">
3
3
  <!-- info text -->
4
4
  <span class="flex-1 text-sm opacity-50 hidden lg:block">{{
5
- $t('aw.pagination.info', {
5
+ $t('Show {from}-{to} of {total}', {
6
6
  ...itemsRange,
7
7
  total
8
8
  })
@@ -33,7 +33,7 @@
33
33
  </AwButton>
34
34
 
35
35
  <span class="lg:hidden">
36
- {{ $t('aw.pagination.page', { page, pagesTotal }) }}
36
+ {{ $t('Page {page} of {pagesTotal}', { page, pagesTotal }) }}
37
37
  </span>
38
38
  <div
39
39
  class="hidden lg:inline-flex aw-button-nav aw-button-nav__wrapper"
@@ -109,7 +109,7 @@
109
109
  </AwDropdown>
110
110
  </template>
111
111
  <span v-else class="text-sm opacity-50">
112
- {{ $t('aw.pagination.limit', { limit }) }}
112
+ {{ $t('{limit} per page', { limit }) }}
113
113
  </span>
114
114
  </div>
115
115
  </div>
@@ -6,7 +6,7 @@
6
6
  v-model="text"
7
7
  autocomplete="off"
8
8
  class="aw-search"
9
- :placeholder="placeholder"
9
+ :placeholder="$t('Search', { globalKeyBind })"
10
10
  v-on="$listeners"
11
11
  @keydown.enter.prevent="_setSearchImmediate"
12
12
  >
@@ -83,17 +83,6 @@ export default {
83
83
  }
84
84
  },
85
85
 
86
- computed: {
87
- placeholder() {
88
- const basicPlaceholder = this.$t('aw.search.text')
89
-
90
- return this.globalKeyBind
91
- ? basicPlaceholder +
92
- this.$t('aw.search.key_bind', { key: this.globalKeyBind })
93
- : basicPlaceholder
94
- }
95
- },
96
-
97
86
  watch: {
98
87
  text: function(newValue) {
99
88
  const currentValue = this.$route.query[this.param] || ''
@@ -22,7 +22,7 @@
22
22
  <slot name="empty-title">
23
23
  <!-- Text: "There are no data to show" -->
24
24
  <div class="text-mono-400 mb-4">
25
- {{ $t('aw.table_builder.empty') }}
25
+ {{ $t('There is no data to show') }}
26
26
  </div>
27
27
  </slot>
28
28
 
@@ -55,7 +55,7 @@
55
55
  <slot name="empty-filter-title">
56
56
  <!-- Text: "There are no data to show" -->
57
57
  <div class="text-mono-400 mb-4">
58
- {{ $t('aw.table_builder.empty_filter') }}
58
+ {{ $t('No results were found for your request') }}
59
59
  </div>
60
60
  </slot>
61
61
 
@@ -171,7 +171,7 @@
171
171
  slot="left"
172
172
  class="h-5 w-5"
173
173
  />
174
- {{ $t('aw.table_builder.loading') }}
174
+ {{ $t('Loading...') }}
175
175
  </AwChip>
176
176
  </slot>
177
177
  </div>
@@ -26,9 +26,15 @@
26
26
  />
27
27
  </svg>
28
28
  <span class="block ml-4">
29
- <span class="sm:text-lg">{{ $t('aw.uploader.drop') }}</span>
29
+ <span class="sm:text-lg">{{
30
+ $t('Drag and drop files here')
31
+ }}</span>
30
32
  <span v-if="formatString" class="block text-sm text-mono-400">
31
- {{ $t('aw.uploader.format', { formatString }) }}
33
+ {{
34
+ $t('Supports only {formatString} file formats', {
35
+ formatString
36
+ })
37
+ }}
32
38
  </span>
33
39
  </span>
34
40
  </slot>
@@ -279,11 +285,13 @@ export default {
279
285
  const fileName = file.name
280
286
 
281
287
  if (this._format.length && !this._extensionMatch(file)) {
282
- errors.push(this.$t('aw.uploader.error_extension', { fileName }))
288
+ errors.push(
289
+ this.$t('File {fileName} has wrong extension', { fileName })
290
+ )
283
291
  }
284
292
 
285
293
  if (this.max && file.size > this.maxSizeBytes) {
286
- errors.push(this.$t('aw.uploader.error_size', { fileName }))
294
+ errors.push(this.$t('File {fileName} is too big', { fileName }))
287
295
  }
288
296
 
289
297
  return errors
@@ -18,11 +18,7 @@
18
18
  vertical-align="middle"
19
19
  >
20
20
  <template #default="{ cell: file }">
21
- {{
22
- file.loaded
23
- ? parent.$t('aw.uploader.loaded')
24
- : `${file.progress}%`
25
- }}
21
+ {{ file.loaded ? parent.$t('Finished') : `${file.progress}%` }}
26
22
  </template>
27
23
  </AwTableCol>
28
24
  <AwTableCol vertical-align="middle" class="text-center w-1/6">
@@ -31,7 +27,7 @@
31
27
  theme="icon"
32
28
  icon="close"
33
29
  size="sm"
34
- :text="parent.$t('aw.uploader.remove')"
30
+ :text="parent.$t('Remove file')"
35
31
  @click="props.removeFile(file.id)"
36
32
  />
37
33
  </template>
@@ -69,7 +69,9 @@
69
69
  >
70
70
  <div
71
71
  class="flex-1 text-sm text-mono-400"
72
- v-html="$sanitize($t('aw.layout_default.footer'))"
72
+ v-html="
73
+ $sanitize($t('© 2021 - EasyWeek. All rights reserved.'))
74
+ "
73
75
  ></div>
74
76
  <div class="flex-1 text-center">
75
77
  <AwButton
@@ -79,14 +81,14 @@
79
81
  @click="toggleFullscreen(false)"
80
82
  >
81
83
  <AwIconSystemMono name="close" class="mr-4" />
82
- {{ $t('aw.page.exit_fullscreen') }}
84
+ {{ $t('Exit fullscreen mode') }}
83
85
  </AwButton>
84
86
  </div>
85
87
  <div class="flex-1 flex">
86
88
  <AwSwitcher
87
89
  v-if="hasDarkThemeSwitcher"
88
90
  :checked="isDarkTheme"
89
- :label="$t('aw.user_menu.dark_theme')"
91
+ :label="$t('Dark theme')"
90
92
  class="ml-auto"
91
93
  @change="isDarkTheme = $event"
92
94
  />
@@ -205,7 +207,6 @@ export default {
205
207
  computed: {
206
208
  _title() {
207
209
  return this.title
208
- // this.$t(pathOr('', 'current.text', this.currentPage))
209
210
  },
210
211
 
211
212
  _hasBreadcrumb() {
@@ -51,8 +51,8 @@
51
51
 
52
52
  <div class="flex-1 flex justify-end">
53
53
  <button
54
- :title="$t('aw.modal.close')"
55
- :aria-label="$t('aw.modal.close')"
54
+ :title="$t('Close')"
55
+ :aria-label="$t('Close')"
56
56
  class="aw-page-modal__header-btn focus-outline ml-4"
57
57
  tabindex="0"
58
58
  @click="close"
@@ -20,7 +20,9 @@
20
20
  </div>
21
21
 
22
22
  <div
23
- v-html="$sanitize($t('aw.layout_default.footer'))"
23
+ v-html="
24
+ $sanitize($t('© 2021 - EasyWeek. All rights reserved.'))
25
+ "
24
26
  class="pt-8 text-sm"
25
27
  ></div>
26
28
  </div>
@@ -2,7 +2,7 @@
2
2
  <div class="flex flex-col bg-mono-900 flex-grow min-h-screen">
3
3
  <div class="flex flex-col justify-center items-center m-auto">
4
4
  <h1 class="text-center text-3xl">
5
- {{ $t('aw.layout_error.subtitle') }}
5
+ {{ $t('Error') }}
6
6
  </h1>
7
7
  <p class="text-center text-6xl">{{ statusCode }}</p>
8
8
  <p class="text-center">
@@ -45,7 +45,7 @@ export default {
45
45
  },
46
46
 
47
47
  message() {
48
- return this.error.message || this.$t('aw.layout_error.message')
48
+ return this.error.message || this.$t('Something is wrong.')
49
49
  },
50
50
 
51
51
  isLoggedIn() {
@@ -6,7 +6,7 @@
6
6
  >
7
7
  <img v-if="props.logo" v-bind="props.logo" />
8
8
  <span class="sr-only">
9
- {{ parent.$t('aw.layout_default.homepage') }}
9
+ {{ parent.$t('Homepage') }}
10
10
  </span>
11
11
  </NLink>
12
12
  </template>
@@ -23,7 +23,7 @@
23
23
  <AwIconSystemMono name="arrow" size="16" />
24
24
  </template>
25
25
  <span class="sr-only">
26
- {{ $t('aw.mobile_menu.back') }}
26
+ {{ $t('Back') }}
27
27
  </span>
28
28
  </AwButton>
29
29
 
@@ -40,7 +40,7 @@
40
40
  <AwSwitcher
41
41
  v-else
42
42
  v-model="isDarkTheme"
43
- :label="$t('aw.mobile_menu.dark_theme')"
43
+ :label="$t('Dark theme')"
44
44
  icon="moon"
45
45
  icon-place-in
46
46
  icon-color="warning"
@@ -60,7 +60,7 @@
60
60
  <AwIconSystemMono name="close" size="16" />
61
61
  </template>
62
62
  <span class="sr-only">
63
- {{ $t('aw.mobile_menu.close') }}
63
+ {{ $t('Close') }}
64
64
  </span>
65
65
  </AwButton>
66
66
  </div>
@@ -78,7 +78,7 @@
78
78
  <NLink
79
79
  v-if="profileUrl"
80
80
  :to="profileUrl"
81
- :aria-label="$t('aw.mobile_menu.profile')"
81
+ :aria-label="$t('User profile')"
82
82
  class="aw-mobile-menu__user-link"
83
83
  >
84
84
  <AwIconSystemMono name="angle" rotate="180" />
@@ -96,7 +96,7 @@
96
96
  <!-- top level menu -->
97
97
  <AwMobileMenuNav
98
98
  v-show="!submenuOpened"
99
- :title="$t('aw.mobile_menu.main_menu')"
99
+ :title="$t('Main menu')"
100
100
  :items="mainMenu"
101
101
  class="aw-mobile-menu__menu"
102
102
  @click:submenu="showSubmenu"
@@ -104,7 +104,7 @@
104
104
 
105
105
  <AwMobileMenuNav
106
106
  v-show="!submenuOpened"
107
- :title="$t('aw.mobile_menu.secondary_menu')"
107
+ :title="$t('Secondary menu')"
108
108
  :items="secondaryMenu"
109
109
  class="aw-mobile-menu__menu"
110
110
  @click:submenu="showSubmenu"
@@ -112,7 +112,7 @@
112
112
 
113
113
  <AwMobileMenuNav
114
114
  v-show="!submenuOpened"
115
- :title="$t('aw.mobile_menu.user_menu')"
115
+ :title="$t('User menu')"
116
116
  :items="userMenu"
117
117
  class="aw-mobile-menu__menu"
118
118
  @click:submenu="showSubmenu"
@@ -146,7 +146,7 @@
146
146
  class="aw-mobile-menu__logo"
147
147
  />
148
148
  <span class="aw-mobile-menu__version">
149
- {{ $t('aw.mobile_menu.version', { version: $config.VERSION }) }}
149
+ {{ $t('version v{version}', { version: $config.VERSION }) }}
150
150
  </span>
151
151
  </slot>
152
152
  </div>
@@ -22,8 +22,8 @@ export default {
22
22
  offlineNotifyRemover = this.$notify({
23
23
  timeout: 0,
24
24
  type: 'error',
25
- title: this.$t('aw.layout_default.offline'),
26
- text: this.$t('aw.layout_default.offline_text'),
25
+ title: this.$t('No Internet Connection'),
26
+ text: this.$t('Check your connection and try again...'),
27
27
  icon: false,
28
28
  closable: false
29
29
  })
@@ -11,7 +11,7 @@
11
11
  <button
12
12
  class="aw-user-menu__user focus-outline"
13
13
  aria-haspopup="true"
14
- :aria-label="$t('aw.user_menu.open_menu')"
14
+ :aria-label="$t('Open menu')"
15
15
  @focus="openDropdown"
16
16
  @mouseenter="openDropdown"
17
17
  >
@@ -37,7 +37,7 @@
37
37
  </Component>
38
38
  <AwSwitcher
39
39
  v-model="isDarkTheme"
40
- :label="$t('aw.user_menu.dark_theme')"
40
+ :label="$t('Dark theme')"
41
41
  icon="moon"
42
42
  icon-place-in
43
43
  icon-color="warning"
@@ -77,7 +77,7 @@
77
77
  class="aw-user-menu__nav-item"
78
78
  @click="$auth.logout()"
79
79
  >
80
- {{ $t('aw.user_menu.logout') }}
80
+ {{ $t('Logout') }}
81
81
  </AwNavItem> -->
82
82
  </AwDropdown>
83
83
  </slot>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <AwLayoutCenter :copyright="$t('ui.copyright')">
2
+ <AwLayoutCenter>
3
3
  <Nuxt />
4
4
  </AwLayoutCenter>
5
5
  </template>
@@ -41,6 +41,7 @@ const toLocale = (lang = '') => lang.slice(0, 2).toLowerCase()
41
41
 
42
42
  const i18nOptions = mergeDeepRight(
43
43
  {
44
+ formatFallbackMessages: true,
44
45
  pluralizationRules: {
45
46
  ru: cyrillicPluralization,
46
47
  uk: cyrillicPluralization
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.61.0",
3
+ "version": "2.62.0",
4
4
  "description": "User Interface (UI) components",
5
5
  "keywords": [
6
6
  "ui",
@@ -122,5 +122,5 @@
122
122
  "vue-template-compiler": "^2.6.10",
123
123
  "webfonts-generator": "^0.4.0"
124
124
  },
125
- "gitHead": "a07e89bcae97c12b659db4111d75d524b545b8b0"
125
+ "gitHead": "45f0bbd83f1ecca9035c58a7af11124f717d47a3"
126
126
  }