changes to accomodate different language syntax placement

fixes to fr translation json file
This commit is contained in:
CyferShepard
2024-05-17 16:15:33 +02:00
parent abb9c51d9d
commit 567dfc7a7f
5 changed files with 9 additions and 8 deletions

View File

@@ -134,6 +134,7 @@
"LAST_CLIENT": "Last Client",
"LAST_SEEN": "Last Seen",
"AGO": "Ago",
"AGO_ALT": "",
"USER_STATS": "User Stats",
"USER_ACTIVITY": "User Activity"
},

View File

@@ -134,7 +134,7 @@
"LAST_CLIENT": "Dernier appareil",
"LAST_SEEN": "Dernière fois vu",
"AGO": "",
"AGO_ALT": "Il y a"
"AGO_ALT": "Il y a",
"USER_STATS": "Statistiques de l'utilisateur",
"USER_ACTIVITY": "Activité de l'utilisateur"
},

View File

@@ -27,7 +27,7 @@ function formatTime(time) {
formattedTime = `${time.seconds} ${units.seconds[time.seconds > 1 ? 1 : 0]}`;
}
return `${formattedTime + " " + i18next.t("AGO").toLowerCase()}`;
return formattedTime;
}
function LastWatchedCard(props) {
@@ -73,7 +73,7 @@ function LastWatchedCard(props) {
</Link>
<div className="last-item-details">
<div className="last-last-played">{formatTime(props.data.LastPlayed)}</div>
<div className="last-last-played">{`${i18next.t("USERS_PAGE.AGO_ALT")} ${formatTime(props.data.LastPlayed)} ${i18next.t("USERS_PAGE.AGO").toLocaleLowerCase()}`}</div>
<div className="pb-2">
<Link to={`/users/${props.data.UserId}`}>{props.data.UserName}</Link>

View File

@@ -120,7 +120,7 @@ function LibraryCard(props) {
}
}
return `${formattedTime+i18next.t("AGO").toLowerCase()}`;
return formattedTime;
}
return (
@@ -186,7 +186,7 @@ function LibraryCard(props) {
<Row className="space-between-end card-row">
<Col className="card-label"><Trans i18nKey="LIBRARY_CARD.LAST_ACTIVITY" /></Col>
<Col className="text-end">{props.data.LastActivity ? formatLastActivityTime(props.data.LastActivity) : 'never'}</Col>
<Col className="text-end">{props.data.LastActivity ?`${i18next.t("USERS_PAGE.AGO_ALT")} ${ formatLastActivityTime(props.data.LastActivity)} ${i18next.t("USERS_PAGE.AGO").toLocaleLowerCase()}` : i18next.t("ERROR_MESSAGES.NEVER")}</Col>
</Row>
<Row className="space-between-end card-row">

View File

@@ -141,7 +141,7 @@ function Row(row) {
}
}
return `${formattedTime + i18next.t("AGO").toLowerCase()}`;
return `${formattedTime}`;
}
async function toggleTrackedState(userid) {
@@ -206,7 +206,7 @@ function Row(row) {
<TableCell>{data.TotalPlays}</TableCell>
<TableCell>{formatTotalWatchTime(data.TotalWatchTime) || `0 ${i18next.t("UNITS.MINUTES")}`}</TableCell>
<TableCell style={{ textTransform: data.LastSeen ? "none" : "lowercase" }}>
{data.LastSeen ? formatLastSeenTime(data.LastSeen) : i18next.t("ERROR_MESSAGES.NEVER")}
{data.LastSeen ? `${i18next.t("USERS_PAGE.AGO_ALT")} ${formatLastSeenTime(data.LastSeen)} ${i18next.t("USERS_PAGE.AGO").toLocaleLowerCase()}` : i18next.t("ERROR_MESSAGES.NEVER")}
</TableCell>
</TableRow>
</React.Fragment>
@@ -317,7 +317,7 @@ function Users() {
}
}
return `${formattedTime + i18next.t("AGO").toLowerCase()}`;
return `${formattedTime}`;
}
function descendingComparator(a, b, orderBy) {