UI: update strings

Change-Id: I1e9e67ba77cc95c69ec387e91497a7ed3303083b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ae94f7..de5a78f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -242,6 +242,8 @@
    src/views/ConferenceOverlayView.mm
    src/views/CustomBackgroundView.h
    src/views/CustomBackgroundView.mm
+   src/views/TextViewWithPlaceholder.h
+   src/views/TextViewWithPlaceholder.mm
 )
 
 SET(ringclient_OTHERS
diff --git a/src/MessagesVC.mm b/src/MessagesVC.mm
index e02f90d..ce0c926 100644
--- a/src/MessagesVC.mm
+++ b/src/MessagesVC.mm
@@ -34,6 +34,7 @@
 #import "utils.h"
 #import "views/NSColor+RingTheme.h"
 #import "views/IconButton.h"
+#import "views/TextViewWithPlaceholder.h"
 #import <QuickLook/QuickLook.h>
 #import <Quartz/Quartz.h>
 #import <AVFoundation/AVFoundation.h>
@@ -45,7 +46,7 @@
 
     __unsafe_unretained IBOutlet NSTableView* conversationView;
     __unsafe_unretained IBOutlet NSView* containerView;
-    __unsafe_unretained IBOutlet NSTextView* messageView;
+    __unsafe_unretained IBOutlet TextViewWithPlaceholder* messageView;
     __unsafe_unretained IBOutlet IconButton *sendFileButton;
     __unsafe_unretained IBOutlet IconButton *recordVideoButton;
     __unsafe_unretained IBOutlet IconButton *recordAudioButton;
@@ -359,6 +360,17 @@
     } catch (std::out_of_range& e) {
         NSLog(@"contact out of range");
     }
+    NSString* name = bestNameForConversation(*conv, *convModel_);
+    NSString *placeholder = [NSString stringWithFormat:@"%@%@", @"Write to ", name];
+
+    NSFont *fontName = [NSFont systemFontOfSize: 14.0 weight: NSFontWeightRegular];
+    NSColor *color = [NSColor tertiaryLabelColor];
+    NSDictionary *nameAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
+                               fontName, NSFontAttributeName,
+                               color, NSForegroundColorAttributeName,
+                               nil];
+    NSAttributedString* attributedPlaceholder = [[NSAttributedString alloc] initWithString: placeholder attributes:nameAttrs];
+    messageView.placeholderAttributedString = attributedPlaceholder;
 }
 
 #pragma mark - configure cells
diff --git a/src/views/TextViewWithPlaceholder.h b/src/views/TextViewWithPlaceholder.h
new file mode 100644
index 0000000..9604163
--- /dev/null
+++ b/src/views/TextViewWithPlaceholder.h
@@ -0,0 +1,30 @@
+/*
+ *  Copyright (C) 2021 Savoir-faire Linux Inc.
+ *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+// this class created to expose NSTextView private property placeholderAttributedString
+#import <Cocoa/Cocoa.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface TextViewWithPlaceholder : NSTextView
+
+@property NSAttributedString *placeholderAttributedString;
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/src/views/TextViewWithPlaceholder.mm b/src/views/TextViewWithPlaceholder.mm
new file mode 100644
index 0000000..87d6f52
--- /dev/null
+++ b/src/views/TextViewWithPlaceholder.mm
@@ -0,0 +1,25 @@
+/*
+ *  Copyright (C) 2021 Savoir-faire Linux Inc.
+ *  Author: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
+ */
+
+#import "TextViewWithPlaceholder.h"
+
+@implementation TextViewWithPlaceholder
+
+
+@end
diff --git a/ui/Base.lproj/ConnectToAccManagerVC.strings b/ui/Base.lproj/ConnectToAccManagerVC.strings
index dcc1c6f..2b8e888 100644
--- a/ui/Base.lproj/ConnectToAccManagerVC.strings
+++ b/ui/Base.lproj/ConnectToAccManagerVC.strings
@@ -5,8 +5,8 @@
 /* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "BS9-U6-iDn"; */
 "BS9-U6-iDn.title" = "Cancel";
 
-/* Class = "NSTextFieldCell"; title = "Account manager"; ObjectID = "CPa-dA-HYD"; */
-"CPa-dA-HYD.title" = "Account manager";
+/* Class = "NSTextFieldCell"; title = "JAMS URL"; ObjectID = "CPa-dA-HYD"; */
+"CPa-dA-HYD.title" = "JAMS URL";
 
 /* Class = "NSButtonCell"; title = "Ok"; ObjectID = "I8C-B9-2ET"; */
 "I8C-B9-2ET.title" = "Ok";
diff --git a/ui/Base.lproj/ConnectToAccManagerVC.xib b/ui/Base.lproj/ConnectToAccManagerVC.xib
index ae68269..147aedf 100644
--- a/ui/Base.lproj/ConnectToAccManagerVC.xib
+++ b/ui/Base.lproj/ConnectToAccManagerVC.xib
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -31,10 +31,10 @@
                     <rect key="frame" x="20" y="66" width="413" height="105"/>
                     <subviews>
                         <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pFz-Cs-6HT">
-                            <rect key="frame" x="0.0" y="80" width="361" height="25"/>
+                            <rect key="frame" x="0.0" y="80" width="318" height="25"/>
                             <subviews>
                                 <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hg1-9i-Uhe">
-                                    <rect key="frame" x="-2" y="4" width="111" height="17"/>
+                                    <rect key="frame" x="-2" y="5" width="68" height="16"/>
                                     <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Username" id="Y8M-Jf-ek0">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -42,7 +42,7 @@
                                     </textFieldCell>
                                 </textField>
                                 <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="r72-Oy-R7R">
-                                    <rect key="frame" x="111" y="2" width="250" height="22"/>
+                                    <rect key="frame" x="68" y="2" width="250" height="22"/>
                                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" placeholderString="" bezelStyle="round" id="Ceg-8h-isB">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -66,10 +66,10 @@
                             </customSpacing>
                         </stackView>
                         <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZXg-04-0wN">
-                            <rect key="frame" x="0.0" y="40" width="361" height="25"/>
+                            <rect key="frame" x="0.0" y="40" width="318" height="25"/>
                             <subviews>
                                 <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jzD-TH-QCs">
-                                    <rect key="frame" x="-2" y="4" width="111" height="17"/>
+                                    <rect key="frame" x="-2" y="5" width="68" height="16"/>
                                     <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Password" id="lea-ie-4Pv">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -77,7 +77,7 @@
                                     </textFieldCell>
                                 </textField>
                                 <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="im9-ma-36i" customClass="NSSecureTextField">
-                                    <rect key="frame" x="111" y="2" width="250" height="22"/>
+                                    <rect key="frame" x="68" y="2" width="250" height="22"/>
                                     <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" placeholderString="" bezelStyle="round" id="CiM-ba-GOc" customClass="NSSecureTextFieldCell">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -101,18 +101,18 @@
                             </customSpacing>
                         </stackView>
                         <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bYZ-Nh-QiL">
-                            <rect key="frame" x="0.0" y="0.0" width="361" height="25"/>
+                            <rect key="frame" x="0.0" y="0.0" width="318" height="25"/>
                             <subviews>
                                 <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2Oe-8u-SQl">
-                                    <rect key="frame" x="-2" y="4" width="111" height="17"/>
-                                    <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Account manager" id="CPa-dA-HYD">
+                                    <rect key="frame" x="-2" y="5" width="68" height="16"/>
+                                    <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="JAMS URL" id="CPa-dA-HYD">
                                         <font key="font" metaFont="system"/>
                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                         <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
                                 <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ogN-U2-aV3">
-                                    <rect key="frame" x="111" y="2" width="250" height="22"/>
+                                    <rect key="frame" x="68" y="2" width="250" height="21"/>
                                     <constraints>
                                         <constraint firstAttribute="width" constant="250" id="EPe-a8-KTr"/>
                                     </constraints>
@@ -262,7 +262,7 @@
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Kz9-Qr-wgj">
-                    <rect key="frame" x="55" y="104" width="344" height="17"/>
+                    <rect key="frame" x="55" y="105" width="344" height="16"/>
                     <constraints>
                         <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="340" id="zML-2D-s4M"/>
                     </constraints>
diff --git a/ui/Base.lproj/Conversation.xib b/ui/Base.lproj/Conversation.xib
index e8eebdc..1161bd6 100644
--- a/ui/Base.lproj/Conversation.xib
+++ b/ui/Base.lproj/Conversation.xib
@@ -566,13 +566,9 @@
                                                 <size key="maxSize" width="516" height="10000000"/>
                                                 <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
                                                 <connections>
-                                                    <binding destination="iH6-17-JsM" name="value" keyPath="message" id="nua-kp-nn8">
+                                                    <binding destination="iH6-17-JsM" name="value" keyPath="message" id="EMX-UL-FhZ">
                                                         <dictionary key="options">
                                                             <bool key="NSContinuouslyUpdatesValue" value="YES"/>
-                                                            <string key="NSMultipleValuesPlaceholder">Type a message</string>
-                                                            <string key="NSNoSelectionPlaceholder">Type a message</string>
-                                                            <string key="NSNotApplicablePlaceholder">Type a message</string>
-                                                            <string key="NSNullPlaceholder">Type a message</string>
                                                         </dictionary>
                                                     </binding>
                                                     <outlet property="delegate" destination="iH6-17-JsM" id="PLt-0w-LEu"/>
diff --git a/ui/Base.lproj/RingWizardChoose.strings b/ui/Base.lproj/RingWizardChoose.strings
index 074d6ed..aaa6fb6 100644
--- a/ui/Base.lproj/RingWizardChoose.strings
+++ b/ui/Base.lproj/RingWizardChoose.strings
@@ -1,6 +1,6 @@
 
-/* Class = "NSButtonCell"; title = "Connect to account manager"; ObjectID = "HGQ-Kd-WIw"; */
-"HGQ-Kd-WIw.title" = "Connect to account manager";
+/* Class = "NSButtonCell"; title = "Connect to a JAMS server"; ObjectID = "HGQ-Kd-WIw"; */
+"HGQ-Kd-WIw.title" = "Connect to a JAMS server";
 
 /* Class = "NSButtonCell"; title = "Cancel"; ObjectID = "YJ3-7G-cU1"; */
 "YJ3-7G-cU1.title" = "Cancel";
diff --git a/ui/Base.lproj/RingWizardChoose.xib b/ui/Base.lproj/RingWizardChoose.xib
index e22ad8e..4528b9d 100644
--- a/ui/Base.lproj/RingWizardChoose.xib
+++ b/ui/Base.lproj/RingWizardChoose.xib
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097.3"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -24,7 +24,7 @@
                     <rect key="frame" x="0.0" y="69" width="525" height="258"/>
                     <subviews>
                         <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pcF-lX-ex4">
-                            <rect key="frame" x="163" y="231" width="200" height="29"/>
+                            <rect key="frame" x="167" y="231" width="192" height="29"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="kX1-30-jfa"/>
                             </constraints>
@@ -37,7 +37,7 @@
                             </connections>
                         </button>
                         <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nn9-La-V34">
-                            <rect key="frame" x="163" y="192" width="200" height="29"/>
+                            <rect key="frame" x="167" y="192" width="192" height="29"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="Bre-De-DSA"/>
                             </constraints>
@@ -50,7 +50,7 @@
                             </connections>
                         </button>
                         <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cpk-ql-oGP">
-                            <rect key="frame" x="163" y="153" width="200" height="29"/>
+                            <rect key="frame" x="167" y="153" width="192" height="29"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="OX0-Ne-mlD"/>
                             </constraints>
@@ -63,7 +63,7 @@
                             </connections>
                         </button>
                         <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uHC-M1-ce5">
-                            <rect key="frame" x="163" y="114" width="200" height="29"/>
+                            <rect key="frame" x="167" y="114" width="192" height="29"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="rr1-jU-d3s"/>
                             </constraints>
@@ -89,11 +89,11 @@
                             </connections>
                         </button>
                         <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HjM-oT-VQj">
-                            <rect key="frame" x="163" y="36" width="200" height="29"/>
+                            <rect key="frame" x="167" y="36" width="192" height="29"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="iKl-6P-vAW"/>
                             </constraints>
-                            <buttonCell key="cell" type="bevel" title="Connect to account manager" bezelStyle="regularSquare" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HGQ-Kd-WIw">
+                            <buttonCell key="cell" type="bevel" title="Connect to a JAMS server" bezelStyle="regularSquare" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HGQ-Kd-WIw">
                                 <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                 <font key="font" metaFont="system"/>
                             </buttonCell>
@@ -102,7 +102,7 @@
                             </connections>
                         </button>
                         <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NBt-Xw-PzN">
-                            <rect key="frame" x="163" y="-3" width="200" height="29"/>
+                            <rect key="frame" x="167" y="-3" width="192" height="29"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="5Wb-L4-VtH"/>
                             </constraints>