This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new a9f03edd7 [AMORO-3448] Show total item count on paginated web pages
(#3449)
a9f03edd7 is described below
commit a9f03edd75aaecd2aada0a08769f9a470b9fb158
Author: yaolei <[email protected]>
AuthorDate: Wed Mar 12 14:42:55 2025 +0800
[AMORO-3448] Show total item count on paginated web pages (#3449)
* [AMORO-3448] Show total item count on paginated web pages
* [AMORO-3448] Show total item count on paginated web pages
* [AMORO-3460] Fix some typos in java code or comments
* Revert "[AMORO-3460] Fix some typos in java code or comments"
This reverts commit b170d618f04364811d123b650f42a9172e9693ce.
---
amoro-web/src/hooks/usePagination.ts | 5 ++++-
amoro-web/src/language/en.ts | 1 +
amoro-web/src/language/zh.ts | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/amoro-web/src/hooks/usePagination.ts
b/amoro-web/src/hooks/usePagination.ts
index c5337224f..79b42467f 100644
--- a/amoro-web/src/hooks/usePagination.ts
+++ b/amoro-web/src/hooks/usePagination.ts
@@ -15,12 +15,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+import { useI18n } from 'vue-i18n'
export function usePagination() {
const _total = 0
const _current = 1
const _pageSizeOptions = ['25', '50', '100']
const _pageSize = 25
+ const { t } = useI18n()
+
return {
total: _total,
current: _current,
@@ -29,6 +32,6 @@ export function usePagination() {
showQuickJumper: true,
showSizeChanger: true,
hideOnSinglePage: false,
- // showTotal: (total: number) => `total ${total} records`
+ showTotal: (total: number) => { return t('totalCount', { total }) }
}
}
diff --git a/amoro-web/src/language/en.ts b/amoro-web/src/language/en.ts
index efea76e99..90901671d 100644
--- a/amoro-web/src/language/en.ts
+++ b/amoro-web/src/language/en.ts
@@ -225,4 +225,5 @@ export default {
Failed: 'Failed',
Finished: 'Finished',
Created: 'Created',
+ totalCount: 'total {total} records',
}
diff --git a/amoro-web/src/language/zh.ts b/amoro-web/src/language/zh.ts
index e59ff40f8..5d8d78b38 100644
--- a/amoro-web/src/language/zh.ts
+++ b/amoro-web/src/language/zh.ts
@@ -225,4 +225,5 @@ export default {
Failed: '已失败',
Finished: '已结束',
Created: '已创建',
+ totalCount: '共 {total} 条',
}