feat(localization): expand language support and enhance UI for user settings

- Added support for additional UI locales including Cebuano and Spanish, improving accessibility for a broader user base.
- Updated language selection components in the AppHeader and SettingsWidget to reflect new language options, enhancing user experience.
- Enhanced localization of various UI elements across components, ensuring consistent language representation and improved user engagement.
- Implemented logic to synchronize user language preferences with backend settings, providing a seamless experience when changing languages.
This commit is contained in:
Torsten Schulz (local)
2026-04-02 07:54:44 +02:00
parent 6e1fe6f3a8
commit c50a6b3c35
72 changed files with 1792 additions and 343 deletions

View File

@@ -6,7 +6,7 @@
<div>
<span class="erotic-videos-eyebrow">{{ $t('socialnetwork.erotic.eyebrow') }}</span>
<h2>{{ isForeignView ? `${$t('socialnetwork.erotic.videosTitle')} · ${viewUsername}` : $t('socialnetwork.erotic.videosTitle') }}</h2>
<p>{{ isForeignView ? 'Freigegebene Videos aus dem Erwachsenenbereich.' : $t('socialnetwork.erotic.videosIntro') }}</p>
<p>{{ isForeignView ? $t('socialnetwork.erotic.foreignVideosIntro') : $t('socialnetwork.erotic.videosIntro') }}</p>
</div>
</section>
@@ -53,14 +53,14 @@
</label>
<label v-if="requiresSelectedUsers">
<span>{{ $t('socialnetwork.gallery.visibility.selected-users') }}</span>
<input v-model="selectedUsernamesText" type="text" placeholder="anna, bert, clara" />
<input v-model="selectedUsernamesText" type="text" :placeholder="$t('socialnetwork.erotic.selectedUsersPlaceholder')" />
</label>
<label>
<span>{{ $t('socialnetwork.erotic.videoFile') }}</span>
<input type="file" accept="video/mp4,video/webm,video/ogg,video/quicktime" required @change="onFileChange" />
</label>
<div class="erotic-videos-upload__meta">
<span>MP4, WEBM, OGG, MOV</span>
<span>{{ $t('socialnetwork.erotic.videoFormats') }}</span>
<span v-if="fileToUpload">{{ fileToUpload.name }}</span>
</div>
<button type="submit">{{ $t('socialnetwork.gallery.upload.upload_button') }}</button>
@@ -68,34 +68,34 @@
</section>
<section class="erotic-videos-panel surface-card">
<h3>Bibliothek</h3>
<h3>{{ $t('socialnetwork.erotic.libraryTitle') }}</h3>
<div class="erotic-videos-panel__list">
<div class="erotic-videos-panel__item">
<span>{{ isForeignView ? 'Freigegebene Videos' : $t('socialnetwork.erotic.myVideos') }}</span>
<span>{{ isForeignView ? $t('socialnetwork.erotic.sharedVideos') : $t('socialnetwork.erotic.myVideos') }}</span>
<strong>{{ videos.length }}</strong>
</div>
<div class="erotic-videos-panel__item">
<span>Letzter Upload</span>
<span>{{ $t('socialnetwork.erotic.latestUpload') }}</span>
<strong>{{ latestVideoTitle }}</strong>
</div>
<div class="erotic-videos-panel__item">
<span>Sichtbare Videos</span>
<span>{{ $t('socialnetwork.erotic.visibleVideos') }}</span>
<strong>{{ visibleVideosCount }}</strong>
</div>
<div class="erotic-videos-panel__item">
<span>Moderationsfälle</span>
<span>{{ $t('socialnetwork.erotic.moderationCases') }}</span>
<strong>{{ hiddenVideosCount }}</strong>
</div>
</div>
</section>
<section class="erotic-videos-panel surface-card">
<h3>Hinweise</h3>
<h3>{{ $t('socialnetwork.erotic.notesTitle') }}</h3>
<ul class="erotic-videos-checklist">
<li>{{ isForeignView ? 'Du siehst hier nur Videos, die dir für den Erwachsenenbereich freigegeben wurden.' : $t('socialnetwork.erotic.videoUploadHint') }}</li>
<li>Freunde sehen Inhalte nur dann, wenn sie volljährig und für den Erwachsenenbereich freigeschaltet sind.</li>
<li>Gezielt freigegebene Personen müssen ebenfalls volljährig und freigeschaltet sein.</li>
<li>Nutze {{ $t('socialnetwork.erotic.reportAction') }} direkt am jeweiligen Eintrag, wenn Inhalte geprüft werden sollen.</li>
<li>{{ isForeignView ? $t('socialnetwork.erotic.foreignVideosOnlyHint') : $t('socialnetwork.erotic.videoUploadHint') }}</li>
<li>{{ $t('socialnetwork.erotic.friendsVisibilityHint') }}</li>
<li>{{ $t('socialnetwork.erotic.selectedUsersVisibilityHint') }}</li>
<li>{{ $t('socialnetwork.erotic.reportHint', { action: $t('socialnetwork.erotic.reportAction') }) }}</li>
</ul>
</section>
</aside>
@@ -103,15 +103,15 @@
<section class="erotic-videos-library surface-card">
<div class="erotic-videos-library__header">
<div>
<h3>{{ isForeignView ? 'Freigegebene Videos' : $t('socialnetwork.erotic.myVideos') }}</h3>
<p>{{ isForeignView ? 'Sichtbare Videos aus freigegebenen Erwachsenenbereichen.' : 'Eigene Uploads, Freigaben und Meldungen an einem Ort.' }}</p>
<h3>{{ isForeignView ? $t('socialnetwork.erotic.sharedVideos') : $t('socialnetwork.erotic.myVideos') }}</h3>
<p>{{ isForeignView ? $t('socialnetwork.erotic.sharedVideosIntro') : $t('socialnetwork.erotic.libraryIntro') }}</p>
</div>
<span class="erotic-videos-library__count">{{ videos.length }}</span>
</div>
<div v-if="videos.length === 0" class="erotic-videos-empty">
<strong>{{ $t('socialnetwork.erotic.noVideos') }}</strong>
<span>{{ isForeignView ? 'Für dich sind aktuell keine freigegebenen Videos vorhanden.' : 'Lege links dein erstes Video an und verwalte es danach hier in der Bibliothek.' }}</span>
<span>{{ isForeignView ? $t('socialnetwork.erotic.noSharedVideos') : $t('socialnetwork.erotic.libraryEmptyHint') }}</span>
</div>
<div v-else class="erotic-videos-library__scroll">
@@ -122,7 +122,7 @@
{{ $t('socialnetwork.erotic.hiddenByModeration') }}
</div>
<div class="erotic-videos-card__meta">
<strong>{{ video.title || 'Ohne Titel' }}</strong>
<strong>{{ video.title || $t('socialnetwork.erotic.untitled') }}</strong>
<span v-if="video.createdAtLabel">{{ video.createdAtLabel }}</span>
</div>
<div v-if="video.visibilities?.length" class="erotic-videos-card__visibility">
@@ -136,7 +136,7 @@
<p v-if="video.description">{{ video.description }}</p>
<div v-if="!isForeignView" class="erotic-videos-card__edit">
<button type="button" class="secondary" @click="toggleEditor(video.id)">
{{ editingVideoId === video.id ? 'Bearbeitung schließen' : 'Freigaben bearbeiten' }}
{{ editingVideoId === video.id ? $t('socialnetwork.erotic.closeEditing') : $t('socialnetwork.erotic.editVisibility') }}
</button>
<div v-if="editingVideoId === video.id" class="erotic-videos-editor">
<label>
@@ -173,10 +173,10 @@
</label>
<label v-if="editRequiresSelectedUsers">
<span>{{ $t('socialnetwork.gallery.visibility.selected-users') }}</span>
<input v-model="editForm.selectedUsernamesText" type="text" placeholder="anna, bert, clara" />
<input v-model="editForm.selectedUsernamesText" type="text" :placeholder="$t('socialnetwork.erotic.selectedUsersPlaceholder')" />
</label>
<div class="erotic-videos-editor__actions">
<button type="button" @click="saveVideo(video.id)">Speichern</button>
<button type="button" @click="saveVideo(video.id)">{{ $t('common.save') }}</button>
</div>
</div>
</div>
@@ -265,7 +265,7 @@ export default {
return this.videos.filter((video) => video.isModeratedHidden).length;
},
latestVideoTitle() {
return this.videos[0]?.title || 'Noch kein Upload';
return this.videos[0]?.title || this.$t('socialnetwork.erotic.noUploadYet');
}
},
async mounted() {