aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/PositionPage.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/other/PositionPage.jsx')
-rw-r--r--modern/src/other/PositionPage.jsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/modern/src/other/PositionPage.jsx b/modern/src/other/PositionPage.jsx
index 1a5f6d9d..3ed3498c 100644
--- a/modern/src/other/PositionPage.jsx
+++ b/modern/src/other/PositionPage.jsx
@@ -11,6 +11,7 @@ import { useEffectAsync } from '../reactHelper';
import { prefixString } from '../common/util/stringUtils';
import { useTranslation } from '../common/components/LocalizationProvider';
import PositionValue from '../common/components/PositionValue';
+import usePositionAttributes from '../common/attributes/usePositionAttributes';
const useStyles = makeStyles((theme) => ({
root: {
@@ -30,6 +31,8 @@ const PositionPage = () => {
const navigate = useNavigate();
const t = useTranslation();
+ const positionAttributes = usePositionAttributes(t);
+
const { id } = useParams();
const [item, setItem] = useState();
@@ -85,14 +88,14 @@ const PositionPage = () => {
{item && Object.getOwnPropertyNames(item).filter((it) => it !== 'attributes').map((property) => (
<TableRow key={property}>
<TableCell>{property}</TableCell>
- <TableCell><strong>{t(prefixString('position', property))}</strong></TableCell>
+ <TableCell><strong>{positionAttributes[property]?.name || property}</strong></TableCell>
<TableCell><PositionValue position={item} property={property} /></TableCell>
</TableRow>
))}
{item && Object.getOwnPropertyNames(item.attributes).map((attribute) => (
<TableRow key={attribute}>
<TableCell>{attribute}</TableCell>
- <TableCell><strong>{t(prefixString('position', attribute)) || t(prefixString('device', attribute))}</strong></TableCell>
+ <TableCell><strong>{positionAttributes[attribute]?.name || attribute}</strong></TableCell>
<TableCell><PositionValue position={item} attribute={attribute} /></TableCell>
</TableRow>
))}