Skip to content

Commit

Permalink
Change the n items to n resource name in record lists
Browse files Browse the repository at this point in the history
  • Loading branch information
yonkov committed May 30, 2023
1 parent fc16955 commit 0fcbec0
Show file tree
Hide file tree
Showing 26 changed files with 111 additions and 19 deletions.
3 changes: 3 additions & 0 deletions client/web/admin/src/components/Apigw/CRouteList.vue
Expand Up @@ -30,6 +30,9 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.route.single'),
resourcePlural: $t('general:label.route.plural')
}"
class="h-100"
@search="filterList"
Expand Down
Expand Up @@ -29,6 +29,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.connection.single'),
resourcePlural: $t('general:label.connection.plural')
}"
hide-search
class="h-100"
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/Automation/Session/List.vue
Expand Up @@ -23,6 +23,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.session.single'),
resourcePlural: $t('general:label.session.plural')
}"
sticky-header
hide-search
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/Automation/Workflow/List.vue
Expand Up @@ -57,6 +57,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.workflow.single'),
resourcePlural: $t('general:label.workflow.plural')
}"
sticky-header
class="custom-resource-list-height"
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/System/Application/List.vue
Expand Up @@ -58,6 +58,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.application.single'),
resourcePlural: $t('general:label.application.plural'),
}"
sticky-header
class="custom-resource-list-height"
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/System/AuthClient/List.vue
Expand Up @@ -46,6 +46,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.auth_client.single'),
resourcePlural: $t('general:label.auth_client.plural'),
}"
sticky-header
hide-search
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/System/Queue/List.vue
Expand Up @@ -49,6 +49,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.queue.single'),
resourcePlural: $t('general:label.queue.plural'),
}"
sticky-header
class="custom-resource-list-height"
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/System/Role/List.vue
Expand Up @@ -67,6 +67,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.role.single'),
resourcePlural: $t('general:label.role.plural'),
}"
sticky-header
class="custom-resource-list-height"
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/System/SensitivityLevel/List.vue
Expand Up @@ -35,6 +35,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.sensitivity_level.single'),
resourcePlural: $t('general:label.sensitivity_level.plural'),
}"
sticky-header
hide-search
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/System/Template/List.vue
Expand Up @@ -67,6 +67,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.template.single'),
resourcePlural: $t('general:label.template.plural'),
}"
sticky-header
class="custom-resource-list-height"
Expand Down
2 changes: 2 additions & 0 deletions client/web/admin/src/views/System/User/List.vue
Expand Up @@ -75,6 +75,8 @@
singlePluralPagination: 'admin:general.pagination.single',
prevPagination: $t('admin:general.pagination.prev'),
nextPagination: $t('admin:general.pagination.next'),
resourceSingle: $t('general:label.user.single'),
resourcePlural: $t('general:label.user.plural'),
}"
sticky-header
class="custom-resource-list-height"
Expand Down
2 changes: 2 additions & 0 deletions client/web/compose/src/views/Admin/Charts/List.vue
Expand Up @@ -23,6 +23,8 @@
singlePluralPagination: 'general:resourceList.pagination.single',
prevPagination: $t('general:resourceList.pagination.prev'),
nextPagination: $t('general:resourceList.pagination.next'),
resourceSingle: $t('general:label.chart.single'),
resourcePlural: $t('general:label.chart.plural'),
}"
clickable
sticky-header
Expand Down
2 changes: 1 addition & 1 deletion client/web/compose/src/views/Admin/Modules/Edit.vue
Expand Up @@ -113,7 +113,7 @@
:title="module.name || module.handle || module.moduleID"
:target="module.name || module.handle || module.moduleID"
:resource="`corteza::compose:module/${namespace.namespaceID}/${module.moduleID}`"
:button-label="$t('general:label.module')"
:button-label="$t('general:label.module.single')"
:show-button-icon="false"
button-variant="white text-left w-100"
/>
Expand Down
4 changes: 3 additions & 1 deletion client/web/compose/src/views/Admin/Modules/List.vue
Expand Up @@ -24,6 +24,8 @@
singlePluralPagination: 'general:resourceList.pagination.single',
prevPagination: $t('general:resourceList.pagination.prev'),
nextPagination: $t('general:resourceList.pagination.next'),
resourceSingle: $t('general:label.module.single'),
resourcePlural: $t('general:label.module.plural'),
}"
clickable
sticky-header
Expand Down Expand Up @@ -77,7 +79,7 @@
<b-dropdown-item>
<c-permissions-button
:resource="`corteza::compose:module/${namespace.namespaceID}/*`"
:button-label="$t('general:label.module')"
:button-label="$t('general:label.module.single')"
:show-button-icon="false"
button-variant="white text-left w-100"
/>
Expand Down
2 changes: 2 additions & 0 deletions client/web/compose/src/views/Namespace/Manage.vue
Expand Up @@ -40,6 +40,8 @@
singlePluralPagination: 'general:resourceList.pagination.single',
prevPagination: $t('general:resourceList.pagination.prev'),
nextPagination: $t('general:resourceList.pagination.next'),
resourceSingle: $t('general:label.namespace.single'),
resourcePlural: $t('general:label.namespace.plural'),
}"
clickable
sticky-header
Expand Down
2 changes: 2 additions & 0 deletions client/web/privacy/src/views/Privacy/Request/List.vue
Expand Up @@ -24,6 +24,8 @@
singlePluralPagination: 'general:resourceList.pagination.single',
prevPagination: $t('general:resourceList.pagination.prev'),
nextPagination: $t('general:resourceList.pagination.next'),
resourceSingle: $t('general:label.privacy_request.single'),
resourcePlural: $t('general:label.privacy_request.plural'),
}"
:is-item-selectable="isItemSelectable"
selectable
Expand Down
2 changes: 2 additions & 0 deletions client/web/privacy/src/views/Privacy/SensitiveData.vue
Expand Up @@ -23,6 +23,8 @@
singlePluralPagination: 'general:resourceList.pagination.single',
prevPagination: $t('general:resourceList.pagination.prev'),
nextPagination: $t('general:resourceList.pagination.next'),
resourceSingle: $t('general:label.sensitive_module.single'),
resourcePlural: $t('general:label.sensitive_module.plural'),
}"
clickable
hide-total
Expand Down
2 changes: 2 additions & 0 deletions client/web/reporter/src/views/Report/List.vue
Expand Up @@ -23,6 +23,8 @@
singlePluralPagination: 'general:resourceList.pagination.single',
prevPagination: $t('general:resourceList.pagination.prev'),
nextPagination: $t('general:resourceList.pagination.next'),
resourceSingle: $t('general:label.report.single'),
resourcePlural: $t('general:label.report.plural')
}"
sticky-header
clickable
Expand Down
2 changes: 2 additions & 0 deletions client/web/workflow/src/views/Workflow/List.vue
Expand Up @@ -23,6 +23,8 @@
singlePluralPagination: 'general:resourceList.pagination.single',
prevPagination: $t('general:resourceList.pagination.prev'),
nextPagination: $t('general:resourceList.pagination.next'),
resourceSingle: $t('general:workflow.single'),
resourcePlural: $t('general:workflow.plural')
}"
clickable
sticky-header
Expand Down
1 change: 1 addition & 0 deletions lib/vue/src/components/resourceList/CResourceList.vue
Expand Up @@ -318,6 +318,7 @@ export default {
from: ((page - 1) * limit) + 1,
to: limit > 0 ? Math.min((page * limit), total) : total,
count: total,
data: total == 1 ? this.translations.resourceSingle : this.translations.resourcePlural
}
return this.$t(this.translations[total > limit ? 'showingPagination' : 'singlePluralPagination'], pagination)
Expand Down
8 changes: 4 additions & 4 deletions locale/en/corteza-webapp-admin/admin.yaml
Expand Up @@ -84,10 +84,10 @@ general:
noAccess: You do not have permissions to access Admin panel
pagination:
next: Next
prev: Prev
showing: '{{from}} - {{to}} of {{count}} items'
single: One item
single_plural: '{{count}} items'
prev: Previous
showing: '{{from}} - {{to}} of {{count}} {{data}}'
single: 'One {{data}}'
single_plural: '{{count}} {{data}}'
navigation:
adminPanel: Admin panel
automation: Automation
Expand Down
33 changes: 33 additions & 0 deletions locale/en/corteza-webapp-admin/general.yaml
@@ -1,4 +1,37 @@
label:
template:
single: Template
plural: Templates
user:
single: User
plural: Users
role:
single: Role
plural: Roles
application:
single: Application
plural: Applications
auth_client:
single: Auth Client
plural: Auth Clients
queue:
single: Messaging Queue
plural: Messaging Queues
route:
single: Route
plural: Routes
connection:
single: Database Connection
plural: Database Connections
sensitivity_level:
single: Sensitivity Level
plural: Sensitivity Levels
session:
single: Session
plural: Sessions
workflow:
single: Workflow
plural: Workflows
plus-add: + Add
clear: Clear
none: None
Expand Down
16 changes: 12 additions & 4 deletions locale/en/corteza-webapp-compose/general.yaml
Expand Up @@ -39,7 +39,6 @@ label:
importPlaceholder: Upload files to import
loading: Loading
makeDefault: Make default
module: Module
moduleName: Module name
multi: Multi
name: Name
Expand Down Expand Up @@ -80,6 +79,15 @@ label:
validation: Validation
view: View
yes: Yes
chart:
single: Chart
plural: Charts
namespace:
single: Namespace
plural: Namespaces
module:
single: Module
plural: Modules
navigation:
chart: Charts
namespace: Namespaces
Expand Down Expand Up @@ -148,9 +156,9 @@ resourceList:
pagination:
next: Next
prev: Previous
showing: '{{from}} - {{to}} of {{count}} items'
single: One item
single_plural: '{{count}} items'
showing: '{{from}} - {{to}} of {{count}} {{data}}'
single: 'One {{data}}'
single_plural: '{{count}} {{data}}'
recordNavigation:
next: Next record
prev: Previous record
Expand Down
12 changes: 9 additions & 3 deletions locale/en/corteza-webapp-privacy/general.yaml
@@ -1,5 +1,11 @@
label:
back: Back
privacy_request:
single: Privacy Request
plural: Privacy Requests
sensitive_module:
single: Sensitive Module
plural: Sensitive Modules

resourceList:
loading: Loading
Expand All @@ -10,6 +16,6 @@ resourceList:
pagination:
next: Next
prev: Previous
showing: '{{from}} - {{to}} of {{count}} items'
single: One item
single_plural: '{{count}} items'
showing: '{{from}} - {{to}} of {{count}} {{data}}'
single: 'One {{data}}'
single_plural: '{{count}} {{data}}'
10 changes: 7 additions & 3 deletions locale/en/corteza-webapp-reporter/general.yaml
Expand Up @@ -18,12 +18,16 @@ label:
today: Today
urlPlaceholder: https://example.tld
default: Default
report:
single: Report
plural: Reports

resourceList:
notFound: Not found
noItems: No items to show
pagination:
next: Next
prev: Previous
showing: '{{from}} - {{to}} of {{count}} items'
single: One item
single_plural: '{{count}} items'
showing: '{{from}} - {{to}} of {{count}} {{data}}'
single: 'One {{data}}'
single_plural: '{{count}} {{data}}'
9 changes: 6 additions & 3 deletions locale/en/corteza-webapp-workflow/general.yaml
Expand Up @@ -31,6 +31,9 @@ only: Only
including: Including
unnamed-workflow: Unnamed Workflow
workflow-list: List of Workflows
workflow:
single: Workflow
plural: Workflows
save: Save
today: Today
cancel: Cancel
Expand All @@ -40,9 +43,9 @@ resourceList:
pagination:
next: Next
prev: Previous
showing: '{{from}} - {{to}} of {{count}} items'
single: One item
single_plural: '{{count}} items'
showing: '{{from}} - {{to}} of {{count}} {{data}}'
single: 'One {{data}}'
single_plural: '{{count}} {{data}}'

tooltip:
permissions: Workflow permissions
Expand Down

0 comments on commit 0fcbec0

Please sign in to comment.