tags: add translation from recognize
parent
12c556509d
commit
f75b68baaf
|
@ -88,6 +88,12 @@ class PageController extends Controller
|
|||
// Common state
|
||||
self::provideCommonInitialState($this->initialState);
|
||||
|
||||
// Extra translations
|
||||
if (\OCA\Memories\Util::recognizeIsEnabled($this->appManager)) {
|
||||
// Auto translation for tags
|
||||
Util::addTranslations('recognize');
|
||||
}
|
||||
|
||||
$response = new TemplateResponse($this->appName, 'main');
|
||||
$response->setContentSecurityPolicy(self::getCSP());
|
||||
$response->cacheFor(0);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<NcCounterBubble> {{ data.count }} </NcCounterBubble>
|
||||
</div>
|
||||
<div class="name">
|
||||
{{ data.name }}
|
||||
{{ title }}
|
||||
<span class="subtitle" v-if="subtitle"> {{ subtitle }} </span>
|
||||
</div>
|
||||
|
||||
|
@ -75,6 +75,14 @@ export default defineComponent({
|
|||
return API.TAG_PREVIEW(this.data.name);
|
||||
},
|
||||
|
||||
title() {
|
||||
if (this.tag) {
|
||||
return this.t("recognize", this.tag.name);
|
||||
}
|
||||
|
||||
return this.data.name;
|
||||
},
|
||||
|
||||
subtitle() {
|
||||
if (this.album && this.album.user !== getCurrentUser()?.uid) {
|
||||
return `(${this.album.user})`;
|
||||
|
@ -83,6 +91,10 @@ export default defineComponent({
|
|||
return "";
|
||||
},
|
||||
|
||||
tag() {
|
||||
return !this.face && !this.place && !this.album ? this.data : null;
|
||||
},
|
||||
|
||||
face() {
|
||||
return this.data.flag & constants.c.FLAG_IS_FACE_RECOGNIZE ||
|
||||
this.data.flag & constants.c.FLAG_IS_FACE_RECOGNITION
|
||||
|
|
Loading…
Reference in New Issue