Преглед на файлове

Merge pull request #5867 from eufelipemateus/translate-story

[Translation] translate story
daniel преди 2 месеца
родител
ревизия
0a4dc77242

+ 36 - 37
resources/assets/components/partials/sidebar.vue

@@ -23,43 +23,42 @@
                             <span class="stats-followers">
 								<span class="followers-count">{{ formatCount(user.followers_count) }}</span> Followers
 							</span>
-                        </p>
-                    </div>
-                </div>
-            </div>
-        </div>
-
-        <div class="btn-group btn-group-lg btn-block mb-4">
-            <!-- <button type="button" class="btn btn-outline-primary btn-block font-weight-bold" style="border-top-left-radius: 18px;border-bottom-left-radius:18px;font-size:18px;font-weight:300!important" @click="createNewPost()">
-                <i class="fal fa-arrow-circle-up mr-1"></i> {{ $t('navmenu.compose') }} Post
-            </button> -->
-            <router-link to="/i/web/compose" class="btn btn-primary btn-block font-weight-bold">
-                <i class="fal fa-arrow-circle-up mr-1"></i> {{ $t('navmenu.compose') }} Post
-            </router-link>
-            <button type="button" class="btn btn-outline-primary dropdown-toggle dropdown-toggle-split"
-                    data-toggle="dropdown" aria-expanded="false">
-                <span class="sr-only">Toggle Dropdown</span>
-            </button>
-            <div class="dropdown-menu dropdown-menu-right">
-                <a class="dropdown-item font-weight-bold" href="/i/collections/create">Create Collection</a>
-                <a v-if="hasStories" class="dropdown-item font-weight-bold" href="/i/stories/new">Create Story</a>
-                <div class="dropdown-divider"></div>
-                <a class="dropdown-item font-weight-bold" href="/settings/home">Account Settings</a>
-            </div>
-        </div>
-
-        <!-- <router-link to="/i/web/compose" class="btn btn-primary btn-lg btn-block mb-4 shadow-sm font-weight-bold">
-            <i class="far fa-plus-square mr-1"></i> {{ $t('navmenu.compose') }}
-        </router-link> -->
-
-        <div class="sidebar-sticky shadow-sm">
-            <ul class="nav flex-column">
-                <li class="nav-item">
-                    <div class="d-flex justify-content-between align-items-center">
-                        <!-- <router-link class="nav-link text-center" to="/i/web">
-                            <div class="icon text-lighter"><i class="far fa-home fa-lg"></i></div>
-                            <div class="small">{{ $t('navmenu.homeFeed') }}</div>
-                        </router-link> -->
+						</p>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="btn-group btn-group-lg btn-block mb-4">
+			<!-- <button type="button" class="btn btn-outline-primary btn-block font-weight-bold" style="border-top-left-radius: 18px;border-bottom-left-radius:18px;font-size:18px;font-weight:300!important" @click="createNewPost()">
+				<i class="fal fa-arrow-circle-up mr-1"></i> {{ $t('navmenu.compose') }} Post
+			</button> -->
+			<router-link to="/i/web/compose" class="btn btn-primary btn-block font-weight-bold">
+				<i class="fal fa-arrow-circle-up mr-1"></i> {{ $t('navmenu.compose') }} Post
+			</router-link>
+			<button type="button" class="btn btn-outline-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-expanded="false">
+				<span class="sr-only">Toggle Dropdown</span>
+			</button>
+			<div class="dropdown-menu dropdown-menu-right">
+				<a class="dropdown-item font-weight-bold" href="/i/collections/create">Create Collection</a>
+				<a v-if="hasStories" class="dropdown-item font-weight-bold" href="/i/stories/new">{{ $t("navmenu.createStory")}}</a>
+				<div class="dropdown-divider"></div>
+				<a class="dropdown-item font-weight-bold" href="/settings/home">Account Settings</a>
+			</div>
+		</div>
+
+		<!-- <router-link to="/i/web/compose" class="btn btn-primary btn-lg btn-block mb-4 shadow-sm font-weight-bold">
+			<i class="far fa-plus-square mr-1"></i> {{ $t('navmenu.compose') }}
+		</router-link> -->
+
+		<div class="sidebar-sticky shadow-sm">
+			<ul class="nav flex-column">
+				<li class="nav-item">
+					<div class="d-flex justify-content-between align-items-center">
+						<!-- <router-link class="nav-link text-center" to="/i/web">
+							<div class="icon text-lighter"><i class="far fa-home fa-lg"></i></div>
+							<div class="small">{{ $t('navmenu.homeFeed') }}</div>
+						</router-link> -->
                         <a
                             class="nav-link text-center"
                             href="/i/web"

+ 1 - 1
resources/assets/components/partials/timeline/StoryCarousel.vue

@@ -10,7 +10,7 @@
 						<div class="story-wrapper-blur d-flex flex-column align-items-center justify-content-between" style="display: block;width: 100%;height:100%;">
 							<p class="mb-4"></p>
 							<p class="mb-0"><i class="fal fa-plus-circle fa-2x"></i></p>
-							<p class="font-weight-bold">My Story</p>
+							<p class="font-weight-bold">{{ $t("story.myStory")}}</p>
 						</div>
 					</div>
 				</template>

+ 2 - 2
resources/assets/js/components/Stories.vue

@@ -4,12 +4,12 @@
 			<div class="card-header bg-white">
 				<p class="mb-0 d-flex align-items-center justify-content-between">
 					<span class="text-muted font-weight-bold">Stories</span>
-					<a class="text-dark small" href="/account/activity">See All</a>
+					<a class="text-dark small" href="/account/activity">{{ $t("story.seeAll") }}</a>
 				</p>
 			</div>
 			<div class="card-body loader text-center" style="height: 120px;">
 				<div class="spinner-border" role="status">
-					<span class="sr-only">Loading…</span>
+					<span class="sr-only">{{ $t('common.loading') }}</span>
 				</div>
 			</div>
 			<div class="card-body pt-2 contents" style="max-height: 120px; overflow-y: scroll;">

+ 26 - 26
resources/assets/js/components/StoryCompose.vue

@@ -14,11 +14,11 @@
 					<p class="lead text-lighter font-weight-light mb-0">Stories</p>
 				</div>
 				<div class="flex-fill py-4">
-					<p class="text-center lead font-weight-light text-lighter mb-4">Share moments with followers that last 24 hours</p>
+					<p class="text-center lead font-weight-light text-lighter mb-4">{{ $t("story.shareWithFollowers")}}</p>
 					<div class="card w-100 shadow-none bg-transparent">
 						<div class="d-flex">
 							<button type="button" class="btn btn-outline-light btn-lg font-weight-bold btn-block rounded-pill my-1" :disabled="stories.length >= 20" @click="upload()">
-								Add to Story
+								{{ $t("story.add")}}
 							</button>
 							<!-- <button :disabled="stories.length >= 20" type="button" class="btn btn-outline-light btn-lg font-weight-bold btn-block rounded-pill my-1 ml-2" @click="newPoll">
 								Create Poll
@@ -27,7 +27,7 @@
 						<p
 							v-if="stories.length >= 20"
 							class="font-weight-bold text-muted text-center">
-							You have reached the limit for new stories
+							{{ $t("story.limit") }}
 						</p>
 
 						<button
@@ -35,7 +35,7 @@
 							class="btn btn-outline-light btn-lg font-weight-bold btn-block rounded-pill my-3"
 							@click="viewMyStory"
 							:disabled="stories.length == 0">
-							<span>My Story</span>
+							<span>{{ $t("story.myStory")  }}</span>
 							<sup v-if="stories.length" class="ml-2 px-2 text-light bg-danger rounded-pill" style="font-size: 12px;padding-top:2px;padding-bottom:3px;">{{ stories.length }}</sup>
 						</button>
 
@@ -45,7 +45,7 @@
 					<p class="text-uppercase mb-0">
 						<a href="/" class="text-lighter font-weight-bold">Home</a>
 						<span class="px-2 text-lighter">|</span>
-						<a href="/site/help" class="text-lighter font-weight-bold">Help</a>
+						<a href="/site/help" class="text-lighter font-weight-bold">{{ $t("navmenu.help")}}</a>
 					</p>
 					<p class="small text-muted mb-0">v 1.0.0</p>
 				</div>
@@ -73,19 +73,19 @@
 							type="button"
 							class="btn btn-outline-muted rounded-pill font-weight-bold px-4"
 							@click="deleteCurrentStory()">
-							Cancel
+							{{ $t("story.cancel")}}
 						</button>
 
 						<div class="text-center">
-							<h4 class="font-weight-light text-light mb-n1">Crop</h4>
-							<span class="small text-light">Pan around and pinch to zoom</span>
+							<h4 class="font-weight-light text-light mb-n1">{{ $t("story.crop")}}</h4>
+							<span class="small text-light">{{ $t("story.zoom")  }}</span>
 						</div>
 
 						<button
 							type="button"
 							class="btn btn-outline-light rounded-pill font-weight-bold px-4"
 							@click="performCrop()">
-							Next
+							{{ $t("story.next")  }}
 						</button>
 					</div>
 				</div>
@@ -97,23 +97,23 @@
 					<p class="lead text-lighter font-weight-light mb-0">Stories</p>
 				</div>
 				<div class="flex-fill text-center">
-					<p class="h3 mb-0 text-light">Oops!</p>
-					<p class="text-muted lead">An error occurred, please try again later.</p>
+					<p class="h3 mb-0 text-light">{{ $t("common.oops") }}</p>
+					<p class="text-muted lead">{{ $t("common.errorMsg")}}</p>
 					<p class="text-muted mb-0">
-						<a class="btn btn-outline-muted py-0 px-5 rounded-pill font-weight-bold" href="/">Go back</a>
+						<a class="btn btn-outline-muted py-0 px-5 rounded-pill font-weight-bold" href="/">{{ $t("story.goBack")  }}</a>
 					</p>
 				</div>
 			</div>
 
 			<div v-else-if="page == 'uploading'" class="card card-body bg-transparent border-0 shadow-none d-flex justify-content-center align-items-center" style="height: 90vh;">
 				<div class="spinner-border text-lighter" role="status">
-					<span class="sr-only">Loading...</span>
+					<span class="sr-only">{{ $t('common.loading') }}</span>
 				</div>
 			</div>
 
 			<div v-else-if="page == 'cropping'" class="card card-body bg-transparent border-0 shadow-none d-flex justify-content-center align-items-center" style="height: 90vh;">
 				<div class="spinner-border text-lighter" role="status">
-					<span class="sr-only">Loading...</span>
+					<span class="sr-only">{{ $t('common.loading') }}</span>
 				</div>
 			</div>
 
@@ -124,31 +124,31 @@
 				</div>
 				<div class="flex-fill">
 					<div class="form-group pb-3">
-						<label for="durationSlider" class="text-light lead font-weight-bold">Options</label>
+						<label for="durationSlider" class="text-light lead font-weight-bold">{{ $t("story.options")  }}</label>
 						<div class="custom-control custom-checkbox mb-2">
 							<input type="checkbox" class="custom-control-input" id="optionReplies" v-model="canReply">
-							<label class="custom-control-label text-light font-weight-lighter" for="optionReplies">Allow replies</label>
+							<label class="custom-control-label text-light font-weight-lighter" for="optionReplies">{{ $t("story.allowReplies")  }}</label>
 						</div>
 						<div class="custom-control custom-checkbox mb-2">
 							<input type="checkbox" class="custom-control-input" id="formReactions" v-model="canReact">
-							<label class="custom-control-label text-light font-weight-lighter" for="formReactions">Allow reactions</label>
+							<label class="custom-control-label text-light font-weight-lighter" for="formReactions">{{ $t("story.allowReactions")  }}</label>
 						</div>
 					</div>
 					<div v-if="!canPostPoll" class="form-group">
 						<video ref="previewVideo" v-if="mediaType == 'video'" class="mb-4 w-100" style="max-height:200px;object-fit:contain;">
 							<source :src="mediaUrl" type="video/mp4">
 						</video>
-						<label for="durationSlider" class="text-light lead font-weight-bold">Story Duration</label>
+						<label for="durationSlider" class="text-light lead font-weight-bold">{{ $t("story.storyDuration")  }}</label>
 						<input type="range" class="custom-range" min="3" :max="max_duration" step="1" id="durationSlider" v-model="duration">
 						<p class="help-text text-center">
-							<span class="text-light">{{duration}} seconds</span>
+							<span class="text-light">{{duration}} {{ $t("story.seconds")  }}</span>
 						</p>
 					</div>
 				</div>
 				<div class="flex-fill w-100 px-md-5">
 					<div class="d-flex">
 						<a class="btn btn-outline-muted btn-block font-weight-bold my-3 mr-3 rounded-pill" href="/" @click.prevent="deleteCurrentStory()">
-							Cancel
+							{{ $t("story.cancel")  }}
 						</a>
 
 						<a class="btn btn-primary btn-block font-weight-bold my-3 rounded-pill" href="#" @click.prevent="shareStoryToFollowers()">
@@ -166,7 +166,7 @@
 					<p class="text-muted font-weight-bold mb-0">STORIES</p>
 				</div>
 				<div class="flex-fill py-4">
-					<p class="lead font-weight-bold text-lighter">My Stories</p>
+					<p class="lead font-weight-bold text-lighter">{{ $t('story.myStories') }}</p>
 					<div class="card w-100 shadow-none bg-transparent" style="max-height: 50vh; overflow-y: scroll">
 						<div class="list-group">
 							<div v-for="(story, index) in stories" class="list-group-item bg-transparent text-center border-muted text-lighter" href="#">
@@ -187,7 +187,7 @@
 									</div>
 								</div>
 								<div v-if="story.showViewers && story.viewers.length" class="m-2 text-left">
-									<p class="font-weight-bold mb-2">Viewed By</p>
+									<p class="font-weight-bold mb-2">{{ $t("story.viewdBy") }}</p>
 									<div v-for="viewer in story.viewers" class="d-flex">
 										<img src="/storage/avatars/default.png" width="24" height="24" class="rounded-circle mr-2">
 										<p class="mb-0 font-weight-bold">viewer.username</p>
@@ -198,7 +198,7 @@
 					</div>
 				</div>
 				<div class="flex-fill text-center">
-					<a class="btn btn-outline-secondary btn-block px-5 font-weight-bold" href="/i/stories/new" @click.prevent="goBack()">Go back</a>
+					<a class="btn btn-outline-secondary btn-block px-5 font-weight-bold" href="/i/stories/new" @click.prevent="goBack()">{{ $t("story.goBack") }}</a>
 				</div>
 			</div>
 
@@ -237,8 +237,8 @@
 					</div>
 				</div>
 				<div class="flex-fill text-center">
-					<a v-if="canPostPoll" class="btn btn-outline-light btn-block px-5 font-weight-bold rounded-pill" href="/i/stories/new" @click.prevent="pollPreview">Next</a>
-					<a class="btn btn-outline-secondary btn-block px-5 font-weight-bold rounded-pill" href="/i/stories/new" @click.prevent="goBack()">Go back</a>
+					<a v-if="canPostPoll" class="btn btn-outline-light btn-block px-5 font-weight-bold rounded-pill" href="/i/stories/new" @click.prevent="pollPreview">{{ $t("story.next")}}</a>
+					<a class="btn btn-outline-secondary btn-block px-5 font-weight-bold rounded-pill" href="/i/stories/new" @click.prevent="goBack()">{{ $t('story.goBack')}}</a>
 				</div>
 			</div>
 		</div>
@@ -247,7 +247,7 @@
 		<div class="col-12 col-md-6 offset-md-3 bg-dark rounded-lg px-0" style="height: 90vh;">
 			<div class="w-100 h-100 d-flex justify-content-center align-items-center">
 				<div class="spinner-border text-lighter" role="status">
-					<span class="sr-only">Loading...</span>
+					<span class="sr-only">{{ $t('common.loading') }}</span>
 				</div>
 			</div>
 		</div>

+ 1 - 1
resources/assets/js/components/StoryTimelineComponent.vue

@@ -3,7 +3,7 @@
 		<div v-if="show" class="card card-body p-0 border mt-md-4 mb-md-3 shadow-none">
 			<div v-if="loading" class="w-100 h-100 d-flex align-items-center justify-content-center">
 				<div class="spinner-border spinner-border-sm text-lighter" role="status">
-					<span class="sr-only">Loading...</span>
+					<span class="sr-only">{{ $t('common.loading') }}</span>
 				</div>
 			</div>
 			<div v-else class="d-flex align-items-center justify-content-start scrolly">

+ 8 - 8
resources/assets/js/components/StoryViewer.vue

@@ -15,13 +15,13 @@
 
 			<div v-if="activeReactionEmoji" style="position: absolute;z-index: 999;" class="w-100 h-100 d-flex justify-content-center align-items-center">
 				<div class="d-flex justify-content-center align-items-center rounded-pill shadow-lg" style="width: 120px;height: 30px;font-size:13px;background-color: rgba(0, 0, 0, 0.6);">
-					<span class="text-lighter">Reaction sent</span>
+					<span class="text-lighter">{{  $t("story.reactionSent") }}</span>
 				</div>
 			</div>
 
 			<div v-if="activeReply" style="position: absolute;z-index: 999;" class="w-100 h-100 d-flex justify-content-center align-items-center">
 				<div class="d-flex justify-content-center align-items-center rounded-pill shadow-lg" style="width: 120px;height: 30px;font-size:13px;background-color: rgba(0, 0, 0, 0.6);">
-					<span class="text-lighter">Reply sent</span>
+					<span class="text-lighter">{{ $t("story.replySent")  }}</span>
 				</div>
 			</div>
 
@@ -217,7 +217,7 @@
 			<div class="list-group text-center">
 				<div v-if="owner" class="list-group-item rounded py-3">
 					<div class="d-flex justify-content-between align-items-center font-weight-light">
-						<span>Expires in {{timeahead(stories[storyIndex].expires_at)}}</span>
+						<span>{{ $t("story.expiresIn")}} {{timeahead(stories[storyIndex].expires_at)}}</span>
 						<span>
 							<span class="btn btn-light btn-sm font-weight-bold">
 								<i class="fas fa-eye"></i>
@@ -235,10 +235,10 @@
 						{{ e }}
 					</button>
 				</div>
-				<div v-if="owner" class="list-group-item rounded cursor-pointer" @click="fetchViewers">Viewers</div>
-				<div v-if="!owner" class="list-group-item rounded cursor-pointer" @click="ctxMenuReport">Report</div>
-				<div v-if="owner" class="list-group-item rounded cursor-pointer" @click="deleteStory">Delete</div>
-				<div class="list-group-item rounded cursor-pointer text-muted" @click="closeCtxMenu">Close</div>
+				<div v-if="owner" class="list-group-item rounded cursor-pointer" @click="fetchViewers">{{ $t("story.viewers")}}</div>
+				<div v-if="!owner" class="list-group-item rounded cursor-pointer" @click="ctxMenuReport">>{{ $t("story.report")}}</div>
+				<div v-if="owner" class="list-group-item rounded cursor-pointer" @click="deleteStory">{{ $t("story.delete")}}</div>
+				<div class="list-group-item rounded cursor-pointer text-muted" @click="closeCtxMenu">{{ $t("story.close")}}</div>
 			</div>
 		</b-modal>
 
@@ -272,7 +272,7 @@
 				<div v-if="viewersHasMore" class="list-group-item text-center border-bottom-0">
 					<button class="btn btn-light font-weight-bold border rounded-pill" @click="viewersLoadMore">Load More</button>
 				</div>
-				<div class="list-group-item text-center rounded cursor-pointer text-muted" @click="closeViewersModal">Close</div>
+				<div class="list-group-item text-center rounded cursor-pointer text-muted" @click="closeViewersModal">{{ $t("story.close")}}</div>
 			</div>
 		</b-modal>
 

+ 36 - 6
resources/lang/en/web.php

@@ -32,8 +32,8 @@ return [
 		'sensitive' => 'Sensitive',
 		'sensitiveContent' => 'Sensitive Content',
 		'sensitiveContentWarning' => 'This post may contain sensitive content',
-
-        'continue' => 'Continue',
+    'loading' => 'Loading...',
+    'continue' => 'Continue',
 	],
 
 	'site' => [
@@ -64,6 +64,8 @@ return [
         'appearance' => 'Appearance',
 		'compose' => 'Create New',
 		'logout' => 'Logout',
+        "createStory" => "Create Story",
+
 
 		// Nav footer
 		'about' => 'About',
@@ -74,7 +76,8 @@ return [
         'legalNotice' => 'Legal Notice',
 
 		// Temporary links
-		'backToPreviousDesign' => 'Go back to previous design'
+		'backToPreviousDesign' => 'Go back to previous design',
+
 	],
 
 	'directMessages' => [
@@ -221,8 +224,35 @@ return [
         'unpinPostConfirm' => 'Are you sure you want to unpin this post?'
 	],
 
-	'story' => [
-		'add' => 'Add Story'
+    'story' => [
+        'add' => 'Add Story',
+        'myStory' => 'My Story',
+        'viewMyStory' => 'View My Story',
+        'goBack' => 'Go Back',
+        'delete' => 'Delete',
+        'crop' => 'Crop',
+        'error' => 'An error occurred, please try again later.',
+        'cropping' => 'Cropping',
+        'storyDuration' => 'Story Duration',
+        'seconds' => 'seconds',
+        'processing' => 'Processing',
+        'shareWithFollowers' => 'Share moments with followers that last 24 hours',
+        'cancel' => 'Cancel',
+        'viewedBy' => 'Viewed by',
+        'next' => 'Next',
+        'zoom' => 'Pan around and pinch to zoom',
+        'options' => 'Options',
+        'allowReplies' => 'Allow Replies',
+        'allowReactions' => 'Allow reactions',
+        'limit' => 'You have reached the limit for new stories',
+        'reactionSent' => 'Reaction sent',
+        'replySent' => 'Reply sent',
+        'expiresIn' => 'Expires in',
+        'viewers' => 'Viewers',
+        'report' => 'Report',
+        'close' => 'Close',
+        'myStories' => 'My Stories',
+        'seeAll' => 'See All',
 	],
 
 	'timeline' => [
@@ -340,5 +370,5 @@ return [
             'enter_filter_title' => 'Enter filter title',
         ],
 
-    ]
+    ],
 ];

+ 33 - 4
resources/lang/pt/web.php

@@ -32,8 +32,8 @@ return [
 		'sensitive' => 'Sensível',
 		'sensitiveContent' => 'Conteúdo sensível',
 		'sensitiveContentWarning' => 'Este post pode conter conteúdo sensível',
-
-        'continue' => 'Continuar',
+    'loading' => 'Carregando...',
+    'continue' => 'Continuar',
 	],
 
 	'site' => [
@@ -64,6 +64,7 @@ return [
         'appearance' => 'Aparência',
 		'compose' => 'Criar novo',
 		'logout' => 'Terminar Sessão',
+        "createStory" => "Criar Story",
 
 		// Nav footer
 		'about' => 'Sobre',
@@ -216,8 +217,36 @@ return [
         "unpinPostConfirm" => "Tem certeza de que deseja desafixar esta publicação?"
 	],
 
-	'story' => [
-		'add' => 'Adicionar Story'
+  'story' => [
+        'add' => 'Adicionar Story',
+        'myStory' => 'Minha Story',
+        'viewMyStory' => 'Ver Minha Story',
+        'goBack' => 'Voltar',
+        'delete' => 'Excluir',
+        'crop' => 'Cortar',
+        'error' => 'Ocorreu um erro, por favor tente novamente mais tarde.',
+        'cropping' => 'Cortando',
+        'storyDuration' => 'Duração da Story',
+        'seconds' => 'segundos',
+        'processing' => 'Processando',
+        'shareWithFollowers' => 'Compartilhe momentos com seguidores que duram 24 horas',
+        'cancel' => 'Cancelar',
+        'viewdBy' => 'Visualizado por',
+        'next' => 'Próximo',
+        'zoom' => 'Mova e pinça para dar zoom',
+        'options' => 'Opções',
+        'allowReplies' => 'Permitir Respostas',
+        'allowReactions' => 'Permitir Reações',
+        'limit' => 'Você atingiu o limite para novas stories',
+        'reactionSent' => 'Reação enviada',
+        'replySent' => 'Resposta enviada',
+        'expiresIn' => 'Expira em',
+        'viewers' => 'Visualizadores',
+        'report' => 'Denunciar',
+        'close' => 'Fechar',
+        'myStories' => 'My Stories',
+        'seeAll' => 'Ver todas as stories',
+
 	],
 
 	'timeline' => [