fix: localization entries

This commit is contained in:
Aetherinox 2024-04-27 01:50:04 -07:00
parent 8d96bd4ccd
commit 6d63d519f1
No known key found for this signature in database
GPG Key ID: CB5C4C30CD0D4028
2 changed files with 8 additions and 3 deletions

View File

@ -739,7 +739,7 @@ class DetailsView extends View {
} }
const input = $('<input/>') const input = $('<input/>')
.addClass('details__header-title-input') .addClass('details__header-title-input')
.attr({ autocomplete: 'off', spellcheck: 'false', placeholder: 'Title' }) .attr({ autocomplete: 'off', spellcheck: 'false', placeholder: Locale.title })
.val(this.model.title); .val(this.model.title);
input.bind({ input.bind({
blur: this.titleInputBlur.bind(this), blur: this.titleInputBlur.bind(this),
@ -788,11 +788,16 @@ class DetailsView extends View {
if (this.model.title instanceof kdbxweb.ProtectedValue) { if (this.model.title instanceof kdbxweb.ProtectedValue) {
title = kdbxweb.ProtectedValue.fromString(title); title = kdbxweb.ProtectedValue.fromString(title);
} }
if (title !== this.model.title) { if (title !== this.model.title) {
this.model.setField('Title', title); this.model.setField('Title', title);
this.entryUpdated(true); this.entryUpdated(true);
} }
const newTitle = $('<h1 class="details__header-title"></h1>').text(title || '(no title)');
const newTitle = $('<h1 class="details__header-title"></h1>').text(
title || `(${Locale.noTitle})`
);
this.$el.find('.details__header-title-input').replaceWith(newTitle); this.$el.find('.details__header-title-input').replaceWith(newTitle);
} }

View File

@ -19,7 +19,7 @@
</span> </span>
{{/if}} {{/if}}
</i> </i>
<h1 class="details__header-title">{{#if title}}{{title}}{{else}}(no title){{/if}}</h1> <h1 class="details__header-title">{{#if title}}{{title}}{{else}}({{res 'noTitle'}}){{/if}}</h1>
{{#if customIcon}} {{#if customIcon}}
<div class="details__header-icon details__header-icon--icon" <div class="details__header-icon details__header-icon--icon"
{{#if canEditIcon}}title="{{res 'detSetIcon'}}"{{/if}} {{#if canEditIcon}}title="{{res 'detSetIcon'}}"{{/if}}