From 7159d6118e04ba543b8e6e3347438b31fd87ecc8 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Fri, 11 Jul 2014 15:16:26 +0200 Subject: reduce share action text to the user name only --- core/js/share.js | 4 ++-- core/js/tests/specs/shareSpec.js | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'core/js') diff --git a/core/js/share.js b/core/js/share.js index 42646939942..e8d486055b0 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -191,7 +191,7 @@ OC.Share={ var parts = this._REMOTE_OWNER_REGEXP.exec(owner); if (!parts) { // display as is, most likely to be a simple owner name - return t('files_sharing', 'Shared by {owner}', {owner: escapeHTML(owner)}); + return escapeHTML(owner); } var userName = parts[1]; @@ -211,7 +211,7 @@ OC.Share={ html += '@' + escapeHTML(userDomain) + ''; } html += ''; - return t('files_sharing', 'Shared by {owner}', {owner: html}); + return html; }, /** * Marks/unmarks a given file as shared by changing its action icon diff --git a/core/js/tests/specs/shareSpec.js b/core/js/tests/specs/shareSpec.js index ed04df3fe6f..00a88ba36ef 100644 --- a/core/js/tests/specs/shareSpec.js +++ b/core/js/tests/specs/shareSpec.js @@ -403,39 +403,39 @@ describe('OC.Share tests', function() { } it('displays the local share owner as is', function() { - checkOwner('User One', 'Shared by User One', null); + checkOwner('User One', 'User One', null); }); it('displays the user name part of a remote share owner', function() { checkOwner( 'User One@someserver.com', - 'Shared by User One', + 'User One', 'User One@someserver.com' ); checkOwner( 'User One@someserver.com/', - 'Shared by User One', + 'User One', 'User One@someserver.com' ); checkOwner( 'User One@someserver.com/root/of/owncloud', - 'Shared by User One', + 'User One', 'User One@someserver.com' ); }); it('displays the user name part with domain of a remote share owner', function() { checkOwner( 'User One@example.com@someserver.com', - 'Shared by User One@example.com', + 'User One@example.com', 'User One@example.com@someserver.com' ); checkOwner( 'User One@example.com@someserver.com/', - 'Shared by User One@example.com', + 'User One@example.com', 'User One@example.com@someserver.com' ); checkOwner( 'User One@example.com@someserver.com/root/of/owncloud', - 'Shared by User One@example.com', + 'User One@example.com', 'User One@example.com@someserver.com' ); }); -- cgit v1.2.3