Fix translation again and remove unuser arguments

This commit is contained in:
Matias De lellis
2020-06-16 17:04:49 -03:00
parent c6d7b99974
commit 8c6b0a2392
3 changed files with 15 additions and 12 deletions

View File

@@ -488,10 +488,7 @@ View.prototype = {
if (result === true) { if (result === true) {
self._editableShares(newShares, []); self._editableShares(newShares, []);
} }
}, }
true,
t('quicknotes', 'Shares'),
false
); );
}); });
@@ -524,10 +521,7 @@ View.prototype = {
if (result === true) { if (result === true) {
self._editableTags(newTags); self._editableTags(newTags);
} }
}, }
true,
t('quicknotes', 'Tags'),
false
); );
}); });
@@ -1015,10 +1009,19 @@ new OCA.Search(search, function() {
search(''); search('');
}); });
Handlebars.registerHelper('SW', function(user) {
/**
* Add Helpers to handlebars
*/
Handlebars.registerHelper('tSW', function(user) {
return t('quicknotes', 'Shared with {user}', {user: user}); return t('quicknotes', 'Shared with {user}', {user: user});
}); });
Handlebars.registerHelper('tSB', function(user) {
return t('quicknotes', 'Shared by {user}', {user: user});
});
/* /*
* Create modules * Create modules

View File

@@ -15,7 +15,7 @@
<div class='note-body'> <div class='note-body'>
<div> <div>
{{#if is_shared}} {{#if is_shared}}
<div class="icon-header-note icon-share" title="Shared by {{ userid }}"></div> <div class="icon-header-note icon-share" title="{{tSB userid }}"></div>
<div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete note"}}"></div> <div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete note"}}"></div>
{{else}} {{else}}
{{#if ispinned}} {{#if ispinned}}
@@ -34,7 +34,7 @@
</div> </div>
<div class='note-shares'> <div class='note-shares'>
{{#each shared_with}} {{#each shared_with}}
<div class="icon-user slim-share" share-id="{{ shared_user }}" title="{{SW shared_user}}">{{{ shared_user }}}</div> <div class="icon-user slim-share" share-id="{{ shared_user }}" title="{{tSW shared_user}}">{{{ shared_user }}}</div>
{{/each}} {{/each}}
</div> </div>
<div class='note-tags'> <div class='note-tags'>

View File

@@ -1,5 +1,5 @@
<div class='note-shares'> <div class='note-shares'>
{{#each shared_with}} {{#each shared_with}}
<div class="icon-user slim-share" share-id="{{ shared_user }}" title="{{SW shared_user}}">{{{ shared_user }}}</div> <div class="icon-user slim-share" share-id="{{ shared_user }}" title="{{tSW shared_user}}">{{{ shared_user }}}</div>
{{/each}} {{/each}}
</div> </div>