Update video modal to use German language translations
Translate various UI elements and date/view formats within the video modal component from English to German to support internationalization. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 074b0e4c-6171-43bd-aa98-f9e04623ca14 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/074b0e4c-6171-43bd-aa98-f9e04623ca14/QQTyNAb
This commit is contained in:
parent
c69adf3f67
commit
c7d3b4fc09
@ -26,11 +26,11 @@ function formatDuration(seconds: number): string {
|
|||||||
|
|
||||||
function formatViews(views: number): string {
|
function formatViews(views: number): string {
|
||||||
if (views >= 1000000) {
|
if (views >= 1000000) {
|
||||||
return `${(views / 1000000).toFixed(1)}M views`;
|
return `${(views / 1000000).toFixed(1)}M Aufrufe`;
|
||||||
} else if (views >= 1000) {
|
} else if (views >= 1000) {
|
||||||
return `${(views / 1000).toFixed(1)}K views`;
|
return `${(views / 1000).toFixed(1)}K Aufrufe`;
|
||||||
}
|
}
|
||||||
return `${views} views`;
|
return `${views} Aufrufe`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDate(date: Date | string): string {
|
function formatDate(date: Date | string): string {
|
||||||
@ -44,11 +44,11 @@ function formatDate(date: Date | string): string {
|
|||||||
const diffTime = Math.abs(now.getTime() - createdDate.getTime());
|
const diffTime = Math.abs(now.getTime() - createdDate.getTime());
|
||||||
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||||
|
|
||||||
if (diffDays === 0) return "Today";
|
if (diffDays === 0) return "Heute";
|
||||||
if (diffDays === 1) return "1 day ago";
|
if (diffDays === 1) return "vor 1 Tag";
|
||||||
if (diffDays < 7) return `${diffDays} days ago`;
|
if (diffDays < 7) return `vor ${diffDays} Tagen`;
|
||||||
if (diffDays < 30) return `${Math.floor(diffDays / 7)} week${Math.floor(diffDays / 7) > 1 ? 's' : ''} ago`;
|
if (diffDays < 30) return `vor ${Math.floor(diffDays / 7)} Woche${Math.floor(diffDays / 7) > 1 ? 'n' : ''}`;
|
||||||
return `${Math.floor(diffDays / 30)} month${Math.floor(diffDays / 30) > 1 ? 's' : ''} ago`;
|
return `vor ${Math.floor(diffDays / 30)} Monat${Math.floor(diffDays / 30) > 1 ? 'en' : ''}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos = [], onVideoChange }: BunnyVideoModalProps) {
|
export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos = [], onVideoChange }: BunnyVideoModalProps) {
|
||||||
@ -118,7 +118,7 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
|
|||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(getShareUrl());
|
await navigator.clipboard.writeText(getShareUrl());
|
||||||
const notification = document.createElement('div');
|
const notification = document.createElement('div');
|
||||||
notification.textContent = 'Povezava kopirana!';
|
notification.textContent = 'Link kopiert!';
|
||||||
notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg z-50 transition-opacity duration-300';
|
notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg z-50 transition-opacity duration-300';
|
||||||
document.body.appendChild(notification);
|
document.body.appendChild(notification);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -189,7 +189,7 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
|
|||||||
data-testid="button-edit-video"
|
data-testid="button-edit-video"
|
||||||
>
|
>
|
||||||
<Edit3 className="w-4 h-4" />
|
<Edit3 className="w-4 h-4" />
|
||||||
Edit
|
Bearbeiten
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
@ -201,7 +201,7 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
|
|||||||
data-testid="button-share-video"
|
data-testid="button-share-video"
|
||||||
>
|
>
|
||||||
<Share2 className="w-4 h-4" />
|
<Share2 className="w-4 h-4" />
|
||||||
Share
|
Teilen
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{showShareMenu && (
|
{showShareMenu && (
|
||||||
@ -238,7 +238,7 @@ export default function BunnyVideoModal({ video, isOpen, onClose, onEdit, videos
|
|||||||
className="w-full px-4 py-2 text-left text-white hover:bg-gray-700"
|
className="w-full px-4 py-2 text-left text-white hover:bg-gray-700"
|
||||||
data-testid="button-copy-link"
|
data-testid="button-copy-link"
|
||||||
>
|
>
|
||||||
Copy Link
|
Link kopieren
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user