mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
Fixed typo. Added new localization string.
This commit is contained in:
parent
d1c9f78944
commit
255e9d2e41
@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import styles from './Table.module.css';
|
import styles from './Table.module.css';
|
||||||
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
export default function Table({ columns, rows, empty }) {
|
export default function Table({ columns, rows, empty }) {
|
||||||
if (empty && rows.length === 0) {
|
if (empty && rows.length === 0) {
|
||||||
@ -21,6 +22,11 @@ export default function Table({ columns, rows, empty }) {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.body}>
|
<div className={styles.body}>
|
||||||
|
{rows.length === 0 && (
|
||||||
|
<div className={styles.empty}>
|
||||||
|
<FormattedMessage id="message.no-data-available" defaultMessage="No data available." />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{rows.map((row, rowIndex) => (
|
{rows.map((row, rowIndex) => (
|
||||||
<div className={classNames(styles.row, 'row')} key={rowIndex}>
|
<div className={classNames(styles.row, 'row')} key={rowIndex}>
|
||||||
{columns.map(({ key, render, className, style, cell }) => (
|
{columns.map(({ key, render, className, style, cell }) => (
|
||||||
|
@ -19,8 +19,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body:empty:before {
|
.empty {
|
||||||
content: 'No data available';
|
|
||||||
color: var(--gray500);
|
color: var(--gray500);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
@ -87,6 +87,14 @@ export default function MetricsTable({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.body}>
|
<div className={styles.body}>
|
||||||
|
{data?.length === 0 && (
|
||||||
|
<div className={styles.empty}>
|
||||||
|
<FormattedMessage
|
||||||
|
id="message.no-data-available"
|
||||||
|
defaultMessage="No data available."
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{limit
|
{limit
|
||||||
? rankings.map(row => getRow(row))
|
? rankings.map(row => getRow(row))
|
||||||
: data?.length > 0 && (
|
: data?.length > 0 && (
|
||||||
|
@ -95,8 +95,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body:empty:before {
|
.empty {
|
||||||
content: 'No data available';
|
|
||||||
color: var(--gray500);
|
color: var(--gray500);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
"header.nav.settings": {
|
"header.nav.settings": {
|
||||||
"defaultMessage": "Settings"
|
"defaultMessage": "Settings"
|
||||||
},
|
},
|
||||||
"label.adminsitrator": {
|
"label.administrator": {
|
||||||
"defaultMessage": "Administrator"
|
"defaultMessage": "Administrator"
|
||||||
},
|
},
|
||||||
"label.confirm-password": {
|
"label.confirm-password": {
|
||||||
@ -125,6 +125,9 @@
|
|||||||
"message.incorrect-username-password": {
|
"message.incorrect-username-password": {
|
||||||
"defaultMessage": "Incorrect username/password."
|
"defaultMessage": "Incorrect username/password."
|
||||||
},
|
},
|
||||||
|
"message.no-data-available": {
|
||||||
|
"defaultMessage": "No data available."
|
||||||
|
},
|
||||||
"message.save-success": {
|
"message.save-success": {
|
||||||
"defaultMessage": "Saved successfully."
|
"defaultMessage": "Saved successfully."
|
||||||
},
|
},
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
"header.nav.settings": {
|
"header.nav.settings": {
|
||||||
"defaultMessage": "Instellingen"
|
"defaultMessage": "Instellingen"
|
||||||
},
|
},
|
||||||
"label.adminsitrator": {
|
"label.administrator": {
|
||||||
"defaultMessage": "Administrator"
|
"defaultMessage": "Administrator"
|
||||||
},
|
},
|
||||||
"label.confirm-password": {
|
"label.confirm-password": {
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
"header.nav.settings": {
|
"header.nav.settings": {
|
||||||
"defaultMessage": "设置"
|
"defaultMessage": "设置"
|
||||||
},
|
},
|
||||||
"label.adminsitrator": {
|
"label.administrator": {
|
||||||
"defaultMessage": "管理员"
|
"defaultMessage": "管理员"
|
||||||
},
|
},
|
||||||
"label.confirm-password": {
|
"label.confirm-password": {
|
||||||
|
Loading…
Reference in New Issue
Block a user