From e262c2334de9a259e67ffeec6aeead45667148ab Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Thu, 26 Oct 2017 17:05:57 +0200
Subject: [PATCH] [fix] Page comment: make sure to bind total

---
 www/plugins/es/i18n/locale-en-GB.json                 | 1 -
 www/plugins/es/i18n/locale-en.json                    | 1 -
 www/plugins/es/i18n/locale-es-ES.json                 | 1 -
 www/plugins/es/i18n/locale-fr-FR.json                 | 1 -
 www/plugins/es/i18n/locale-nl-NL.json                 | 1 -
 www/plugins/es/js/controllers/registry-controllers.js | 1 +
 www/plugins/es/templates/common/view_comments.html    | 4 ++--
 7 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/www/plugins/es/i18n/locale-en-GB.json b/www/plugins/es/i18n/locale-en-GB.json
index e8096bb4..f61f78fb 100644
--- a/www/plugins/es/i18n/locale-en-GB.json
+++ b/www/plugins/es/i18n/locale-en-GB.json
@@ -108,7 +108,6 @@
   },
   "COMMENTS": {
     "DIVIDER": "Comments",
-    "DIVIDER_WITH_TOTAL": "Comments ({{total}})",
     "SHOW_MORE_COMMENTS": "Show previous comments",
     "COMMENT_HELP": "Your comment, question...",
     "COMMENT_HELP_REPLY_TO": "Your answer...",
diff --git a/www/plugins/es/i18n/locale-en.json b/www/plugins/es/i18n/locale-en.json
index e8096bb4..f61f78fb 100644
--- a/www/plugins/es/i18n/locale-en.json
+++ b/www/plugins/es/i18n/locale-en.json
@@ -108,7 +108,6 @@
   },
   "COMMENTS": {
     "DIVIDER": "Comments",
-    "DIVIDER_WITH_TOTAL": "Comments ({{total}})",
     "SHOW_MORE_COMMENTS": "Show previous comments",
     "COMMENT_HELP": "Your comment, question...",
     "COMMENT_HELP_REPLY_TO": "Your answer...",
diff --git a/www/plugins/es/i18n/locale-es-ES.json b/www/plugins/es/i18n/locale-es-ES.json
index 0f426a80..a785e12b 100644
--- a/www/plugins/es/i18n/locale-es-ES.json
+++ b/www/plugins/es/i18n/locale-es-ES.json
@@ -108,7 +108,6 @@
   },
   "COMMENTS": {
     "DIVIDER": "Comentarios",
-    "DIVIDER_WITH_TOTAL": "Comentarios ({{total}})",
     "SHOW_MORE_COMMENTS": "Visualizar los comentarios anteriores",
     "COMMENT_HELP": "Su comentario, preguntas, etc.",
     "COMMENT_HELP_REPLY_TO": "Su repuesta…",
diff --git a/www/plugins/es/i18n/locale-fr-FR.json b/www/plugins/es/i18n/locale-fr-FR.json
index c147ec51..95408e80 100644
--- a/www/plugins/es/i18n/locale-fr-FR.json
+++ b/www/plugins/es/i18n/locale-fr-FR.json
@@ -108,7 +108,6 @@
   },
   "COMMENTS": {
     "DIVIDER": "Commentaires",
-    "DIVIDER_WITH_TOTAL": "Commentaires ({{total}})",
     "SHOW_MORE_COMMENTS": "Afficher les commentaires précédents",
     "COMMENT_HELP": "Votre commentaire, question, etc.",
     "COMMENT_HELP_REPLY_TO": "Votre réponse...",
diff --git a/www/plugins/es/i18n/locale-nl-NL.json b/www/plugins/es/i18n/locale-nl-NL.json
index a452b1cc..9a1cdeb7 100644
--- a/www/plugins/es/i18n/locale-nl-NL.json
+++ b/www/plugins/es/i18n/locale-nl-NL.json
@@ -34,7 +34,6 @@
   },
   "COMMENTS": {
     "DIVIDER": "Commentaren",
-    "DIVIDER_WITH_TOTAL": "Commentaren ({{total}})",
     "SHOW_MORE_COMMENTS": "Toon eerder commentaren",
     "COMMENT_HELP": "Jouw commentaar, vraag...",
     "COMMENT_HELP_REPLY_TO": "Jouw antwoord...",
diff --git a/www/plugins/es/js/controllers/registry-controllers.js b/www/plugins/es/js/controllers/registry-controllers.js
index a9fa7da9..fd6f067d 100644
--- a/www/plugins/es/js/controllers/registry-controllers.js
+++ b/www/plugins/es/js/controllers/registry-controllers.js
@@ -201,6 +201,7 @@ function ESRegistryLookupController($scope, $focus, $timeout, $filter,
       // pubkey : use a special 'term', because of 'non indexed' field
       if (BMA.regexp.PUBKEY.test(text /*case sensitive*/)) {
         filters.push({term : { issuer: text}});
+        filters.push({term : { pubkey: text}});
       }
       else {
         text = text.toLowerCase();
diff --git a/www/plugins/es/templates/common/view_comments.html b/www/plugins/es/templates/common/view_comments.html
index b3668a7c..84de35c5 100644
--- a/www/plugins/es/templates/common/view_comments.html
+++ b/www/plugins/es/templates/common/view_comments.html
@@ -3,8 +3,8 @@
 
   <div class="item item-divider">
     <i class="icon ion-chatboxes"></i>
-    <span ng-if="!comments.result.length">{{'COMMENTS.DIVIDER' | translate}}</span>
-    <span ng-if="comments.result.length">{{'COMMENTS.DIVIDER_WITH_TOTAL' | translate:comments}}</span>
+    <span translate>COMMENTS.DIVIDER</span>
+    <span class="gray" ng-if="comments.total">({{comments.total}})</span>
   </div>
 
   <span class="item item-more-comments"
-- 
GitLab