@mythpe/quasar-ui-qui 0.1.8 → 0.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -24,7 +24,7 @@ export const useMyth = () => {
24
24
  const $route = useRoute()
25
25
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
26
26
  // @ts-ignore
27
- const __ = (key: any, ...rest: unknown[]) => !key ? '' : te(`attributes.${key}`) ? t(`attributes.${key}`, ...rest) : te(key) ? t(key, ...rest) : key
27
+ const __ = (key: any, ...rest: unknown[]) => !key ? key : te(`attributes.${key}`) ? t(`attributes.${key}`, ...rest) : te(key) ? t(key, ...rest) : key
28
28
  const getPageTitle = (route?: RouteLocationNormalizedLoaded | number | string, number?: number | string): string => {
29
29
  if (typeof route !== 'object') {
30
30
  number = route
@@ -56,6 +56,8 @@ export const useMyth = () => {
56
56
  const pluralize = Str.pascalCase(lodash.pluralize(lastRouteName))
57
57
  const singular = Str.pascalCase(lodash.singularize(lastRouteName))
58
58
  const keys = lodash.filter(lodash.uniq([
59
+ `routes.${routeName}`,
60
+ `routes.${routePath}`,
59
61
  `${lastRouteName}Page.title`,
60
62
  `${lodash.camelCase(lastRouteName)}Page.title`,
61
63
  `choice.${pluralize}`,
@@ -71,14 +73,6 @@ export const useMyth = () => {
71
73
  let str: string | null = null
72
74
  let k: string | any
73
75
 
74
- if (te((k = `routes.${routeName}`)) && lodash.isString((str = t(k)))) {
75
- return str
76
- }
77
-
78
- if (te((k = `routes.${routePath}`)) && lodash.isString((str = t(k)))) {
79
- return str
80
- }
81
-
82
76
  for (const f in keys) {
83
77
  if (!(k = keys[f])) {
84
78
  continue