From 7fbbf8b4aabd9e17e21d88a288ca0811e76fbbfe Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 1 Jun 2016 14:09:43 +0300 Subject: [PATCH 1/2] remove println Former-commit-id: 2bfd90cec410750bd31b9e487cc236192ac8b7ae --- src/status_im/utils/subs.cljs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/status_im/utils/subs.cljs b/src/status_im/utils/subs.cljs index 3be283c37e..60bb24c53b 100644 --- a/src/status_im/utils/subs.cljs +++ b/src/status_im/utils/subs.cljs @@ -5,7 +5,6 @@ "Creates subscrition that cheks if collection (map or set) contains element" [collection] (fn [db [_ element]] - (println "WWWWWWWWWW" (type db)) (-> (collection @db) (contains? element) (reaction)))) From 4d5c5755c6ab4b74c7ed5c5c35d7216404ac0629 Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Wed, 1 Jun 2016 14:44:04 +0300 Subject: [PATCH 2/2] fix translation pluralization Former-commit-id: a46f60c854a6d17d982da3ffdc62ae186a8fa981 --- src/status_im/chat/screen.cljs | 16 ++++++++-------- src/status_im/i18n.cljs | 3 +++ src/status_im/translations/en.cljs | 9 ++++++++- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/status_im/chat/screen.cljs b/src/status_im/chat/screen.cljs index 8c20bb1136..3ff250e238 100644 --- a/src/status_im/chat/screen.cljs +++ b/src/status_im/chat/screen.cljs @@ -3,12 +3,12 @@ (:require [re-frame.core :refer [subscribe dispatch]] [clojure.string :as s] [status-im.components.react :refer [view - text - image - icon - touchable-highlight - list-view - list-item]] + text + image + icon + touchable-highlight + list-view + list-item]] [status-im.components.chat-icon.screen :refer [chat-icon-view-action chat-icon-view-menu-item]] [status-im.chat.styles.screen :as st] @@ -18,7 +18,7 @@ [status-im.components.toolbar :refer [toolbar]] [status-im.chat.views.message :refer [chat-message]] [status-im.chat.views.new-message :refer [chat-message-new]] - [status-im.i18n :refer [label]])) + [status-im.i18n :refer [label label-pluralize]])) (defn contacts-by-identity [contacts] @@ -186,7 +186,7 @@ [icon :group st/group-icon] [text {:style st/members} (let [cnt (inc (count @contacts))] - (label :t/members {:count cnt}))]] + (label-pluralize cnt :t/members))]] ;; TODO stub data: last activity [text {:style st/last-activity} (label :t/last-active)])]))) diff --git a/src/status_im/i18n.cljs b/src/status_im/i18n.cljs index 9abde5c46e..de557041fc 100644 --- a/src/status_im/i18n.cljs +++ b/src/status_im/i18n.cljs @@ -11,6 +11,9 @@ (defn label [path & options] (.t js/I18n (name path) (clj->js options))) +(defn label-pluralize [count path & options] + (.p js/I18n count (name path) (clj->js options))) + (comment (defn deep-merge [& maps] (if (every? map? maps) diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index be71f9037b..cf3424d440 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -18,7 +18,8 @@ :and-you "and you" :search-chat "Search chat" :members {:one "1 member, 1 active" - :other "{{count}} members, {{count}} active"} + :other "{{count}} members, {{count}} active" + :zero "no members"} :last-active "Active a minute ago" ;profile @@ -70,6 +71,7 @@ ;contacts :contacts "Contacts" :no-name "Noname" + :new-contact "New Contact" ;group-settings :remove "Remove" @@ -112,4 +114,9 @@ :removed "removed" :You "You" + ;new-contact + :import-qr "Import from QR" + :contact-name "Contact Name" + :contact-address "Contact Address" + }) \ No newline at end of file