diff options
Diffstat (limited to 'apps/comments')
-rw-r--r-- | apps/comments/js/commentmodel.js | 36 | ||||
-rw-r--r-- | apps/comments/js/commentsummarymodel.js | 11 | ||||
-rw-r--r-- | apps/comments/js/filesplugin.js | 11 | ||||
-rw-r--r-- | apps/comments/l10n/nb_NO.js | 6 | ||||
-rw-r--r-- | apps/comments/l10n/nb_NO.json | 6 | ||||
-rw-r--r-- | apps/comments/l10n/sk_SK.js | 28 | ||||
-rw-r--r-- | apps/comments/l10n/sk_SK.json | 28 |
7 files changed, 104 insertions, 22 deletions
diff --git a/apps/comments/js/commentmodel.js b/apps/comments/js/commentmodel.js index e75c79b3f08..3711e53c9f3 100644 --- a/apps/comments/js/commentmodel.js +++ b/apps/comments/js/commentmodel.js @@ -9,7 +9,20 @@ */ (function(OC, OCA) { - var NS_OWNCLOUD = 'http://owncloud.org/ns'; + + _.extend(OC.Files.Client, { + PROPERTY_FILEID: '{' + OC.Files.Client.NS_OWNCLOUD + '}id', + PROPERTY_MESSAGE: '{' + OC.Files.Client.NS_OWNCLOUD + '}message', + PROPERTY_ACTORTYPE: '{' + OC.Files.Client.NS_OWNCLOUD + '}actorType', + PROPERTY_ACTORID: '{' + OC.Files.Client.NS_OWNCLOUD + '}actorId', + PROPERTY_ISUNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}isUnread', + PROPERTY_OBJECTID: '{' + OC.Files.Client.NS_OWNCLOUD + '}objectId', + PROPERTY_OBJECTTYPE: '{' + OC.Files.Client.NS_OWNCLOUD + '}objectType', + PROPERTY_ACTORDISPLAYNAME: '{' + OC.Files.Client.NS_OWNCLOUD + '}actorDisplayName', + PROPERTY_CREATIONDATETIME: '{' + OC.Files.Client.NS_OWNCLOUD + '}creationDateTime', + PROPERTY_MENTIONS: '{' + OC.Files.Client.NS_OWNCLOUD + '}mentions' + }); + /** * @class OCA.Comments.CommentModel * @classdesc @@ -27,16 +40,16 @@ }, davProperties: { - 'id': '{' + NS_OWNCLOUD + '}id', - 'message': '{' + NS_OWNCLOUD + '}message', - 'actorType': '{' + NS_OWNCLOUD + '}actorType', - 'actorId': '{' + NS_OWNCLOUD + '}actorId', - 'actorDisplayName': '{' + NS_OWNCLOUD + '}actorDisplayName', - 'creationDateTime': '{' + NS_OWNCLOUD + '}creationDateTime', - 'objectType': '{' + NS_OWNCLOUD + '}objectType', - 'objectId': '{' + NS_OWNCLOUD + '}objectId', - 'isUnread': '{' + NS_OWNCLOUD + '}isUnread', - 'mentions': '{' + NS_OWNCLOUD + '}mentions' + 'id': OC.Files.Client.PROPERTY_FILEID, + 'message': OC.Files.Client.PROPERTY_MESSAGE, + 'actorType': OC.Files.Client.PROPERTY_ACTORTYPE, + 'actorId': OC.Files.Client.PROPERTY_ACTORID, + 'actorDisplayName': OC.Files.Client.PROPERTY_ACTORDISPLAYNAME, + 'creationDateTime': OC.Files.Client.PROPERTY_CREATIONDATETIME, + 'objectType': OC.Files.Client.PROPERTY_OBJECTTYPE, + 'objectId': OC.Files.Client.PROPERTY_OBJECTID, + 'isUnread': OC.Files.Client.PROPERTY_ISUNREAD, + 'mentions': OC.Files.Client.PROPERTY_MENTIONS }, parse: function(data) { @@ -78,4 +91,3 @@ OCA.Comments.CommentModel = CommentModel; })(OC, OCA); - diff --git a/apps/comments/js/commentsummarymodel.js b/apps/comments/js/commentsummarymodel.js index d405315ca1f..ffabbc30fb4 100644 --- a/apps/comments/js/commentsummarymodel.js +++ b/apps/comments/js/commentsummarymodel.js @@ -9,13 +9,17 @@ */ (function(OC, OCA) { - var NS_OWNCLOUD = 'http://owncloud.org/ns'; + + _.extend(OC.Files.Client, { + PROPERTY_READMARKER: '{' + OC.Files.Client.NS_OWNCLOUD + '}readMarker' + }); + /** * @class OCA.Comments.CommentSummaryModel * @classdesc * * Model containing summary information related to comments - * like the read marker. + * like the read marker. * */ var CommentSummaryModel = OC.Backbone.Model.extend( @@ -37,7 +41,7 @@ _objectId: null, davProperties: { - 'readMarker': '{' + NS_OWNCLOUD + '}readMarker' + 'readMarker': OC.Files.Client.PROPERTY_READMARKER }, /** @@ -62,4 +66,3 @@ OCA.Comments.CommentSummaryModel = CommentSummaryModel; })(OC, OCA); - diff --git a/apps/comments/js/filesplugin.js b/apps/comments/js/filesplugin.js index cc419c18ddb..8c5762065a1 100644 --- a/apps/comments/js/filesplugin.js +++ b/apps/comments/js/filesplugin.js @@ -11,6 +11,11 @@ /* global Handlebars */ (function() { + + _.extend(OC.Files.Client, { + PROPERTY_COMMENTS_UNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread' + }); + var TEMPLATE_COMMENTS_UNREAD = '<a class="action action-comment permanent" title="{{countMessage}}" href="#">' + '<img class="svg" src="{{iconUrl}}"/>' + @@ -52,19 +57,17 @@ fileList.registerTabView(new OCA.Comments.CommentsTabView('commentsTabView')); - var NS_OC = 'http://owncloud.org/ns'; - var oldGetWebdavProperties = fileList._getWebdavProperties; fileList._getWebdavProperties = function() { var props = oldGetWebdavProperties.apply(this, arguments); - props.push('{' + NS_OC + '}comments-unread'); + props.push(OC.Files.Client.PROPERTY_COMMENTS_UNREAD); return props; }; fileList.filesClient.addFileInfoParser(function(response) { var data = {}; var props = response.propStat[0].properties; - var commentsUnread = props['{' + NS_OC + '}comments-unread']; + var commentsUnread = props[OC.Files.Client.PROPERTY_COMMENTS_UNREAD]; if (!_.isUndefined(commentsUnread) && commentsUnread !== '') { data.commentsUnread = parseInt(commentsUnread, 10); } diff --git a/apps/comments/l10n/nb_NO.js b/apps/comments/l10n/nb_NO.js index 40c0c3663ad..a73cdd768f4 100644 --- a/apps/comments/l10n/nb_NO.js +++ b/apps/comments/l10n/nb_NO.js @@ -20,8 +20,14 @@ OC.L10N.register( "Comment" : "Kommentar", "You commented" : "Du kommenterte", "%1$s commented" : "%1$s kommentert", + "{author} commented" : "{author} kommenterte", + "You commented on %1$s" : "Du kommenterte på %1$s", + "You commented on {file}" : "Du kommenterte på {file}", "%1$s commented on %2$s" : "%1$s kommenterte %2$s", + "{author} commented on {file}" : "{author} kommenterte på {file}", "<strong>Comments</strong> for files" : "<strong>Kommentarer</strong> for filer", + "%1$s mentioned you in a comment on “%2$s”" : "%1$s nevnte deg i en kommentar på “%2$s”", + "{user} mentioned you in a comment on “{file}”" : "{user} nevnte deg i en kommentar på “{file}”", "Type in a new comment..." : "Skriv inn en ny kommentar...", "No other comments available" : "Ingen andre kommentarer tilgjengelig", "More comments..." : "Flere kommentarer..", diff --git a/apps/comments/l10n/nb_NO.json b/apps/comments/l10n/nb_NO.json index 00db3510fee..84f83315f25 100644 --- a/apps/comments/l10n/nb_NO.json +++ b/apps/comments/l10n/nb_NO.json @@ -18,8 +18,14 @@ "Comment" : "Kommentar", "You commented" : "Du kommenterte", "%1$s commented" : "%1$s kommentert", + "{author} commented" : "{author} kommenterte", + "You commented on %1$s" : "Du kommenterte på %1$s", + "You commented on {file}" : "Du kommenterte på {file}", "%1$s commented on %2$s" : "%1$s kommenterte %2$s", + "{author} commented on {file}" : "{author} kommenterte på {file}", "<strong>Comments</strong> for files" : "<strong>Kommentarer</strong> for filer", + "%1$s mentioned you in a comment on “%2$s”" : "%1$s nevnte deg i en kommentar på “%2$s”", + "{user} mentioned you in a comment on “{file}”" : "{user} nevnte deg i en kommentar på “{file}”", "Type in a new comment..." : "Skriv inn en ny kommentar...", "No other comments available" : "Ingen andre kommentarer tilgjengelig", "More comments..." : "Flere kommentarer..", diff --git a/apps/comments/l10n/sk_SK.js b/apps/comments/l10n/sk_SK.js index 808e0bff4d4..ed68f8f11ed 100644 --- a/apps/comments/l10n/sk_SK.js +++ b/apps/comments/l10n/sk_SK.js @@ -1,8 +1,34 @@ OC.L10N.register( "comments", { + "Comments" : "Komentáre", + "Unknown user" : "Neznámy používateľ", + "New comment …" : "Nový komentár ...", + "Delete comment" : "Zmazať komentár", + "Post" : "Odoslať", "Cancel" : "Zrušiť", + "Edit comment" : "Upraviť komentár", + "[Deleted user]" : "[Zmazaný užívateľ]", + "No comments yet, start the conversation!" : "Žiadne komentáre, začnite konverzáciu!", + "More comments …" : "Ďalšie komentáre ...", "Save" : "Uložiť", - "Comment" : "Komentár" + "Allowed characters {count} of {max}" : "Počet povolených znakov {count} z {max}", + "Error occurred while retrieving comment with id {id}" : "Pri načítavaní komentára s id {id} nastala chyba", + "Error occurred while updating comment with id {id}" : "Pri aktualizovaní komentára s id {id} nastala chyba", + "Error occurred while posting comment" : "Pri odosielaní komentára nastala chyba", + "_%n unread comment_::_%n unread comments_" : ["%n neprečítaný komentár","%n neprečítaných komentárov","%n neprečítaných komentárov"], + "Comment" : "Komentár", + "You commented" : "Komentovali ste", + "%1$s commented" : "%1$s komentoval", + "{author} commented" : "{author} komentoval", + "You commented on %1$s" : "Komentovali ste %1$s", + "You commented on {file}" : "Komentovali ste {file}", + "%1$s commented on %2$s" : "%1$s komentoval %2$s", + "{author} commented on {file}" : "{author} komentoval {file}", + "<strong>Comments</strong> for files" : "<strong>Komentáre</strong> pre súbory", + "Type in a new comment..." : "Zadať nový komentár...", + "No other comments available" : "Žiadne ďalšie komentáre nie sú dostupné", + "More comments..." : "Ďalšie komentáre...", + "{count} unread comments" : "{count} neprečítaných komentárov" }, "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"); diff --git a/apps/comments/l10n/sk_SK.json b/apps/comments/l10n/sk_SK.json index 649d040de7a..f85f7dfb3e2 100644 --- a/apps/comments/l10n/sk_SK.json +++ b/apps/comments/l10n/sk_SK.json @@ -1,6 +1,32 @@ { "translations": { + "Comments" : "Komentáre", + "Unknown user" : "Neznámy používateľ", + "New comment …" : "Nový komentár ...", + "Delete comment" : "Zmazať komentár", + "Post" : "Odoslať", "Cancel" : "Zrušiť", + "Edit comment" : "Upraviť komentár", + "[Deleted user]" : "[Zmazaný užívateľ]", + "No comments yet, start the conversation!" : "Žiadne komentáre, začnite konverzáciu!", + "More comments …" : "Ďalšie komentáre ...", "Save" : "Uložiť", - "Comment" : "Komentár" + "Allowed characters {count} of {max}" : "Počet povolených znakov {count} z {max}", + "Error occurred while retrieving comment with id {id}" : "Pri načítavaní komentára s id {id} nastala chyba", + "Error occurred while updating comment with id {id}" : "Pri aktualizovaní komentára s id {id} nastala chyba", + "Error occurred while posting comment" : "Pri odosielaní komentára nastala chyba", + "_%n unread comment_::_%n unread comments_" : ["%n neprečítaný komentár","%n neprečítaných komentárov","%n neprečítaných komentárov"], + "Comment" : "Komentár", + "You commented" : "Komentovali ste", + "%1$s commented" : "%1$s komentoval", + "{author} commented" : "{author} komentoval", + "You commented on %1$s" : "Komentovali ste %1$s", + "You commented on {file}" : "Komentovali ste {file}", + "%1$s commented on %2$s" : "%1$s komentoval %2$s", + "{author} commented on {file}" : "{author} komentoval {file}", + "<strong>Comments</strong> for files" : "<strong>Komentáre</strong> pre súbory", + "Type in a new comment..." : "Zadať nový komentár...", + "No other comments available" : "Žiadne ďalšie komentáre nie sú dostupné", + "More comments..." : "Ďalšie komentáre...", + "{count} unread comments" : "{count} neprečítaných komentárov" },"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" }
\ No newline at end of file |