From c64b15766624fe1c33fcdbcc8ae624f51c825fdf Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Wed, 25 May 2016 14:59:19 +0300 Subject: [PATCH] removed unneeded translations Former-commit-id: 930d201764c042aced8178499102dc937ad5b249 --- src/status_im/chat/sign_up.cljs | 70 +++++++++++++++--------------- src/status_im/models/commands.cljs | 16 +++---- src/status_im/translations/en.cljs | 28 ++++-------- 3 files changed, 52 insertions(+), 62 deletions(-) diff --git a/src/status_im/chat/sign_up.cljs b/src/status_im/chat/sign_up.cljs index 5026b4914f..066216a3eb 100644 --- a/src/status_im/chat/sign_up.cljs +++ b/src/status_im/chat/sign_up.cljs @@ -18,8 +18,8 @@ (defn send-console-msg [text] {:msg-id (random/id) - :from (t :me) - :to (t :console) + :from "me" + :to "console" :content text :content-type text-content-type :outgoing true}) @@ -36,8 +36,8 @@ :content (t :sign-up.contacts-syncronized) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) (dispatch [:set-signed-up true])) (defn sync-contacts [] @@ -50,8 +50,8 @@ :content (:message body) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) (when (:confirmed body) (dispatch [:stop-listening-confirmation-code-sms]) (sync-contacts) @@ -74,8 +74,8 @@ (t :sign-up.confirmation-code)) :content-type content-type-command-request :outgoing false - :from (t :console) - :to (t :me)}]))) + :from "console" + :to "me"}]))) (defn handle-sms [{body :body}] (when-let [matches (re-matches #"(\d{4})" body)] @@ -98,22 +98,22 @@ :content (t :sign-up.password-saved) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) (dispatch [:received-msg {:msg-id (random/id) :content (t :sign-up.generate-passphrase) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) (dispatch [:received-msg {:msg-id (random/id) :content (t :sign-up.passphrase) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) ;; TODO generate passphrase (let [passphrase (str "The brash businessman's braggadocio and public squabbing with " "candidates in the US presidential election")] @@ -122,15 +122,15 @@ :content passphrase :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}])) + :from "console" + :to "me"}])) (dispatch [:received-msg {:msg-id "8" :content (t :sign-up.written-down) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) ;; TODO highlight '!phone' (let [msg-id (random/id)] (dispatch [:received-msg @@ -140,18 +140,18 @@ (t :sign-up.phone-number-required)) :content-type content-type-command-request :outgoing false - :from (t :console) - :to (t :me)}]))) + :from "console" + :to "me"}]))) (def intro-status {:msg-id "intro-status" :content (t :sign-up.intro-status) :delivery-status "seen" - :from (t :console) - :chat-id (t :console) + :from "console" + :chat-id "console" :content-type content-type-status :outgoing false - :to (t :me)}) + :to "me"}) (defn intro [db] (dispatch [:received-msg intro-status]) @@ -160,15 +160,15 @@ :content (t :sign-up.intro-message1) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) (dispatch [:received-msg {:msg-id "intro-message2" :content (t :sign-up.intro-message2) :content-type text-content-type :outgoing false - :from (t :console) - :to (t :me)}]) + :from "console" + :to "me"}]) (let [msg-id "into-message3"] (dispatch [:received-msg {:msg-id msg-id @@ -177,18 +177,18 @@ (t :sign-up.keypair-generated)) :content-type content-type-command-request :outgoing false - :from (t :console) - :to (t :me)}])) + :from "console" + :to "me"}])) db) (def console-chat - {:chat-id (t :console) - :name (t :console) + {:chat-id "console" + :name "console" :color default-chat-color :group-chat false :is-active true :timestamp (.getTime (js/Date.)) - :contacts [{:identity (t :console) + :contacts [{:identity "console" :text-color "#FFFFFF" :background-color "#AB7967"}]}) @@ -202,10 +202,10 @@ (def init (create-chat (fn [{:keys [chats] :as db}] - (if (chats (t :console)) + (if (chats "console") db (-> db - (assoc-in [:chats (t :console)] console-chat) + (assoc-in [:chats "console"] console-chat) (assoc :new-chat console-chat) - (assoc :current-chat-id (t :console)) + (assoc :current-chat-id "console") (intro)))))) diff --git a/src/status_im/models/commands.cljs b/src/status_im/models/commands.cljs index 5b8a3ec915..71018acb06 100644 --- a/src/status_im/models/commands.cljs +++ b/src/status_im/models/commands.cljs @@ -8,26 +8,26 @@ ;; todo delete (def commands [{:command :money - :text (t :commands.money.text) + :text "!money" :description (t :commands.money.description) :color color-dark-mint :request-icon {:uri "icon_lock_white"} :icon {:uri "icon_lock_gray"} :suggestion true} {:command :location - :text (t :commands.location.text) + :text "!location" :description (t :commands.location.description) :color "#9a5dcf" :suggestion true} {:command :phone - :text (t :commands.phone.text) + :text "!phone" :description (t :commands.phone.description) :color color-dark-mint :request-text (t :commands.phone.request-text) :suggestion true :handler #(dispatch [:sign-up %])} {:command :confirmation-code - :text (t :commands.confirmation-code.text) + :text "!confirmationCode" :description (t :commands.confirmation-code.description) :request-text (t :commands.confirmation-code.request-text) :color color-blue @@ -36,17 +36,17 @@ :suggestion true :handler #(dispatch [:sign-up-confirm %])} {:command :send - :text (t :commands.send.text) + :text "!send" :description (t :commands.send.description) :color "#9a5dcf" :suggestion true} {:command :request - :text (t :commands.request.text) + :text "!request" :description (t :commands.request.description) :color "#48ba30" :suggestion true} {:command :keypair-password - :text (t :commands.keypair-password.text) + :text "!keypair-password" :description (t :commands.keypair-password.description) :color color-blue :request-icon {:uri "icon_lock_white"} @@ -54,7 +54,7 @@ :suggestion false :handler #(dispatch [:save-password %])} {:command :help - :text (t :commands.help.text) + :text "!help" :description (t :commands.help.description) :color "#9a5dcf" :suggestion true}]) diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index 66dbe07ae4..b3077b6b9f 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -63,24 +63,16 @@ :group-name "Group Name"} :participants {:add "Add Participants" :remove "Remove Participants"} - :commands {:money {:text "!money" - :description "Send money"} - :location {:text "!location" - :description "Send location"} - :phone {:text "!phone" - :description "Send phone number" + :commands {:money {:description "Send money"} + :location {:description "Send location"} + :phone {:description "Send phone number" :request-text "Phone number request"} - :confirmation-code {:text "!confirmationCode" - :description "Send confirmation code" + :confirmation-code {:description "Send confirmation code" :request-text "Confirmation code request"} - :send {:text "!send" - :description "Send location"} - :request {:text "!request" - :description "Send request"} - :keypair-password {:text "!keypair-password" - :description ""} - :help {:text "!help" - :description "Help"}} + :send {:description "Send location"} + :request {:description "Send request"} + :keypair-password {:text:description ""} + :help {:description "Help"}} :protocol {:received-invitation "received chat invitation" :removed-from-chat "removed you from group chat"} :colors {:blue "Blue" @@ -94,6 +86,4 @@ :left "left" :invited "invited" :removed "removed" - :You "You" - :me "me" - :console "console"}) \ No newline at end of file + :You "You"}) \ No newline at end of file