From d40fac66c00f39eca400f9186ebe5e4aca4d0468 Mon Sep 17 00:00:00 2001
From: Aymeric <123820772+Aymerix01@users.noreply.github.com>
Date: Mon, 17 Jul 2023 16:43:12 +0200
Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Fix=20translation=20expiration?=
=?UTF-8?q?=20date=20(125)=20(#136)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* 🌐 Fix translation expiration date (125)
---
.../features/global/services/languages-service.ts | 4 ++++
.../client/body/drive/components/select-users.tsx | 2 +-
.../modals/update-access/public-link-access.tsx | 14 +++++++++++++-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/tdrive/frontend/src/app/features/global/services/languages-service.ts b/tdrive/frontend/src/app/features/global/services/languages-service.ts
index 06f432f0..f6bb93e6 100755
--- a/tdrive/frontend/src/app/features/global/services/languages-service.ts
+++ b/tdrive/frontend/src/app/features/global/services/languages-service.ts
@@ -69,6 +69,10 @@ class LanguagesService extends Observable {
this.notify();
}
+ getLanguage(): string {
+ return this.language;
+ }
+
t(route: string, parameters: any[] = [], fallback?: string) {
let replace: any = {};
try {
diff --git a/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx b/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx
index 9f50cba4..19d82087 100644
--- a/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx
+++ b/tdrive/frontend/src/app/views/client/body/drive/components/select-users.tsx
@@ -72,7 +72,7 @@ export default (props: {
}}
size="sm"
>
- Add
+ {Languages.t('general.add')}
diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/public-link-access.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/public-link-access.tsx
index f2b4fe32..091dae0a 100644
--- a/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/public-link-access.tsx
+++ b/tdrive/frontend/src/app/views/client/body/drive/modals/update-access/public-link-access.tsx
@@ -8,12 +8,16 @@ import { Input } from 'app/atoms/input/input-text';
import { useEffect, useRef, useState } from 'react';
import { AccessLevel } from './common';
import moment from 'moment';
+import 'moment/min/locales'
import Languages from 'features/global/services/languages-service';
+
export const PublicLinkManager = ({ id, disabled }: { id: string; disabled?: boolean }) => {
const { item, loading, update } = useDriveItem(id);
const publicLink = getPublicLink(item);
+
+
return (
<>