Frontend: Add translate tags

This commit is contained in:
Theresa Gresch 2020-06-15 12:45:53 +02:00
parent 3556e3c442
commit aac52d3735
5 changed files with 74 additions and 54 deletions

View file

@ -315,10 +315,10 @@
</v-list-tile-content>
</v-list-tile>
<v-list-tile to="/library/files" @click="" class="p-navigation-files" v-show="$config.feature('files')">
<v-list-tile to="/library/files" @click="" class="p-navigation-originals" v-show="$config.feature('files')">
<v-list-tile-content>
<v-list-tile-title>
<translate key="Files">Files</translate>
<translate key="Originals">Originals</translate>
<span v-show="config.count.files > 0" class="p-navigation-count">{{ config.count.files }}</span>
</v-list-tile-title>
</v-list-tile-content>

View file

@ -23,14 +23,14 @@
item-text="Title"
item-value="UID"
:allow-overflow="false"
label="Select albums or create a new one"
:label="labels.album"
return-object
>
<template v-slot:no-data>
<v-list-tile>
<v-list-tile-content>
<v-list-tile-title>
Press <kbd>enter</kbd> to create a new album.
<translate>Press</translate> <kbd>enter</kbd> <translate>to create a new album.</translate>
</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
@ -48,12 +48,12 @@
</v-chip>
</template>
</v-combobox>
<span v-else-if="failed">Upload failed</span>
<span v-else-if="failed"><translate>Upload failed</translate></span>
<span v-else-if="total > 0 && completed < 100">
Uploading {{current}} of {{total}}...
<translate>Uploading</translate> {{current}} <translate>of</translate> {{total}}...
</span>
<span v-else-if="indexing">Upload complete. Indexing...</span>
<span v-else-if="completed === 100">Done.</span>
<span v-else-if="indexing"><translate>Upload complete. Indexing...</translate></span>
<span v-else-if="completed === 100"><translate>Done.</translate></span>
</p>
@ -62,12 +62,12 @@
<p class="body-1" v-if="safe">
Please don't upload photos containing offensive content. Uploads
that may contain such images will be rejected automatically.
<translate>Please don't upload photos containing offensive content. Uploads
that may contain such images will be rejected automatically.</translate>
</p>
<p class="body-1" v-if="review">
Low-quality photos require a review before they appear in search results.
<translate>Low-quality photos require a review before they appear in search results.</translate>
</p>
<v-btn
@ -113,6 +113,9 @@
started: 0,
review: this.$config.feature("review"),
safe: !this.$config.get("uploadNSFW"),
labels: {
album: this.$gettext("Select albums or create a new one"),
},
}
},
methods: {

View file

@ -39,7 +39,7 @@
:disabled="disabled"
:rules="[textRule]"
hide-details
label="Title"
:label="labels.title"
placeholder=""
color="secondary-dark"
browser-autocomplete="off"
@ -54,7 +54,7 @@
:disabled="disabled"
:value="timeLocalFormatted"
browser-autocomplete="off"
label="Local Time"
:label="labels.localtime"
readonly
hide-details
color="secondary-dark"
@ -74,7 +74,7 @@
<v-text-field
:disabled="disabled"
:value="timeFormatted"
label="UTC Time"
:label="labels.utctime"
readonly
hide-details
v-on="on"
@ -103,7 +103,7 @@
:disabled="disabled"
:value="dateFormatted"
browser-autocomplete="off"
label="UTC Date"
:label="labels.utcdate"
readonly
hide-details
v-on="on"
@ -139,7 +139,7 @@
:disabled="disabled"
hide-details
browser-autocomplete="off"
label="Latitude"
:label="labels.latitude"
placeholder=""
color="secondary-dark"
v-model="model.Lat"
@ -152,7 +152,7 @@
:disabled="disabled"
hide-details
browser-autocomplete="off"
label="Longitude"
:label="labels.longitude"
placeholder=""
color="secondary-dark"
v-model="model.Lng"
@ -165,7 +165,7 @@
:disabled="disabled"
hide-details
browser-autocomplete="off"
label="Altitude (m)"
:label="labels.altitude"
placeholder=""
color="secondary-dark"
v-model="model.Altitude"
@ -221,7 +221,7 @@
:disabled="disabled"
hide-details
browser-autocomplete="off"
label="Exposure"
:label="labels.exposure"
placeholder=""
color="secondary-dark"
v-model="model.Exposure"
@ -249,7 +249,7 @@
:disabled="disabled"
hide-details
browser-autocomplete="off"
label="F Number"
:label="labels.fnumber"
placeholder=""
color="secondary-dark"
v-model="model.FNumber"
@ -262,7 +262,7 @@
:disabled="disabled"
hide-details
browser-autocomplete="off"
label="Focal Length"
:label="labels.focallength"
placeholder=""
color="secondary-dark"
v-model="model.FocalLength"
@ -277,7 +277,7 @@
hide-details
browser-autocomplete="off"
auto-grow
label="Subject"
:label="labels.subject"
placeholder=""
:rows="1"
color="secondary-dark"
@ -292,7 +292,7 @@
:rules="[textRule]"
hide-details
browser-autocomplete="off"
label="Artist"
:label="labels.artist"
placeholder=""
color="secondary-dark"
v-model="model.Details.Artist"
@ -306,7 +306,7 @@
:rules="[textRule]"
hide-details
browser-autocomplete="off"
label="Copyright"
:label="labels.copyright"
placeholder=""
color="secondary-dark"
v-model="model.Details.Copyright"
@ -321,7 +321,7 @@
hide-details
browser-autocomplete="off"
auto-grow
label="License"
:label="labels.license"
placeholder=""
:rows="1"
color="secondary-dark"
@ -336,7 +336,7 @@
hide-details
browser-autocomplete="off"
auto-grow
label="Description"
:label="labels.description"
placeholder=""
:rows="1"
color="secondary-dark"
@ -351,7 +351,7 @@
hide-details
browser-autocomplete="off"
auto-grow
label="Keywords"
:label="labels.keywords"
placeholder=""
:rows="1"
color="secondary-dark"
@ -366,7 +366,7 @@
hide-details
browser-autocomplete="off"
auto-grow
label="Notes"
:label="labels.notes"
placeholder=""
:rows="1"
color="secondary-dark"
@ -383,11 +383,11 @@
<v-btn color="secondary-dark" depressed dark @click.stop="save(false)"
class="p-photo-dialog-confirm action-approve">
<span v-if="$config.feature('review') && model.Quality < 3">Approve</span>
<span v-else>Apply</span>
<span v-else><translate>Apply</translate></span>
</v-btn>
<v-btn color="secondary-dark" depressed dark @click.stop="save(true)"
class="p-photo-dialog-confirm hidden-xs-only action-ok">
<span>OK</span>
<span><translate>OK</translate></span>
<v-icon right dark>done</v-icon>
</v-btn>
</v-flex>
@ -437,6 +437,23 @@
after: this.$gettext("Taken after"),
language: this.$gettext("Language"),
timezone: this.$gettext("Time Zone"),
title: this.$gettext("Title"),
localtime: this.$gettext("Local Time"),
utctime: this.$gettext("UTC Time"),
utcdate: this.$gettext("UTC Date"),
latitude: this.$gettext("Latitude"),
longitude: this.$gettext("Longitude"),
altitude: this.$gettext("Altitude (m)"),
exposure: this.$gettext("Exposure"),
fnumber: this.$gettext("F Number"),
focallength: this.$gettext("Focal Length"),
subject: this.$gettext("Subject"),
artist: this.$gettext("Artist"),
copyright: this.$gettext("Copyright"),
license: this.$gettext("License"),
description: this.$gettext("Description"),
keywords: this.$gettext("Keywords"),
notes: this.$gettext("Notes"),
},
showDatePicker: false,
showTimePicker: false,

View file

@ -4,27 +4,27 @@
<table class="v-datatable v-table theme--light">
<tbody>
<tr>
<td>UID</td>
<td><translate>UID</translate></td>
<td>{{ model.UID | uppercase }}</td>
</tr>
<tr v-if="model.DocumentID">
<td>Document ID</td>
<td><translate>Document ID</translate></td>
<td>{{ model.DocumentID | uppercase }}</td>
</tr>
<tr>
<td>Type</td>
<td><translate>Type</translate></td>
<td>{{ model.Type | capitalize }}</td>
</tr>
<tr v-if="model.Path">
<td>Path</td>
<td><translate>Path</translate></td>
<td>{{ model.Path }}</td>
</tr>
<tr>
<td>Name</td>
<td><translate>Name</translate></td>
<td>{{ model.Name }}</td>
</tr>
<tr v-if="model.OriginalName">
<td>Original Name</td>
<td><translate>Original Name</translate></td>
<td>
<v-text-field
@change="save"
@ -35,15 +35,15 @@
</td>
</tr>
<tr>
<td>Title</td>
<td><translate>Title</translate></td>
<td>{{ model.Title }}</td>
</tr>
<tr v-if="model.TitleSrc">
<td>Title Source</td>
<td><translate>Title Source</translate></td>
<td>{{ model.TitleSrc | capitalize }}</td>
</tr>
<tr v-if="model.TakenAcc">
<td>Year</td>
<td><translate>Year</translate></td>
<td>
<v-text-field
flat solo dense hide-details v-model="model.Year"
@ -53,7 +53,7 @@
</td>
</tr>
<tr v-if="model.TakenAcc">
<td>Month</td>
<td><translate>Month</translate></td>
<td>
<v-select
label="Month"
@ -68,22 +68,22 @@
</td>
</tr>
<tr>
<td>Quality Score</td>
<td><translate>Quality Score</translate></td>
<td>
<v-rating v-model="model.Quality" :length="7" readonly small></v-rating>
</td>
</tr>
<tr>
<td>Resolution</td>
<td><translate>Resolution</translate></td>
<td>{{ model.Resolution }} MP</td>
</tr>
<tr v-if="model.CameraSerial">
<td>Camera Serial</td>
<td><translate>Camera Serial</translate></td>
<td>{{ model.CameraSerial }}
</td>
</tr>
<tr>
<td>Favorite</td>
<td><translate>Favorite</translate></td>
<td>
<v-switch
@change="save"
@ -94,7 +94,7 @@
</td>
</tr>
<tr>
<td>Private</td>
<td><translate>Private</translate></td>
<td>
<v-switch
@change="save"
@ -105,31 +105,31 @@
</td>
</tr>
<tr>
<td>Created</td>
<td><translate>Created</translate></td>
<td>
{{ model.CreatedAt | luxon:format('http') }}
</td>
</tr>
<tr>
<td>Updated</td>
<td><translate>Updated</translate></td>
<td>
{{ model.UpdatedAt | luxon:format('http') }}
</td>
</tr>
<tr v-if="model.EditedAt">
<td>Edited</td>
<td><translate>Edited</translate></td>
<td>
{{ model.EditedAt | luxon:format('http') }}
</td>
</tr>
<tr v-if="model.MaintainedAt">
<td>Maintained</td>
<td><translate>Maintained</translate></td>
<td>
{{ model.MaintainedAt | luxon:format('http') }}
</td>
</tr>
<tr v-if="model.DeletedAt">
<td>Archived</td>
<td><translate>Archived</translate></td>
<td>
{{ model.DeletedAt | luxon:format('http') }}
</td>

View file

@ -196,8 +196,8 @@
class="ma-0 pa-0 input-files"
v-model="settings.features.files"
color="secondary-dark"
:label="labels.files"
:hint="hints.files"
:label="labels.originals"
:hint="hints.originals"
prepend-icon="insert_drive_file"
persistent-hint
>
@ -383,7 +383,7 @@
private: this.$gettext("Hide Private"),
review: this.$gettext("Quality Filter"),
places: this.$gettext("Places"),
files: this.$gettext("Files"),
originals: this.$gettext("Originals"),
moments: this.$gettext("Moments"),
labels: this.$gettext("Labels"),
import: this.$gettext("Import"),
@ -401,7 +401,7 @@
group: this.$gettext("Files with sequential names like 'IMG_1234 (2)' or 'IMG_1234 copy 2' belong to the same photo."),
move: this.$gettext("Move files from import to originals to save storage. Unsupported file types will never be deleted, they remain in their current location."),
places: this.$gettext("Search and display photos on a map."),
files: this.$gettext("Browse indexed files in Library."),
originals: this.$gettext("Display indexed files in Originals"),
moments: this.$gettext("Let PhotoPrism create albums from past events."),
labels: this.$gettext("Browse and edit image classification labels."),
import: this.$gettext("Imported files will be sorted by date and given a unique name."),