diff --git a/.docker/dockerfiles/latest/Dockerfile b/.docker/dockerfiles/latest/Dockerfile new file mode 100644 index 000000000000..6e52e7fdf7f5 --- /dev/null +++ b/.docker/dockerfiles/latest/Dockerfile @@ -0,0 +1,40 @@ +FROM node:0.10 + +MAINTAINER buildmaster@rocket.chat + +RUN apt-get update \ +&& apt-get install -y graphicsmagick \ +&& rm -rf /var/lib/apt/lists/* + +RUN groupadd -r rocketchat \ +&& useradd -r -g rocketchat rocketchat \ +&& mkdir /app \ +&& mkdir /app/uploads + +# gpg: key 4FD08014: public key "Rocket.Chat Buildmaster " imported +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104 + +WORKDIR /app + +RUN URL="https://github.com/RocketChat/Rocket.Chat/releases/latest" \ +&& FILE="/rocket.chat.tgz" \ +&& HEADER=$(curl -I -s "$URL" | grep -Fi Location: | sed -En 's/.*(https?:\/\/[a-zA-Z0-9\/.-_]*).*$/\1/p') \ +&& curl -fSL "$HEADER$FILE" -o rocket.chat.tgz \ +&& tar zxvf ./rocket.chat.tgz \ +&& rm ./rocket.chat.tgz \ +&& cd /app/bundle/programs/server \ +&& npm install + +USER rocketchat + +VOLUME /app/uploads +WORKDIR /app/bundle + +# needs a mongoinstance - defaults to container linking with alias 'mongo' +ENV MONGO_URL=mongodb://mongo:27017/rocketchat \ + PORT=3000 \ + ROOT_URL=http://localhost:3000 \ + Accounts_AvatarStorePath=/app/uploads + +EXPOSE 3000 +CMD ["node", "main.js"] diff --git a/.meteor/packages b/.meteor/packages index 2eca93df9b90..b48661e4c0da 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -125,3 +125,5 @@ yasinuslu:blaze-meta # sanjo:jasmine # velocity:html-reporter rocketchat:assets +rocketchat:integrations +rocketchat:message-attachments diff --git a/.meteor/versions b/.meteor/versions index 8c88fab5cc12..a27fecd55b0b 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -107,7 +107,7 @@ ordered-dict@1.0.4 pauli:accounts-linkedin@1.2.0 pauli:linkedin@1.2.0 perak:codemirror@1.2.8 -percolate:migrations@0.9.6 +percolate:migrations@0.9.7 percolate:synced-cron@1.3.0 pntbr:js-yaml-client@0.0.1 promise@0.5.1 @@ -135,6 +135,7 @@ rocketchat:file@0.0.1 rocketchat:github-enterprise@0.0.1 rocketchat:gitlab@0.0.1 rocketchat:highlight@0.0.1 +rocketchat:integrations@0.0.1 rocketchat:ldap@0.0.1 rocketchat:lib@0.0.1 rocketchat:logger@0.0.1 @@ -142,6 +143,7 @@ rocketchat:mailer@0.0.1 rocketchat:markdown@0.0.1 rocketchat:me@0.0.1 rocketchat:mentions@0.0.1 +rocketchat:message-attachments@0.0.1 rocketchat:message-pin@0.0.1 rocketchat:message-star@0.0.1 rocketchat:oembed@0.0.1 diff --git a/.sandstorm/README.md b/.sandstorm/README.md new file mode 100644 index 000000000000..c75365019e56 --- /dev/null +++ b/.sandstorm/README.md @@ -0,0 +1,8 @@ +# Publish commands + +``` +cd Rocket.Chat +vagrant-spk up && vagrant-spk dev +^C +vagrant-spk pack ../rocketchat.spk && vagrant-spk publish ../rocketchat.spk +``` diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 3451445dd382..908e6daf7f9d 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Rocket.Chat"), - appVersion = 3, # Increment this for every release. + appVersion = 5, # Increment this for every release. - appMarketingVersion = (defaultText = "0.8.0"), + appMarketingVersion = (defaultText = "0.9.0"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. @@ -50,7 +50,7 @@ const pkgdef :Spk.PackageDefinition = ( website = "https://rocket.chat", codeUrl = "https://github.com/RocketChat/Rocket.Chat", license = (openSource = mit), - categories = [communications, productivity], + categories = [communications, productivity, office, social, developerTools], author = ( contactEmail = "team@rocket.chat", diff --git a/README.md b/README.md index d98545756aa9..6f5ff72f957d 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ The Ultimate Open Source WebChat Platform * [Sloppy.io](#sloppyio) * [Docker](#docker) * [FreeBSD](#freebsd) + * [Ansible](#ansible) * [Ubuntu VPS](#ubuntu-vps) * [Ubuntu Software Center](#ubuntu-software-center) * [About Rocket.Chat](#about-rocketchat) @@ -93,6 +94,11 @@ Run solid five-nines deployment on industry workhorse FreeBSD server: [![FreeBSD Daemon](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/freebsd.png)](https://github.com/RocketChat/Rocket.Chat/wiki/FreeBSD) +## Ansible +Automated production-grade deployment in minutes, for RHEL / CentOS 7 or Ubuntu 14.04 LTS / 15.04: + +[![Ansible deployment](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/ansible.png)](https://galaxy.ansible.com/detail#/role/6478) + ## Ubuntu VPS Follow these [deployment instructions](https://github.com/RocketChat/Rocket.Chat/wiki/Deploy-Rocket.Chat-without-docker) diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index f12d75a47d01..d2e04cbfc219 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -1,8 +1,13 @@ { "Access_online_demo" : "الدخول إلى العرض التجريبي", "Access_Online_Demo" : "الدخول إلى العرض التجريبي", + "Accounts" : "الحسابات", + "Accounts_AllowPasswordChange" : "السماح بتغيير كلمة السر", + "Accounts_AllowUserProfileChange" : "السماح بتعديل الملف الشخصي للعضو", + "Accounts_PasswordReset" : "إعادة تعيين كلمة السر", "Add_Members" : "إضافة الأعضاء", "Add_users" : "إضافة مستخدمين", + "Administration" : "الإدارة", "All_channels" : "جميع القنوات", "and" : "و", "are_also_typing" : "هم أيضا يكتبون", @@ -10,6 +15,10 @@ "Are_you_sure" : "هل أنت متأكد؟", "away" : "بعيد", "Away" : "بعيد", + "away_female" : "بعيدة", + "Away_female" : "بعيدة", + "away_male" : "بعيد", + "Away_male" : "بعيد", "Back_to_login" : "العودة إلى تسجيل الدخول", "bold" : "عريض", "busy" : "مشغول", @@ -31,18 +40,27 @@ "Create_new_private_group" : "إنشاء مجموعة خاصة جديدة", "Create_new_public_channel" : "إنشاء قناة عامة جديدة", "Created_at" : "أنشئت في", + "Desktop_Notifications" : "تنبيهات سطح المكتب", + "Desktop_Notifications_Disabled" : "تنبيهات سطح المكتب معطلة. قم بتغيير إعدادات المتصفح إذا أردت تفعيلها.", + "Desktop_Notifications_Enabled" : "تنبيهات سطح المكتب مفعلة", "Direct_Messages" : "الرسائل المباشرة", + "Disable_Favorite_Rooms" : "تعطيل المفضلة", + "Disable_New_Message_Notification" : "تعطيل التنبيه عن رسالة جديدة", + "Disable_New_Room_Notification" : "تعطيل التنبيه عن غرفة جديدة", "edited" : "عدلت", "Email_or_username" : "البريد الإلكتروني أو اسم المستخدم", "Email_verified" : "تم التحقق من البريد الإلكتروني", + "Enable_Desktop_Notifications" : "تفعيل تنبيهات سطح المكتب", "Enter_info" : "ادخل المعلومات الخاصة بك", "Error_changing_password" : "خطأ في تغيير كلمة السر", + "False" : "لا", "Favorites" : "المفضلة", "Forgot_password" : "نسيت كلمة السر", "Get_to_know_the_team" : "تعرف على Rocket.Team", "github_no_public_email" : "ليس لديك أي بريد الإلكتروني عام في حسابك على Github", "Hide_room" : "إخفاء الغرفة", "History" : "تاريخ", + "Incorrect_Password" : "كلمة السر غير صحيحة", "inline_code" : "نص_برمجي", "Invalid_confirm_pass" : "تأكيد كلمة السر لا تطابق كلمة السر", "Invalid_email" : "البريد الإلكتروني المدخل غير صحيح", @@ -75,6 +93,7 @@ "More_channels" : "المزيد من القنوات", "Msgs" : "رسائل", "multi" : "متعدد", + "My_Account" : "حسابي", "n_messages" : "%s رسائل", "Name" : "اسم", "New_messages" : "رسائل جديدة", @@ -87,21 +106,31 @@ "Not_allowed" : "غير مسموح", "Not_found_or_not_allowed" : "غير موجود أو غير مسموح", "Nothing_found" : "لا يوجد شيء", + "Old_and_new_password_required" : "تحتاج إلى كتابة كلمة السر القديمة والجديدة لتغيير كلمة السر الخاصة بك.", + "Old_Password" : "كلمة السر القديمة", "Online" : "متواجد", "Oops!" : "عفوا", "Password" : "كلمة السر", + "Password_changed_successfully" : "تم تغيير كلمة السر بنجاح", "Please_wait" : "يرجى الانتظار", + "Please_wait_statistics" : "يرجى الانتظار إلى أن يتم حساب الإحصائيات", + "Preferences" : "الإعدادات", + "Preferences_saved" : "تم حفظ الإعدادات", "Privacy" : "خصوصية", "Private_Groups" : "مجموعات خاصة", + "Profile" : "الملف الشخصي", + "Profile_saved_successfully" : "تم حفظ الملف الشخصي بنجاح", "Quick_Search" : "بحث سريع", "quote" : "اقتباس", "Register" : "تسجيل حساب جديد", "Remember_me" : "تذكرني", "Remove" : "إزالة", + "Remove_Admin" : "إزالة مدير", "Reset_password" : "إعادة تعيين كلمة السر", "Room" : "غرفة", "Room_name_changed" : "تم تغيير اسم الغرفة إلى: __room_name__ بواسطة __user_by__", "Room_name_changed_successfully" : "تم تغيير اسم الغرفة بنجاح", + "Rooms" : "الغرف", "Search" : "بحث", "Search_Messages" : "بحث الرسائل", "Select_an_avatar" : "اختر صورة", @@ -114,18 +143,31 @@ "Showing_results" : "

يعرض %s نتائج

", "Silence" : "الصمت", "since_creation" : "منذ %s", + "Sound" : "صوت", "Start_of_conversation" : "بداية المحادثة", + "Statistics" : "إحصائيات", + "Stats_Away_Users" : "المستخدمين البعيدين", + "Stats_Max_Room_Users" : "أقصى عدد للمستخدمين في الغرف", + "Stats_Total_Direct_Messages" : "إجمالي عدد غرف الرسالة المباشرة", "Stats_Total_Messages" : "مجموع الرسائل", + "Stats_Total_Rooms" : "إجمالي عدد الغرف", "strike" : "شطب", + "True" : "نعم", + "Unread_Rooms" : "غرف غير مقروءة", + "Unread_Rooms_Mode" : "وضع الغرف الغير مقروءة", "Use_initials_avatar" : "استخدم الأحرف الأولى من اسم المستخدم", "use_menu" : "استخدم القائمة الجانبية للوصول إلى الغرف الخاصة بك والمحادثات", "Use_service_avatar" : "استخدام %s الرمزية", "Use_this_username" : "استخدم هذا الاسم", "Use_uploaded_avatar" : "استخدم الصورة المحملة", + "Use_url_for_avatar" : "استخدم رابط للصورة الرمزية", "User_added_by" : "تم إضافة __user_added__ بواسطة __user_by__.", + "User_is_no_longer_an_admin" : "المستخدم لم يعد مديرا", + "User_is_now_an_admin" : "المستخدم الآن مدير", "User_joined_channel" : "انضم للقناة.", "User_left" : "غادر القناة.", "User_logged_out" : "المستخدم سجل الخروج", + "User_not_found_or_incorrect_password" : "اسم المستخدم غير موجود أو كلمة السر غير صحيحة", "User_removed_by" : "تم حذف __user_removed__ بواسطة __user_by__.", "Username" : "اسم المستخدم", "Username_cant_be_empty" : "اسم المستخدم لا يمكن أن يكون فارغا", diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index f67fe7f46915..56d73d095a80 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -1,20 +1,23 @@ { + "Access_not_authorized" : "Access not authorized", "Access_online_demo" : "Access the online demo", "Access_Online_Demo" : "Access the Online Demo", - "Access_not_authorized" : "Access not authorized", "Accounts" : "Accounts", "Accounts_AllowedDomainsList" : "Allowed Domains List", "Accounts_AllowedDomainsList_Description" : "Comma-separated list of allowed domains", "Accounts_AllowPasswordChange" : "Allow Password Change", "Accounts_AllowUserAvatarChange" : "Allow User Avatar Change", - "Accounts_AllowUserProfileChange" : "Allow User Profile Change", "Accounts_AllowUsernameChange" : "Allow Username Change", + "Accounts_AllowUserProfileChange" : "Allow User Profile Change", "Accounts_AvatarResize" : "Resize Avatars", "Accounts_AvatarSize" : "Avatar Size", "Accounts_AvatarStorePath" : "Avatar Storage Path", "Accounts_AvatarStoreType" : "Avatar Storage Type", "Accounts_denyUnverifiedEmail" : "Deny unverified e-mail", "Accounts_EmailVerification" : "E-mail Verification", + "Accounts_Enrollment_Email" : "Enrollment E-mail", + "Accounts_Enrollment_Email_Description" : "You may use [name], [fname], [lname] for the user's full name, first name or last name, respectively.
You may use [email] for the user's e-mail.", + "Accounts_LoginExpiration" : "Login Expiration in Days", "Accounts_ManuallyApproveNewUsers" : "Manually Approve New Users", "Accounts_OAuth_Custom_Authorize_Path" : "Authorize Path", "Accounts_OAuth_Custom_Button_Color" : "Button Color", @@ -47,24 +50,23 @@ "Accounts_OAuth_Twitter" : "Twitter Login", "Accounts_OAuth_Twitter_id" : "Twitter Id", "Accounts_OAuth_Twitter_secret" : "Twitter Secret", + "Accounts_PasswordReset" : "Password Reset", "Accounts_Registration_AuthenticationServices_Enabled" : "Registration with Authentication Services", "Accounts_RegistrationForm" : "Registration Form", - "Accounts_RegistrationForm_Public" : "Public", "Accounts_RegistrationForm_Disabled" : "Disabled", "Accounts_RegistrationForm_LinkReplacementText" : "Registration Form Link Replacement Text", + "Accounts_RegistrationForm_Public" : "Public", "Accounts_RegistrationForm_Secret_URL" : "Secret URL", "Accounts_RegistrationForm_SecretURL" : "Registration Form Secret URL", "Accounts_RegistrationForm_SecretURL_Description" : "You must provide a random string that will be added to your registration URL. Example: https://demo.rocket.chat/register/[secret_hash]", "Accounts_RegistrationRequired" : "Registration Required", "Accounts_RequireNameForSignUp" : "Require Name For Signup", - "Accounts_PasswordReset" : "Password Reset", - "Accounts_Enrollment_Email" : "Enrollment E-mail", - "Accounts_Enrollment_Email_Description" : "You may use [name], [fname], [lname] for the user's full name, first name or last name, respectively.
You may use [email] for the user's e-mail.", "Activate" : "Activate", "Add_custom_oauth" : "Add custom oauth", "Add_Members" : "Add Members", "Add_users" : "Add users", "Administration" : "Administration", + "Alias" : "Alias", "All_channels" : "All channels", "Allow_Invalid_SelfSigned_Certs" : "Allow Invalid Self-Signed Certs", "Allow_Invalid_SelfSigned_Certs_Description" : "Allow invalid and self-signed SSL certificate's for link validation and previews.", @@ -79,6 +81,7 @@ "Are_you_sure" : "Are you sure?", "Auto_Load_Images" : "Auto Load Images", "Avatar_changed_successfully" : "Avatar changed successfully", + "Avatar_URL" : "Avatar URL", "Avatar_url_invalid_or_error" : "The url provided is invalid or not accessible. Please try again, but with a different url.", "away" : "away", "Away" : "Away", @@ -86,6 +89,7 @@ "Away_female" : "Away", "away_male" : "away", "Away_male" : "Away", + "Back_to_integrations" : "Back to integrations", "Back_to_login" : "Back to login", "bold" : "bold", "busy" : "busy", @@ -101,6 +105,8 @@ "Channels" : "Channels", "Channels_list" : "List of public channels", "Chat_Rooms" : "Chat Rooms", + "Choose_the_alias_that_will_appear_before_the_username_in_messages" : "Choose the alias that will appear before the username in messages.", + "Choose_the_username_that_this_integration_will_post_as" : "Choose the username that this integration will post as.", "Clear_all_unreads_question" : "Clear all unreads?", "close" : "close", "coming_soon" : "coming soon", @@ -110,11 +116,13 @@ "Contact" : "Contact", "Conversation" : "Conversation", "Convert_Ascii_Emojis" : "Convert ASCII to Emoji", + "COPY_TO_CLIPBOARD" : "COPY TO CLIPBOARD", "Create_new" : "Create new", "Create_new_direct_message_room" : "Create a new direct message room", "Create_new_private_group" : "Create a new private group", "Create_new_public_channel" : "Create a new public channel", "Created_at" : "Created at", + "Created_at_s_by_s" : "Created at %s by %s", "Custom_oauth_helper" : "When setting up your OAuth Provider, you'll have to inform a Callback URL. Use
%s
.", "Custom_oauth_unique_name" : "Custom oauth unique name", "days" : "days", @@ -141,6 +149,7 @@ "Enable_Desktop_Notifications" : "Enable Desktop Notifications", "Enter_info" : "Enter your information", "Enter_to" : "Enter to", + "Error" : "Error", "Error_changing_password" : "Error changing password", "Error_too_many_requests" : "Error, too many requests. Please slow down. You must wait %s seconds before trying again", "Esc_to" : "Esc to", @@ -149,6 +158,7 @@ "FileUpload" : "File Upload", "FileUpload_Enabled" : "File Uploads Enabled", "FileUpload_MaxFileSize" : "Maximum File Upload Size (in bytes)", + "FileUpload_MediaType_NotAccepted" : "Media Types Not Accepted", "FileUpload_MediaTypeWhiteList" : "Accepted Media Types", "FileUpload_MediaTypeWhiteListDescription" : "Comma-separated list of media types", "Follow_social_profiles" : "Follow our social profiles, fork us on github and share your thoughts about the rocket.chat app on our trello board.", @@ -166,14 +176,16 @@ "hours" : "hours", "Incorrect_Password" : "Incorrect Password", "inline_code" : "inline_code", + "Install_Extension" : "Install Extension", "Install_FxOs" : "Install Rocket.Chat on your Firefox", "Install_FxOs_done" : "Great! You can now use Rocket.Chat via the icon on your homescreen. Have fun with Rocket.Chat!", "Install_FxOs_error" : "Sorry, that did not work as intended! The following error appeared:", "Install_FxOs_follow_instructions" : "Please confirm the app installation on your device (press \"Install\" when prompted).", + "Integration_Incoming_WebHook" : "Incoming WebHook Integration", + "Integration_New" : "New Integration", + "Integrations" : "Integrations", "Invalid_asset" : "Invalid asset", "Invalid_confirm_pass" : "The password confirmation does not match password", - "Invalid_Secret_URL" : "Invalid Secret URL", - "Invalid_secret_URL_message" : "The URL provided is invalid.", "Invalid_email" : "The e-mail entered is invalid", "Invalid_file_height" : "Invalid file height", "Invalid_file_type" : "Invalid file type", @@ -181,6 +193,8 @@ "Invalid_name" : "The name must not be empty", "Invalid_pass" : "The password must not be empty", "Invalid_room_name" : "%s is not a valid room name,
use only letters, numbers and dashes", + "Invalid_Secret_URL" : "Invalid Secret URL", + "Invalid_secret_URL_message" : "The URL provided is invalid.", "invisible" : "invisible", "Invisible" : "Invisible", "Invitation_HTML" : "Invitation HTML", @@ -259,6 +273,7 @@ "Message_ShowEditedStatus" : "Show Edited Status", "Message_ShowFormattingTips" : "Show Formatting Tips", "Messages" : "Messages", + "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here" : "Messages that are sent to the Incoming WebHook will be posted here.", "Meta" : "Meta", "Meta_fb_app_id" : "Facebook App Id", "Meta_google-site-verification" : "Google Site Verification", @@ -276,6 +291,7 @@ "Name" : "Name", "Name_cant_be_empty" : "Name can't be empty", "Name_optional" : "Name (optional)", + "New_integration" : "New integration", "New_messages" : "New messages", "New_password" : "New password", "No_channel_with_name_%s_was_found" : "No channel with name \"%s\" was found!", @@ -286,6 +302,7 @@ "No_groups_yet" : "You have no private groups yet.", "No_livechats" : "You have no livechats.", "No_permission_to_view_room" : "You don't have permission to view this room", + "no_tokens_for_this_user" : "There are no tokens for this user", "No_user_with_username_%s_was_found" : "No user with username \"%s\" was found!", "Not_allowed" : "Not allowed", "Not_authorized" : "Not authorized", @@ -299,6 +316,7 @@ "Oops!" : "Oops", "Opt_out_statistics" : "Don't send my statistics to Rocket.Chat", "Opt_out_statistics_warning" : "By sending your statistics, you'll help us identify how many instances of Rocket.Chat are deployed, as well as how good the system is behaving, so we can further improve it. Don't worry, as no user information is sent and all the information we receive is kept confidential. If you want to continue sending us your statistics, uncheck the above checkbox. Thank you.", + "optional" : "optional", "others" : "others", "Password" : "Password", "Password_Change_Disabled" : "Your Rocket.Chat administrator has disabled the changing of passwords", @@ -308,6 +326,9 @@ "Please_wait" : "Please wait", "Please_wait_activation" : "Please wait, this can take some time.", "Please_wait_statistics" : "Please wait, statistics are being generated.", + "Post_as" : "Post as", + "Post_to_Channel" : "Post to Channel", + "Post_to_s_as_s" : "Post to %s as %s", "Powered_by" : "Powered by", "Preferences" : "Preferences", "Preferences_saved" : "Preferences saved", @@ -325,16 +346,19 @@ "Push_apn_key" : "APN Key", "Push_apn_passphrase" : "APN Passphrase", "Push_debug" : "Debug", + "push_disabled" : "Push disabled", "Push_enable" : "Enable", "Push_enable_gateway" : "Enable Gateway", "Push_gateway" : "Gateway", "Push_gcm_api_key" : "GCM API Key", "Push_gcm_project_number" : "GCM Project Number", "Push_production" : "Production", + "Push_test_push" : "Test", "Quick_Search" : "Quick Search", "quote" : "quote", "Recents" : "Recents", "Record" : "Record", + "Refresh_your_page_after_install_to_enable_screen_sharing" : "Refresh your page after install to enable screen sharing", "Register" : "Register a new account", "Registration_Succeeded" : "Registration Succeeded", "Remember_me" : "Remember me", @@ -342,6 +366,8 @@ "Remove_Admin" : "Remove Admin", "Remove_custom_oauth" : "Remove custom oauth", "Reset_password" : "Reset password", + "Restart" : "Restart", + "Restart_the_server" : "Restart the server", "Room" : "Room", "Room_name_changed" : "Room name changed to: __room_name__ by __user_by__", "Room_name_changed_successfully" : "Room name changed successfully", @@ -359,6 +385,7 @@ "SAML_Custom_Provider" : "Custom Provider", "Save_changes" : "Save changes", "Save_Mobile_Bandwidth" : "Save Mobile Bandwidth", + "Screen_Share" : "Screen Share", "Search" : "Search", "Search_Messages" : "Search Messages", "Search_settings" : "Search settings", @@ -370,15 +397,20 @@ "Select_service_to_login" : "Select a service to login to load your picture or upload one directly from your computer", "Selected_users" : "Selected members", "Send" : "Send", + "Send_a_test_push_to_my_user" : "Send a test push to my user", "Send_confirmation_email" : "Send confirmation email", + "Send_data_into_RocketChat_in_realtime" : "Send data into Rocket.Chat in real-time.", "Send_invitation_email" : "Send invitation e-mail", "Send_invitation_email_error" : "You haven't provided any valid e-mail address.", "Send_invitation_email_info" : "You can send multiple e-mail invitations at once.", "Send_invitation_email_success" : "You have successfully sent an invitation e-mail to the following addresses:", "Send_invitation_email_warning" : "In order to send invitation e-mails, you must first configure SMTP settings.", "Send_Message" : "Send Message", + "Send_your_JSON_payloads_to_this_URL" : "Send your JSON payloads to this URL.", "Settings" : "Settings", "Settings_updated" : "Settings updated", + "Should_be_a_URL_of_an_image" : "Should be a URL of an image.", + "Should_exists_a_user_with_this_username" : "Should exists a user with this username.", "Showing_online_users" : "Showing __total_online__ of __total__ users", "Showing_results" : "

Showing %s results

", "Silence" : "Silence", @@ -393,6 +425,7 @@ "SMTP_Username" : "SMTP Username", "Sound" : "Sound", "Start_of_conversation" : "Start of conversation", + "Start_with_s_for_user_or_s_for_channel_Eg_s_or_s" : "Start with %s for user or %s for channel. Eg: %s or %s", "Statistics" : "Statistics", "Stats_Active_Users" : "Active Users", "Stats_Avg_Channel_Users" : "Average Channel Users", @@ -420,8 +453,12 @@ "Stop_Recording" : "Stop Recording", "strike" : "strike", "Submit" : "Submit", + "Success" : "Success", "The_configured_URL_is_different_from_the_URL_you_are_accessing" : "The configured URL is different from the URL you are accessing!", "The_field_is_required" : "The field %s is required.", + "The_server_will_restart_in_s_seconds" : "The server will restart in %s seconds", + "There_is_no_integrations" : "There is no integrations", + "This_is_a_push_test_messsage" : "This is a push test messsage", "True" : "True", "Unnamed" : "Unnamed", "Unread_Rooms" : "Unread Rooms", @@ -452,6 +489,7 @@ "User_left_male" : "Has left the channel.", "User_logged_out" : "User is logged out", "User_not_found_or_incorrect_password" : "User not found or incorrect password", + "User_or_channel_name" : "User or channel name", "User_removed_by" : "User __user_removed__ removed by __user_by__.", "User_Settings" : "User Settings", "User_updated_successfully" : "User updated successfully", @@ -463,6 +501,9 @@ "Username_title" : "Register username", "Username_unavaliable" : "%s is already in use :(", "Users" : "Users", + "UTF8_Names_Slugify" : "UTF8 Names Slugify", + "UTF8_Names_Validation" : "UTF8 Names Validation", + "UTF8_Names_Validation_Description" : "Do not allow special characters and spaces. You can use - _ and . but not at the end of the name", "View_All" : "View All", "Wait_activation_warning" : "Before you can login, your account must be manually activated by an administrator.", "We_have_sent_password_email" : "We have sent you an e-mail with password reset instructions. If you do not receive an e-mail shortly, please come back and try again.", @@ -474,8 +515,12 @@ "Yes_clear_all" : "Yes, clear all!", "Yes_delete_it" : "Yes, delete it!", "you_are_in_preview_mode_of" : "You are in preview mode of channel #__room_name__", + "You_can_change_a_different_avatar_too" : "You can change a different avatar too", "You_need_confirm_email" : "You need to confirm your email to login!", + "You_need_install_an_extension_to_allow_screen_sharing" : "You need install an extension to allow screen sharing", + "You_should_name_it_to_easily_manage_your_integrations" : "You should name it to easily manage your integrations.", "You_will_not_be_able_to_recover" : "You will not be able to recover this message!", "Your_entry_has_been_deleted" : "Your entry has been deleted.", - "Your_Open_Source_solution" : "Your own Open Source chat solution" + "Your_Open_Source_solution" : "Your own Open Source chat solution", + "Your_push_was_sent_to_s_devices" : "Your push was sent to %s devices" } \ No newline at end of file diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index 7b8e70f53a91..01f48d5c754a 100644 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -1,16 +1,22 @@ { + "Access_not_authorized" : "Pääsy estetty.", "Access_online_demo" : "Access the online demo", "Access_Online_Demo" : "Access the Online Demo", "Accounts" : "Käyttäjätilit", "Accounts_AllowedDomainsList" : "Pilkkueroteltu lista sallituista domaineista", + "Accounts_AllowedDomainsList_Description" : "Pilkuilla eroteltu luettelo sallituista verkkotunnuksia", "Accounts_AllowPasswordChange" : "Salli salasanan vaihto", + "Accounts_AllowUserAvatarChange" : "Salli käyttäjän avatarin muutos", "Accounts_AllowUsernameChange" : "Salli käyttäjätunnuksen muuttaminen", + "Accounts_AllowUserProfileChange" : "Salli käyttäjän profiilin muutos", "Accounts_AvatarResize" : "Muuta avatarien kokoa", "Accounts_AvatarSize" : "Avatarin koko", "Accounts_AvatarStorePath" : "Avatarin tallennuspolku", "Accounts_AvatarStoreType" : "Avatarien tallennusmuoto", "Accounts_denyUnverifiedEmail" : "Estä vahvistamaton sähköpostiosoite", "Accounts_EmailVerification" : "Sähköpostiosoitteen varmistaminen", + "Accounts_Enrollment_Email" : "Kirjautumissähköposti", + "Accounts_Enrollment_Email_Description" : "Voit käyttää [name], [fname], [lname] käyttäjän koko nimen, etunimen tai sukunimen paikalla.
Voit käyttää [email] käyttäjän sähköpostin paikalla.", "Accounts_ManuallyApproveNewUsers" : "Hyväksy uudet käyttäjät manuaalisesti", "Accounts_OAuth_Custom_Authorize_Path" : "Auktorisointipolku", "Accounts_OAuth_Custom_Button_Color" : "Painikkeen väri", @@ -43,6 +49,15 @@ "Accounts_OAuth_Twitter" : "Twitter-tunnus", "Accounts_OAuth_Twitter_id" : "Twitter ID", "Accounts_OAuth_Twitter_secret" : "Twitter Secret", + "Accounts_PasswordReset" : "Salasanan nollaus", + "Accounts_Registration_AuthenticationServices_Enabled" : "Rekisteröinti autentikointipalveluiden kautta", + "Accounts_RegistrationForm" : "Rekisteröintilomake", + "Accounts_RegistrationForm_Disabled" : "Pois päältä", + "Accounts_RegistrationForm_LinkReplacementText" : "Ilmoittautumislomakkeen linkin korvaava teksti", + "Accounts_RegistrationForm_Public" : "Julkinen", + "Accounts_RegistrationForm_Secret_URL" : "Salainen URL", + "Accounts_RegistrationForm_SecretURL" : "Ilmoittautumislomakkeen salainen URL", + "Accounts_RegistrationForm_SecretURL_Description" : "Sinun on annettava satunnainen merkkijono, joka lisätään rekisteröitymis-URLiin. Esimerkiksi: https://chat.example.com/register/[secret_hash]", "Accounts_RegistrationRequired" : "Rekisteröinti vaaditaan", "Accounts_RequireNameForSignUp" : "Vaadi nimi rekisteröityessä", "Activate" : "Aktivoi", @@ -50,8 +65,10 @@ "Add_Members" : "Lisää osallistujia", "Add_users" : "Lisää käyttäjiä", "Administration" : "Ylläpito", + "Alias" : "Alias", "All_channels" : "Kaikki kanavat", "Allow_Invalid_SelfSigned_Certs" : "Salli virheelliset ja itse allekirjoitetut SSL varmenteet linkin validointiin ja esikatseluihin", + "Allow_Invalid_SelfSigned_Certs_Description" : "Hyväksy virheelliset ja itse allekirjoitetut SSL-varmenteet linkkien validoinnissa ja esikatselussa.", "and" : "ja", "API" : "API", "API_Analytics" : "Analytics", @@ -63,6 +80,7 @@ "Are_you_sure" : "Oletko varma?", "Auto_Load_Images" : "Lataa kuvat automaattisesti\n", "Avatar_changed_successfully" : "Avatar vaihdettu onnistuneesti", + "Avatar_URL" : "Avatarin URL", "Avatar_url_invalid_or_error" : "URL on virheellinen tai ei ole käytettävissä. Yritä uudestaan.", "away" : "poissa", "Away" : "Poissa", @@ -70,6 +88,7 @@ "Away_female" : "Poissa", "away_male" : "poissa", "Away_male" : "Poissa", + "Back_to_integrations" : "Takaisin integraatioihin", "Back_to_login" : "Takaisin kirjautumiseen", "bold" : "lihavoitu", "busy" : "varattu", @@ -80,10 +99,13 @@ "Busy_male" : "Varattu", "Cancel" : "Peruuta", "CDN_PREFIX" : "CDN etuliite", + "Certificates_and_Keys" : "Sertifikaatit ja avaimet", "Change_avatar" : "Vaihda avatar", "Channels" : "Kanavat", "Channels_list" : "Julkiset kanavat", "Chat_Rooms" : "Chathuoneet", + "Choose_the_alias_that_will_appear_before_the_username_in_messages" : "Valitse alias, joka näkyy viesteissä ennen käyttäjätunnustasi", + "Choose_the_username_that_this_integration_will_post_as" : "Valitse käyttäjänimi, jolla integraatio postaa keskusteluun", "Clear_all_unreads_question" : "Tyhjennä kaikki lukemattomat?", "close" : "sulje", "coming_soon" : "tulossa", @@ -93,11 +115,13 @@ "Contact" : "Yhteys", "Conversation" : "Keskustelu", "Convert_Ascii_Emojis" : "Muunna ASCII-merkit Emojiksi", + "COPY_TO_CLIPBOARD" : "KOPIOI LEIKEPÖYDÄLLE", "Create_new" : "Luo uusi", "Create_new_direct_message_room" : "Luo uusi yksityisviestikeskustelu", "Create_new_private_group" : "Luo uusi privaattiryhmä", "Create_new_public_channel" : "Luo uusi julkinen kanava", "Created_at" : "Luotu", + "Created_at_s_by_s" : "Luotu %s käyttäjän %s toimesta", "Custom_oauth_helper" : "Kun perustat OAuth Providerin, sinun täytyy ilmoittaa Callback URL. Käytä
%s
.", "Custom_oauth_unique_name" : "Mukautettu oauth yksilöllinen nimi", "days" : "päivää", @@ -124,6 +148,7 @@ "Enable_Desktop_Notifications" : "Ota työpöytäilmoitukset käyttöön", "Enter_info" : "Syötä kirjautumistietosi", "Enter_to" : "Astu sisään", + "Error" : "Virhe", "Error_changing_password" : "Virhe vaihtaessa salasanaa", "Error_too_many_requests" : "Virhe, liikaa pyyntöjä. Rauhoitu hieman.\nOdota %s sekuntia ennen uudelleenyritystä.", "Esc_to" : "Poistu", @@ -132,6 +157,7 @@ "FileUpload" : "Lähetä tiedosto", "FileUpload_Enabled" : "Tiedostojen lähetykset käytössä", "FileUpload_MaxFileSize" : "Suurin lähetettävän tiedoston koko (tavuina)", + "FileUpload_MediaType_NotAccepted" : "Mediatyyppejä ei hyväksytä", "FileUpload_MediaTypeWhiteList" : "Hyväksytyt mediatyypit", "FileUpload_MediaTypeWhiteListDescription" : "Pilkkueroteltu lista mediatyypeistä", "Follow_social_profiles" : "Seuraa someamme, forkkaa Githubissa ja jaa ajatuksiasi rocket.chatista trellossa.", @@ -149,15 +175,25 @@ "hours" : "tuntia", "Incorrect_Password" : "Väärä salasana", "inline_code" : "koodi", + "Install_Extension" : "Asenna laajennus", "Install_FxOs" : "Asenna Rocket.Chat Firefoxiisi", "Install_FxOs_done" : "Hienoa! Voit käyttää nyt Rocket.Chatiä etusivulla olevan kuvakkeen kautta. Pidä kivaa!", "Install_FxOs_error" : "Pahoittelut, asennus ei onnistunut, seuraava virhe ilmeni:", "Install_FxOs_follow_instructions" : "Vahvista sovelluksen asennus laitteellasi (paina \"Install\" käskettäessä)", + "Integration_Incoming_WebHook" : "Sisääntuleva WebHook-integraatio", + "Integration_New" : "Uusi integraatio", + "Integrations" : "Integraatiot", + "Invalid_asset" : "Virheellinen resurssi", "Invalid_confirm_pass" : "Salasanat eivät täsmää", "Invalid_email" : "Annettu sähköpostiosoite ei ole oikea", + "Invalid_file_height" : "Virheellinen tiedoston korkeus", + "Invalid_file_type" : "Virheellinen tiedostotyyppi", + "Invalid_file_width" : "Virheellinen tiedoston leveys", "Invalid_name" : "Nimi ei voi olla tyhjä", "Invalid_pass" : "Salasana ei voi olla tyhjä", "Invalid_room_name" : "%s ei ole hyväksyttävä kanavan nimi,
käytä vain kirjaimia, numeroita ja viivaa", + "Invalid_Secret_URL" : "Virheellinen salainen URL", + "Invalid_secret_URL_message" : "URL on virheellinen.", "invisible" : "näkymätön", "Invisible" : "Näkymätön", "Invitation_HTML" : "Kutsu HTML", @@ -223,7 +259,7 @@ "Message_AllowEditing_BlockEditInMinutes" : "Estä viestin muokkaus (x) minuutin jälkeen", "Message_AllowEditing_BlockEditInMinutesDescription" : "Syötä 0 poistaaksesi muutoseston", "Message_AudioRecorderEnabled" : "Äänentallennin käytössä", - "Message_AudioRecorderEnabledDescription" : "Jotta tämä toimisi, WAV-tiedostojen lähetys tulee olla sallittu", + "Message_AudioRecorderEnabledDescription" : "Jotta tämä toimisi, WAV-tiedostojen (mediatyyppi 'audio/wav') lähetys tulee olla sallittu", "Message_deleting_not_allowed" : "Viestin poisto ei sallittu", "Message_editing_blocked" : "Tätä viestiä ei voi muokata enää.", "Message_editing_not_allowed" : "Viestin muokkaus ei sallittu", @@ -236,6 +272,7 @@ "Message_ShowEditedStatus" : "Näytä muokkaustila", "Message_ShowFormattingTips" : "Näytä muotoiluvihjeet", "Messages" : "Viestit", + "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here" : "Viestit, jotka lähetetään sisääntulevaan WebHookiin, postataan tänne", "Meta" : "Meta", "Meta_fb_app_id" : "Facebook APP ID", "Meta_google-site-verification" : "Google Site Verification", @@ -253,6 +290,7 @@ "Name" : "Nimi", "Name_cant_be_empty" : "Nimi ei voi olla tyhjä", "Name_optional" : "Nimi (valinnainen)", + "New_integration" : "Uusi integraatio", "New_messages" : "Uusia viestejä", "New_password" : "Uusi salasana", "No_channel_with_name_%s_was_found" : "Kanavaa nimeltä '%s' ei löytynyt!", @@ -261,9 +299,12 @@ "No_favorites_yet" : "Et ole vielä lisännyt suosikkeja.", "No_group_with_name_%s_was_found" : "Privaattiryhmää '%s' ei löytynyt!", "No_groups_yet" : "Sinulla ei ole vielä privaattiryhmiä.", + "No_livechats" : "Sinulla ei ole livechatteja.", "No_permission_to_view_room" : "Sinulla ei ole oikeutta katsella tätä", + "no_tokens_for_this_user" : "Valtuutusta käyttäjälle ei löydy", "No_user_with_username_%s_was_found" : "Käyttäjää nimeltä \"%s\" ei löytynyt!", "Not_allowed" : "Ei sallittu", + "Not_authorized" : "Ei sallittu", "Not_found_or_not_allowed" : "Ei löydy tai ei sallittu", "Nothing_found" : "Ei löytynyt", "Notify_all_in_this_room" : "Ilmoita kaikille kanavallaolijoille", @@ -274,6 +315,7 @@ "Oops!" : "Oho", "Opt_out_statistics" : "Älä lähetä anonyymejä tilastoja Rocket.Chatille", "Opt_out_statistics_warning" : "Lähettämällä anonyymit tilastot, autat meitä selvittämään, kuinka monta Rocket.Chat -ympäristöä on käynnistetty, kuten myös sen, miten hyvin järjestelmä toimii. Tätä tietoa käytetään Rocket.Chatin parantamiseen.\nJos haluat jatkaa anonyymien tilastojen lähettämistä, poista ylläoleva ruksi. Kiitos.", + "optional" : "valinnainen", "others" : "muut", "Password" : "Salasana", "Password_Change_Disabled" : "Rocket.Chat ylläpitäjäsi on poistanut salasanan vaihtamismahdollisuuden", @@ -283,6 +325,9 @@ "Please_wait" : "Odota hetki", "Please_wait_activation" : "Odota, tämä voi kestää jonkin aikaa.", "Please_wait_statistics" : "Odota, tilastoja generoidaan.", + "Post_as" : "Postaa käyttäjänä", + "Post_to_Channel" : "Postaa kanavalle", + "Post_to_s_as_s" : "Postaa paikkaan %s käyttäjänä %s", "Powered_by" : "Powered by", "Preferences" : "Asetukset", "Preferences_saved" : "Asetukset tallennettu", @@ -300,14 +345,19 @@ "Push_apn_key" : "APN Key", "Push_apn_passphrase" : "APN Passphrase", "Push_debug" : "Debug", + "push_disabled" : "Push pois päältä", "Push_enable" : "Kytke päälle", + "Push_enable_gateway" : "Ota yhdyskäytävä käyttöön", + "Push_gateway" : "Yhdyskäytävä", "Push_gcm_api_key" : "GCM API Key", "Push_gcm_project_number" : "GCM Project Number", "Push_production" : "Tuotanto", + "Push_test_push" : "Testaa", "Quick_Search" : "Pikaetsintä", "quote" : "lainaus", "Recents" : "Viimeisimmät", "Record" : "Nauhoita", + "Refresh_your_page_after_install_to_enable_screen_sharing" : "Päivitä sivu asennuksen jälkeen ottaaksesi käyttöön näytön jakamisen", "Register" : "Rekisteröi uusi käyttäjätili", "Registration_Succeeded" : "Rekisteröinti onnistui", "Remember_me" : "Muista minut", @@ -315,6 +365,8 @@ "Remove_Admin" : "Poista ylläpitäjyys", "Remove_custom_oauth" : "Poista mukautettu oauth", "Reset_password" : "Nollaa salasana", + "Restart" : "Käynnistä uudelleen", + "Restart_the_server" : "Käynnistä palvelin uudelleen", "Room" : "Huone", "Room_name_changed" : "Huoneen nimi vaihdettu __room_name__ __user_by__ toimesta", "Room_name_changed_successfully" : "Huoneen nimi vaihdettu", @@ -332,6 +384,7 @@ "SAML_Custom_Provider" : "Custom Provider", "Save_changes" : "Tallenna muutokset", "Save_Mobile_Bandwidth" : "Säästä kaistaa mobiilissa", + "Screen_Share" : "Näytön jakaminen", "Search" : "Etsi", "Search_Messages" : "Etsi viestejä", "Search_settings" : "Etsi asetuksista", @@ -343,15 +396,20 @@ "Select_service_to_login" : "Valitse kirjautumiseen käytettävä palvelu tai lataa kuvasi suoraan koneeltasi", "Selected_users" : "Valitut käyttäjät", "Send" : "Lähetä", + "Send_a_test_push_to_my_user" : "Lähetä testi-push käyttäjälle", "Send_confirmation_email" : "Lähetä vahvistussähköposti", + "Send_data_into_RocketChat_in_realtime" : "Lähetä data Rocket.Chatiin reaaliajassa", "Send_invitation_email" : "Lähetä kutsusähköposti", "Send_invitation_email_error" : "Et ole antanyt yhtään validia sähköpostiosoitetta.", "Send_invitation_email_info" : "Voit lähettää useita sähköpostikutsuja kerralla.", "Send_invitation_email_success" : "Olet onnistuneesti lähettänyt sähköpostikutsun seuraaviin osoitteisiin:", "Send_invitation_email_warning" : "Lähettääksesi sähköpostikutsuja, sinun täytyy ensin tehdä SMTP asetukset.", "Send_Message" : "Lähetä viesti", + "Send_your_JSON_payloads_to_this_URL" : "Lähetä JSON payload tähän URL-osoitteeseen", "Settings" : "Asetukset", "Settings_updated" : "Asetukset päivitetty", + "Should_be_a_URL_of_an_image" : "Kuvan URL-osoite", + "Should_exists_a_user_with_this_username" : "Käyttäjä tällä käyttäjätunnuksella tulisi olla olemassa", "Showing_online_users" : "Näytetään __total_online__/__total__ users", "Showing_results" : "

Näytetään %s tulosta

", "Silence" : "Hiljaisuus", @@ -366,6 +424,7 @@ "SMTP_Username" : "SMTP Käyttäjätunnus", "Sound" : "Ääni", "Start_of_conversation" : "Keskustelun alku", + "Start_with_s_for_user_or_s_for_channel_Eg_s_or_s" : "Aloita %s käyttäjänä or %s kanavana. Esim: %s tai %s", "Statistics" : "Tilastot", "Stats_Active_Users" : "Aktiivisia käyttäjiä", "Stats_Avg_Channel_Users" : "Keskimääräinen kanavan käyttäjämäärä", @@ -393,12 +452,18 @@ "Stop_Recording" : "Lopeta nauhoittaminen", "strike" : "yliviivaa", "Submit" : "Lähetä", + "Success" : "Onnistui", + "The_configured_URL_is_different_from_the_URL_you_are_accessing" : "Määritetty URL-osoite on eri kuin nyt käytettävä!", "The_field_is_required" : "Kenttä %s vaaditaan.", + "The_server_will_restart_in_s_seconds" : "Palvelin käynnistyy %s sekunnin kuluttua", + "There_is_no_integrations" : "Integraatioita ei ole", + "This_is_a_push_test_messsage" : "Tämä on testi-pushviesti", "True" : "Kyllä", "Unnamed" : "Nimetön", "Unread_Rooms" : "Lukemattomia", "Unread_Rooms_Mode" : "Lukemattomien tila", "Upload_file_question" : "Lähetä tiedosto?", + "Uploading_file" : "Ladataan tiedostoa...", "Use_Emojis" : "Käytä Emojia", "Use_initials_avatar" : "Käytä käyttäjätunnuksen nimikirjaimia", "use_menu" : "Käytä sivuvalikkoa käyttääksesi huoneitasi ja chattejasi", @@ -423,6 +488,7 @@ "User_left_male" : "Käyttäjä poistui kanavalta.", "User_logged_out" : "Käyttäjä on kirjautunut ulos", "User_not_found_or_incorrect_password" : "Käyttäjää ei löydy tai väärä salasana", + "User_or_channel_name" : "Käyttäjän tai kanavan nimi", "User_removed_by" : "Käyttäjä __user_removed__ poistettu __user_by__ toimesta.", "User_Settings" : "Käyttäjän asetukset", "User_updated_successfully" : "Käyttäjän tiedot päivitetty", @@ -434,6 +500,9 @@ "Username_title" : "Rekisteröi käyttäjänimi", "Username_unavaliable" : "%s on jo käytössä :(", "Users" : "Käyttäjät", + "UTF8_Names_Slugify" : "Siisti UTF8-nimet", + "UTF8_Names_Validation" : "UTF-nimien validointi", + "UTF8_Names_Validation_Description" : "Älä anna erikoismerkkejä ja välilyöntejä. Voit käyttää - _ ja . mutta ei nimen lopussa", "View_All" : "Katso kaikki", "Wait_activation_warning" : "Ennen kuin voit kirjautua, tunnuksesi pitää aktivoida ylläpitäjän toimesta.", "We_have_sent_password_email" : "Lähetimme salasanan nollausohjeet sähköpostiisi. Mikäli et saanut sähköpostia, yritä uudelleen.", @@ -441,11 +510,16 @@ "Welcome" : "Tervetuloa %s.", "Welcome_to_the" : "Tervetuloa", "With_whom" : "kanssa", + "Yes" : "Kyllä", "Yes_clear_all" : "Jep, tyhjennä kaikki!", "Yes_delete_it" : "Kyllä, poista!", "you_are_in_preview_mode_of" : "Tämä on kanavan #__room_name__ esikatselutila", + "You_can_change_a_different_avatar_too" : "Voit vaihtaa myös toisen avatarin", "You_need_confirm_email" : "Sinun tulee vahvistaa sähköpostiosoitteesi!", + "You_need_install_an_extension_to_allow_screen_sharing" : "Sinun tarvitsee asentaa laajennus mahdollistaaksesi näytön jakamisen", + "You_should_name_it_to_easily_manage_your_integrations" : "Nimeä siten, että sinun on helppo hallita integraatioitasi", "You_will_not_be_able_to_recover" : "Viestin palauttaminen ei ole mahdollista!", "Your_entry_has_been_deleted" : "Your entry has been deleted.", - "Your_Open_Source_solution" : "Your own Open Source chat solution" + "Your_Open_Source_solution" : "Your own Open Source chat solution", + "Your_push_was_sent_to_s_devices" : "Push-viesti lähetettiin %s laitteeseen" } \ No newline at end of file diff --git a/i18n/km.i18n.json b/i18n/km.i18n.json index 7eec24db6be1..696cdec725e1 100644 --- a/i18n/km.i18n.json +++ b/i18n/km.i18n.json @@ -77,6 +77,7 @@ "busy_male" : "រវល់", "Busy_male" : "រវល់", "Cancel" : "បញ្ឈប់", + "CDN_PREFIX" : "CDN បុព្វបទ", "Change_avatar" : "ប្តូរ​រូប", "Channels" : "ប៉ុស្តិ៍", "Channels_list" : "បណ្តាប៉ុស្តិ៍​សាធារណៈ", @@ -185,8 +186,10 @@ "LDAP" : "ប្រើ LDAP", "LDAP_Bind_Search" : "ចំណងស្វែងរក", "LDAP_DN" : " LDAP DN", + "LDAP_DN_Description" : "ការស្វែង root; ឧទាហរណ៍ dc=domain, dc=com", "LDAP_Enable" : "អនុញ្ញាតិ LDAP", "LDAP_Port" : "ច្រក LDAP", + "LDAP_Port_Description" : "ផែដើម្បីចូលទៅកាន់ LDAP ត្រង់លេខ; ឧទាហរណ៍៖ 389 ", "LDAP_Sync_User_Data" : "រក្សាទិន្នន័យ User ដោយ Sync ជាមួយ Server", "LDAP_Url" : "URL របស់ LDAP", "Leave_room" : "ចេញ​ពីបន្ទប់", @@ -374,6 +377,8 @@ "The_field_is_required" : "ចន្លោះ %s ត្រូវ​បំពេញ", "True" : "ពិត", "Unnamed" : "គ្មាន​ឈ្មោះ", + "Unread_Rooms" : "បន្ទប់​ដែល​មិនទាន់​អាន", + "Unread_Rooms_Mode" : "របៀប​បន្ទប់​ដែល​មិនទាន់​អាន", "Upload_file_question" : "ផ្ទុក​ឯកសារ​ឡើង​ឬ?", "Use_Emojis" : "ប្រើ Emoji", "Use_initials_avatar" : "ប្រើឈ្មោះ​អ្នក​ជា​ពិសេស", diff --git a/i18n/ku.i18n.json b/i18n/ku.i18n.json new file mode 100644 index 000000000000..6a7fb207c0d2 --- /dev/null +++ b/i18n/ku.i18n.json @@ -0,0 +1,120 @@ +{ + "Access_online_demo" : "سەیری دێمۆی سەرهێڵ بکە", + "Access_Online_Demo" : "سەیری دێمۆی سەرهێڵ بکە", + "Add_users" : "بەکارهێنەر زیادبکە", + "and" : "و", + "are_also_typing" : "ئەوانیش ئەنوسن", + "are_typing" : "ئەنوسن", + "Back_to_integrations" : "گەڕانەوە بۆ تێهەڵکێشان", + "Cancel" : "پوچکردنەوە", + "Channels" : "کەناڵەکان", + "Channels_list" : "لیستی کەناڵه گشتیەکان", + "Chat_Rooms" : "ژوورەکانی چات", + "Choose_the_username_that_this_integration_will_post_as" : "ناوی بەکارهێنەرێ هەڵبژێرە کە ئەم تێهەڵکێشانە بڵاوکرێتەوە بە ناویەوە.", + "close" : "داخستن", + "Confirm_password" : "تێپەڕەوشەکەت پشتڕاستکەوە", + "Contact" : "پەیوەندیەکان", + "Conversation" : "گفتوگۆ", + "COPY_TO_CLIPBOARD" : "کۆپی بکە", + "Create_new_public_channel" : "کەناڵێکی گشتی دروست بکە", + "Created_at" : "دروستکرا لە", + "Direct_Messages" : "نامەی ڕاستەوخۆ", + "edited" : "دەستکاریکرا", + "Email_or_username" : "ئیمەیڵ یان ناوی بەکارهێنەر", + "Email_verified" : "ئیمەیڵ پشتڕاستکرایەوە", + "Enter_info" : "زانیاریەکانت تێ بکە", + "Error_changing_password" : "هەڵە ڕوویدا لە گۆڕینی تێپەڕەوشە", + "Favorites" : "دڵخوازەکان", + "FileUpload_MediaType_NotAccepted" : "جۆری میدیا ڕێ پێدراو نیە", + "Follow_social_profiles" : "لە پرۆفایلە کۆمەڵایەتیەکانمان شوێنمان کەوە، فۆرکمان بکە لە گیتهەب و بۆچوونەکانت بەش بکە دەربارەی ڕۆکێت.چات لەسەر بۆردی ترێلۆ'کەمان", + "Forgot_password" : "تێپەڕەوشەت بیرچوە", + "Fork_it_on_github" : "فۆرکی بکە لە گیتهەب", + "github_no_public_email" : "لە هەژماری گیتهەبەکەت هیچ ئیمەیڵێکی کراوەی گشتیت نیە", + "Have_your_own_chat" : "تۆڕی چاتکردنی خۆتت هەبێت. پەرەپێدراو بە Meteor.com، ڕۆکێت چات بژاردەیەکی زۆر چاکە بۆ پەرەپێدەرانێک بەدوای دروستکردن و گەشەپێدانی پلاتفۆرمی چاتی خۆیاندا بگەڕێن.", + "Hide_room" : "شاردنەوەی ژوور", + "History" : "مێژوو", + "Integration_Incoming_WebHook" : "تێهەڵکێشانی هاتوو لە WebHook", + "Integration_New" : "تێهەڵکێشانی تازە", + "Integrations" : "تێهەڵکێشان", + "Invalid_confirm_pass" : "دووبارەکراوەی تێپەڕەوشە یەکناگرێتەوە لەگەڵ تێپەڕەوشە", + "Invalid_email" : "ئیمەیڵی نوسراو هەڵەیە.", + "Invalid_name" : "ناو نابێ بەتاڵ بێت", + "Invalid_pass" : "تێپەڕەوشە نابێ بەتاڵ بێت", + "Invalid_room_name" : "%s ناوێکی دروست نیە بۆ ژوور،
تەنها پیت، ژمارە و داش بەکاربهێنە", + "is_also_typing" : "یش ئەنوسێ", + "is_typing" : "ئەنوسێ", + "Join_the_Community" : "پەیوەندی بکە بە کۆمەڵگاکەوە", + "Language_Version" : "وەشانی ئینگلیزی", + "Last_message" : "دوا نامە", + "Leave_room" : "جێهێشتنی ژوور", + "Load_more" : "زیاتر بارکە", + "Loading_suggestion" : "بژاردەکان بارئەکرێن...", + "Login" : "چوونەژوور", + "login_with" : "یان بچۆ ژوورەوە بە", + "Members" : "ئەندامان", + "Members_List" : "لیستی ئەندامان", + "Members_placeholder" : "ئەندامان", + "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here" : "ئەو نامانەی ئەنێردرێن بۆ WebHookە هاتوەکان لێرە دا ئەنرێت", + "More_channels" : "کەناڵی تر", + "Msgs" : "نامەکان", + "n_messages" : "%s نامە", + "Name" : "ناو", + "New_integration" : "تێهەڵکێشانی تازە", + "New_messages" : "نامە تازەکان", + "New_password" : "تێپەڕەوشەی نوێ", + "No_channels_yet" : "تۆ هێشتا لە هیچ کەناڵێک نیت.", + "No_direct_messages_yet" : "تۆ هێشتا هیچ گفتوگۆیەکت دەست پێنەکردوە.", + "No_favorites_yet" : "هێشتا هیچ شتێکت دڵخواز نەکردوە.", + "No_groups_yet" : "هێشتا گروپی تایبەتت نیە.", + "No_permission_to_view_room" : "مۆڵەتت پێنەدراوە ئەم ژوورە ببینیت", + "Nothing_found" : "هیچ نەدۆزرایەوە", + "optional" : "بژاردەییە", + "Password" : "تێپەڕەوشە", + "Please_wait" : "تکایە چاوەڕێ بە", + "Post_as" : "بڵاویکەوە بەناوی", + "Post_to_Channel" : "بینێر بۆ کەناڵ", + "Powered_by" : "پشتبەستوو بە", + "Private_Groups" : "گروپی تایبەت", + "Proudly_developed" : "بە شانازیەوە گەشەی پێدراوە بە میتیۆ", + "Quick_Search" : "گەڕانی خێرا", + "Recents" : "تازەکان", + "Register" : "بۆ هەژماری نوێ خۆت تۆمارکە", + "Remember_me" : "منت بیر بێ", + "Remove" : "لایبە", + "Reset_password" : "تێپەڕەوشە دابنێرەوە", + "Restart" : "هەڵکردنەوە", + "Restart_the_server" : "ڕاژەکارەکە هەڵکەرەوە", + "Room" : "ژوور", + "Room_name_changed" : "ناوی ژوور گۆڕدرا بۆ: __room_name__ لەلایەن __user_by__", + "Room_name_changed_successfully" : "ناوی ژوور بەسەرکەوتوویی گۆڕدرا", + "Search" : "گەڕان", + "See_all" : "هەموو ببینە", + "See_only_online" : "تەنها سەرهێڵ", + "Selected_users" : "ئەندامانی هەڵبژێردراو", + "Send_confirmation_email" : "ئیمەیڵی پشتڕاستکردنەوە بنێرە", + "Send_data_into_RocketChat_in_realtime" : "داتا بنێر بۆ ڕۆکێت.چات بە لەهەمان کاتدا", + "Send_Message" : "نامەی نوێ", + "Send_your_JSON_payloads_to_this_URL" : "پەیلۆدە جەیسنەکانت بنێرە بۆ ئەم URL", + "Should_exists_a_user_with_this_username" : "ئەبێ بەکارهێنەرێ بەم ناوە هەبێت", + "Showing_online_users" : "__total_online__ لە __total__ users نیشاندراوە", + "Showing_results" : "

نیشاندانی %s ئەنجام

", + "since_creation" : "لە %s ـەوە", + "Start_of_conversation" : "سەرەتای گفتوگۆ", + "Submit" : "ناردن", + "The_server_will_restart_in_s_seconds" : "ڕاژەکارەکە هەڵ ئەبێتەوە لە %s چرکەدا", + "use_menu" : "مێنوی لاتەنیشت بەکاربهێنە بۆ چوونە ناو ژوور و چاتەکانت", + "User_added_by" : "بەکارهێنەر __user_added__ زیادکرا لەلایەن __user_by__.\n", + "User_left" : "کەناڵی جێهێشت.", + "User_logged_out" : "بەکارهێنەر چوە دەرەوە", + "User_removed_by" : "بەکارهێنەر __user_removed__ لابرا لەلایەن __user_by__.", + "Username" : "ناوی بەکارهێنەر", + "UTF8_Names_Slugify" : "نازناو بۆ ناوی UTF8", + "UTF8_Names_Validation" : "پشتڕاستکردنەوەی ناوی UTF8", + "View_All" : "هەموو ببینە", + "We_have_sent_password_email" : "ئێمە ئیمەیڵێکمان بۆ ناردی بۆ ئەوەی تێپەڕەوشەکەت دانێیتەوە. ەگەر ئیمەیڵەکە بەم زوانە نەهات، تکایە وەرەوە و دووبارە هەوڵ بدەرەوە.", + "We_have_sent_registration_email" : "ئێمە ئیمەیڵێکمان بۆ ناردی بۆ دڵنیاکردنەوە لە تۆمارکردنەکەت. ئەگەر ئیمەیڵەکە بەم زوانە نەهات، تکایە وەرەوە و دووبارە هەوڵ بدەرەوە.", + "Welcome" : "خێرهاتی %s.", + "Welcome_to_the" : "خێرهاتی بۆ", + "You_need_confirm_email" : "ئەبێ ئیمەیڵەکەت پشتڕاستکەیتەوە تا بچیتە ژوور.", + "Your_Open_Source_solution" : "چاتی سەرچاوە کراوەی خۆت" +} \ No newline at end of file diff --git a/i18n/lo.i18n.json b/i18n/lo.i18n.json new file mode 100644 index 000000000000..11c7f733bb6b --- /dev/null +++ b/i18n/lo.i18n.json @@ -0,0 +1,6 @@ +{ + "Channels" : "ຊ່ອງ​ທາງ​ການ", + "edited" : "ແກ້​ໄຂ", + "User_left" : "ໄດ້​ປະ​ໄວ້​ຊ່ອງ​ທາງ​ການ​.", + "New_password" : "ລະ​ຫັດ​ຜ່ານ​ໃຫມ່" +} \ No newline at end of file diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json new file mode 100644 index 000000000000..0e3339390231 --- /dev/null +++ b/i18n/nl.i18n.json @@ -0,0 +1,294 @@ +{ + "Access_online_demo" : "Toegang tot de online demo", + "Access_Online_Demo" : "Toegang tot de online demo", + "Accounts_denyUnverifiedEmail" : "Weiger ongeverifieerde e-mail", + "Accounts_EmailVerification" : "Email verificatie", + "Accounts_OAuth_Facebook" : "Facebook Inloggen", + "Accounts_OAuth_Facebook_id" : "Facebook App Id", + "Accounts_OAuth_Facebook_secret" : "Facebook Secret", + "Accounts_OAuth_Github" : "OAuth Ingeschakeld", + "Accounts_OAuth_Github_id" : "Client Id", + "Accounts_OAuth_Github_secret" : "Client Secret", + "Accounts_OAuth_Google" : "Google Inloggen", + "Accounts_OAuth_Google_id" : "Google Id", + "Accounts_OAuth_Google_secret" : "Google Secret", + "Accounts_OAuth_Linkedin" : "LinkedIn Inloggen", + "Accounts_OAuth_Linkedin_id" : "LinkedIn Id", + "Accounts_OAuth_Linkedin_secret" : "LinkedIn Secret", + "Accounts_OAuth_Meteor" : "Meteor Inloggen", + "Accounts_OAuth_Meteor_id" : "Meteor Id", + "Accounts_OAuth_Meteor_secret" : "Meteor Secret", + "Accounts_OAuth_Twitter" : "Twitter Inloggen", + "Accounts_OAuth_Twitter_id" : "Twitter Id", + "Accounts_OAuth_Twitter_secret" : "Twitter Secret", + "Accounts_RegistrationRequired" : "Registratie vereist", + "Add_Members" : "Voeg leden toe", + "Add_users" : "Gebruikers toevoegen", + "Administration" : "Administratie", + "All_channels" : "Alle kanalen", + "and" : "en", + "API_Analytics" : "Analytics", + "API_Embed" : "Embed", + "are_also_typing" : "zijn ook aan het typen", + "are_typing" : "zijn aan het typen", + "Are_you_sure" : "Weet u het zeker?", + "Avatar_changed_successfully" : "Afbeelding is gewijzigd", + "away" : "Afwezig", + "Away" : "Afwezig", + "away_female" : "afwezig", + "Away_female" : "Afwezig", + "away_male" : "afwezig", + "Away_male" : "Afwezig", + "Back_to_login" : "Terug naar Inloggen", + "bold" : "vetgedrukt", + "busy" : "Bezet", + "Busy" : "Bezet", + "busy_female" : "bezet", + "Busy_female" : "Bezet", + "busy_male" : "bezet", + "Busy_male" : "Bezet", + "Cancel" : "Annuleren", + "Change_avatar" : "Verander uw foto", + "Channels" : "Kanalen", + "Channels_list" : "Lijst van de openbare kanalen", + "Chat_Rooms" : "Kanalen", + "close" : "Sluiten", + "coming_soon" : "binnekort beschikbaar", + "Confirm_password" : "Bevestig uw wachtwoord", + "Contact" : "Contact", + "Conversation" : "Gesprek", + "Create_new" : "Maak nieuw", + "Create_new_direct_message_room" : "Maak een nieuw direct bericht kamer", + "Create_new_private_group" : "Maak een nieuwe privé-groep", + "Create_new_public_channel" : "Maak een nieuw publiek kanaal", + "Created_at" : "Gemaakt op", + "days" : "dagen", + "Delete_User_Warning" : "Een gebruiker verwijderen betekent dat alle berichten van die gebruiker ook verwijderd worden. Dit kan niet ongedaan gemaakt worden.", + "Deleted" : "Verwijderd!", + "Direct_Messages" : "Directe berichten", + "Drop_to_upload_file" : "Sleep hierheen om een bestand te uploaden", + "Duplicate_channel_name" : "Een kanaal met de naam '%s' bestaat reeds", + "Duplicate_private_group_name" : "Een privé-groep met de naam '%s' bestaat reeds", + "E-mail" : "E-mail", + "edited" : "bewerkt", + "Email_already_exists" : "Emailadres bestaat al", + "Email_or_username" : "E-mail of gebruikersnaam", + "Email_verified" : "E-mail geverifiëerd", + "Enter_info" : "Voer uw gegevens in", + "Error_changing_password" : "Fout bij het veranderen van het wachtwoord", + "False" : "False", + "Favorites" : "Favorieten", + "Follow_social_profiles" : "Volg ons via de sociale netwerken, kopieer ons op GitHub en deel uw mening over de rocket.chat app op onze Trello pagina.", + "Forgot_password" : "Wachtwoord vergeten", + "Fork_it_on_github" : "Kopieer ons op GitHub", + "Get_to_know_the_team" : "Maak kennis met het Rocket.Team", + "github_no_public_email" : "U heeft geen openbaar e-mail adres in uw GitHub toegang", + "Have_your_own_chat" : "Gebruik uw eigen webchat. Ontwikkeld met Meteor.com, Rocket.Chat is een goede oplossing voor ontwikkelaars omeenn eigen chat-platform in te richten en te ontwikkelen.", + "Hide_room" : "Kamer verbergen", + "History" : "Geschiedenis", + "hours" : "uur", + "inline_code" : "inline_code", + "Invalid_confirm_pass" : "De wachtwoorden zijn niet gelijk", + "Invalid_email" : "Ongeldig e-mail adres", + "Invalid_name" : "De naam mag niet leeg zijn", + "Invalid_pass" : "Het wachtwoord mag niet leeg zijn", + "Invalid_room_name" : "%s is geen geldige naam,
gebruik alleen letters, cijfers en streepjes", + "invisible" : "onzichtbaar", + "Invisible" : "Onzichtbaar", + "is_also_typing" : "is ook aan het typen", + "is_also_typing_female" : "is ook aan het typen", + "is_also_typing_male" : "is ook aan het typen", + "is_typing" : "is aan het typen", + "is_typing_female" : "is aan het typen", + "is_typing_male" : "is aan het typen", + "italics" : "cursief", + "join" : "Toetreden", + "Join_the_Community" : "Word lid", + "Language" : "Taal", + "Language_Version" : "Nederlndse versie", + "Last_login" : "Laatste aanmelding", + "Last_message" : "Laatste bericht", + "Layout_Home_Body" : "Home Body", + "Layout_Home_Title" : "Home Titel", + "Layout_Sidenav_Footer" : "Side Navigation Footer", + "Layout_Sidenav_Footer_description" : "Footer afmetingen is 260 x 70px", + "LDAP_DN" : "Distinguished Name (DN)", + "LDAP_Port" : "LDAP Port", + "LDAP_Url" : "LDAP URL", + "Leave_room" : "Kamer verlaten", + "line" : "lijn", + "Load_more" : "Meer laden", + "Loading..." : "Laden ...", + "Loading_suggestion" : "Suggesties laden...", + "Login" : "Log In", + "Login_with" : "Login met %s", + "login_with" : "Of log in met", + "Logout" : "Uitloggen", + "Make_Admin" : "Maak Admin", + "Members" : "Leden", + "Members_List" : "Ledenlijst", + "Members_placeholder" : "Leden", + "Message" : "Bericht", + "Message_AllowDeleting" : "Bericht verwijderen toestaan", + "Message_AllowEditing" : "Bericht bewerken toestaan", + "Message_deleting_not_allowed" : "Bericht verwijderen niet toegestaan", + "Message_editing_not_allowed" : "Bericht bewerken niet toegestaan", + "Message_KeepHistory" : "Bewaar berichten geschiedenis", + "Message_removed" : "Bericht verwijderd", + "Message_ShowDeletedStatus" : "Toon Verwijderde Status", + "Message_ShowEditedStatus" : "Toon Gewijzigde Status", + "Meta_fb_app_id" : "Facebook App Id", + "Meta_google-site-verification" : "Google Site Verification", + "Meta_language" : "Taal", + "Meta_msvalidate01" : "MSValidate.01", + "Meta_robots" : "Robots", + "minutes" : "minuten", + "More_channels" : "Meer kanalen", + "Msgs" : "Berichten", + "multi" : "multi", + "My_Account" : "Mijn account", + "n_messages" : "%s berichten", + "Name" : "Naam", + "New_messages" : "Nieuwe berichten", + "New_password" : "Nieuw Wachtwoord", + "No_channel_with_name_%s_was_found" : "Geen kanaal met de naam \"%s\" gevonden", + "No_channels_yet" : "U maakt nog geen deel uit van een kanaal.", + "No_direct_messages_yet" : "U bent nog geen gesprekken begonnen.", + "No_favorites_yet" : "U heeft nog geen favorieten toegevoegd.", + "No_group_with_name_%s_was_found" : "Geen privé-groep met de naam \"%s\" gevonden", + "No_groups_yet" : "U heeft nog geen privé-groepen.", + "No_permission_to_view_room" : "U heeft geen toestemming dit kanaal te bekijken", + "No_user_with_username_%s_was_found" : "Geen gebruiker met de naam \"%s\" gevonden", + "Not_allowed" : "Niet toegestaan", + "Not_found_or_not_allowed" : "Niet gevonden of niet toegestaan", + "Nothing_found" : "Niets gevonden", + "Notify_all_in_this_room" : "Meld aan iederen in deze kamer", + "Online" : "Online", + "Oops!" : "Oeps", + "others" : "anderen", + "Password" : "Wachtwoord", + "Password_changed_successfully" : "Wachtwoord succesvol gewijzigd", + "Please_wait" : "Wacht alstublieft", + "Please_wait_activation" : "Even geduld, dit kan enige tijd duren.", + "Please_wait_statistics" : "Even geduld, er worden statistieken gegenereerd.", + "Powered_by" : "Mede mogelijk gemaakt door", + "Privacy" : "Privacy", + "Private_Groups" : "Privé groepen", + "Profile" : "Profiel", + "Profile_saved_successfully" : "Profiel succesvol opgeslagen", + "Proudly_developed" : "Ontwikkeld met Meteor", + "Push_apn_cert" : "APN Certificaat", + "Push_apn_dev_cert" : "APN Ontwikkelaars Certificaat", + "Push_apn_dev_key" : "APN Ontwikkelaars Sleutel", + "Push_apn_dev_passphrase" : "APN Ontwikkelaars Wachtwoord", + "Push_apn_key" : "APN Key", + "Push_apn_passphrase" : "APN Wachtwoord", + "Push_debug" : "Debug", + "Push_enable" : "Enable", + "Push_production" : "Productie", + "Quick_Search" : "Snelzoeken", + "quote" : "citaat", + "Recents" : "Recente", + "Register" : "Registreer een nieuwe gebruiker", + "Registration_Succeeded" : "Registratie Geslaagd", + "Remember_me" : "Onthou me", + "Remove" : "Verwijderen", + "Remove_Admin" : "Verwijder Admin", + "Reset_password" : "Nieuw Wachtwoord", + "Room" : "Kamer", + "Room_name_changed" : "Naam van de kamer veranderd in: __room_name__ door __user_by__", + "Room_name_changed_successfully" : "Naam van het kanaal is aangepast", + "Room_not_found" : "Kamer niet gevonden", + "room_user_count" : "%s gebruikers", + "Save_changes" : "Wijzigingen opslaan", + "Search" : "Zoeken", + "Search_settings" : "Zoekinstellingen", + "seconds" : "secondes", + "See_all" : "Alles zien", + "See_only_online" : "Alleen online", + "Select_an_avatar" : "Selecteer een afbeelding", + "Select_file" : "Selecteer bestand", + "Select_service_to_login" : "Selecteer een dienst in te loggen om uw foto op te halen of  upload er één van uw computer", + "Selected_users" : "Geselecteerde leden", + "Send_confirmation_email" : "Bevestigings e-mail te sturen", + "Send_Message" : "Bericht verzenden", + "Settings" : "Instellingen", + "Settings_updated" : "Instellingen bijgewerkt", + "Showing_online_users" : "Toont __total_online__ van de __total__ gebruikers", + "Showing_results" : "

Toon %s resultaten

", + "Silence" : "Stilte", + "since_creation" : "sinds%s", + "SMTP_Host" : "SMTP Host", + "SMTP_Password" : "SMTP-wachtwoord", + "SMTP_Port" : "SMTP Poort", + "SMTP_Username" : "SMTP Gebruikersnaam", + "Start_of_conversation" : "Begin van het gesprek", + "Stats_Active_Users" : "Actieve gebruikers", + "Stats_Avg_Channel_Users" : "Gemiddeld aantal Kanaal Gebruikers", + "Stats_Avg_Private_Group_Users" : "Gemiddeld aantal Privé Groep Gebruikers", + "Stats_Max_Room_Users" : "Maximaal aantal Kamer Gebruikers", + "Stats_Non_Active_Users" : "Inactieve Gebruikers", + "Stats_Offline_Users" : "Offline Gebruikers", + "Stats_Online_Users" : "Online Gebruikers", + "Stats_OS_Arch" : "OS Arch", + "Stats_OS_Cpus" : "OS CPU Count", + "Stats_OS_Freemem" : "OS Free Memory", + "Stats_OS_Loadavg" : "OS Load Gemiddeld", + "Stats_OS_Platform" : "OS Platform", + "Stats_OS_Release" : "OS Versie", + "Stats_OS_Totalmem" : "OS Totaal geheugen", + "Stats_OS_Type" : "OS Type", + "Stats_OS_Uptime" : "OS Uptime", + "Stats_Total_Channels" : "Totaal Kanalen", + "Stats_Total_Direct_Messages" : "Totaal Directe Berichten Kamers", + "Stats_Total_Private_Groups" : "Totaal Privé Groepen", + "Stats_Total_Rooms" : "Totaal aantal Kamers", + "Stats_Total_Users" : "Totaal aantal leden", + "strike" : "doorhalen", + "Submit" : "Verzenden", + "The_field_is_required" : "Het veld %s is vereist.", + "True" : "True", + "Unnamed" : "Naamloos", + "Upload_file_question" : "Bestand uploaden?", + "Use_initials_avatar" : "Gebruik de initialen van uw gebruikersnaam", + "use_menu" : "Gebruik het menu aan de zijkant om toegang te krijgen tot de kanalen en privé gesprekken", + "Use_service_avatar" : "Gebruik %s afbeelding", + "Use_this_username" : "Gebruik deze gebruikersnaam", + "Use_uploaded_avatar" : "Gebruik geüploade afbeelding", + "User_added_by" : "Gebruiker __user_added__ toegevoegd door __user_by__", + "User_has_been_activated" : "Gebruiker is geactiveerd", + "User_has_been_deactivated" : "Gebruiker is gedeactiveerd", + "User_has_been_deleted" : "Gebruiker is verwijderd", + "User_is_no_longer_an_admin" : "Gebruiker is niet langer een admin", + "User_is_not_activated" : "Gebruiker is niet geactiveerd", + "User_is_now_an_admin" : "Gebruiker is nu een admin", + "User_joined_channel" : "Heeft zich aangesloten bij het kanaal.", + "User_joined_channel_female" : "Heeft zich aangesloten bij het kanaal.", + "User_joined_channel_male" : "Heeft zich aangesloten bij het kanaal.", + "User_left" : "Heeft het kanaal verlaten.", + "User_left_female" : "Heeft het kanaal verlaten.", + "User_left_male" : "Heeft het kanaal verlaten.", + "User_logged_out" : "Gebruiker is uitgelogd", + "User_removed_by" : "Gebruiker __user_removed__ verwijderd door  __user_by__.", + "User_Settings" : "Gebruikersinstellingen", + "User_updated_successfully" : "Gebruiker succesvol bijgewerkt", + "Username" : "Gebruikersnaam", + "Username_cant_be_empty" : "De gebruikersnaam mag niet leeg zijn", + "Username_description" : "De gebruikersnaam kan door anderen gebruikt worden om aan u te refereren.", + "Username_invalid" : "%s is geen geldige gebruikersnaam,
gebruik uitsluitend letters, cijfers, punten en streepjes", + "Username_title" : "Registreer Gebruikersnaam", + "Username_unavaliable" : "%s is al in gebruik :(", + "View_All" : "Bekijk alles", + "Wait_activation_warning" : "Voordat u kunt inloggen, moet uw account handmatig worden geactiveerd door een beheerder.", + "We_have_sent_password_email" : "Wij hebben u een e-mail gestuurd met herstel instructies voor uw wachtwoord. Als u deze e-mail niet snel ontvangt, ook niet in uw spam-folder, kom dan terug en probeer het opnieuw.", + "We_have_sent_registration_email" : "Wij hebben een e-mail gestuurd om uw registratie te bevestigen. Als u deze e-mail niet snel ontvangt, ook niet in uw spam-folder, kom dan terug en probeer het opnieuw.", + "Welcome" : "Welkom %s.", + "Welcome_to_the" : "Welkom bij de", + "With_whom" : "Met wie", + "Yes_delete_it" : "Ja, verwijder het!", + "you_are_in_preview_mode_of" : "U kijkt naar de voorbeschouwing van kanaal #__room_name__", + "You_need_confirm_email" : "U dient uw e-mail te bevestigen on in te kunnen loggen!", + "You_will_not_be_able_to_recover" : "Dit bericht zal niet meer te herstellen zijn!", + "Your_entry_has_been_deleted" : "Uw bericht is verwijderd.", + "Your_Open_Source_solution" : "Uw eigen Open Source chat-oplossing" +} \ No newline at end of file diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json index b7d0b3fa80f7..040ad0cf6947 100644 --- a/i18n/pl.i18n.json +++ b/i18n/pl.i18n.json @@ -1,20 +1,22 @@ { + "Access_not_authorized" : "Dostęp zabroniony", "Access_online_demo" : "Uzyskaj dostęp do demo online", "Access_Online_Demo" : "Uzyskaj dostęp do demo online", - "Access_not_authorized" : "Dostęp zabroniony", "Accounts" : "Konta", "Accounts_AllowedDomainsList" : "Lista dozwolonych domen", "Accounts_AllowedDomainsList_Description" : "Lista dozwolonych domen oddzielona przecinkami", "Accounts_AllowPasswordChange" : "Pozwól na zmianę hasła", "Accounts_AllowUserAvatarChange" : "Pozwól na zmienianie avatarów", - "Accounts_AllowUserProfileChange" : "Pozwól na zmienianie profilów użytkowników", "Accounts_AllowUsernameChange" : "Pozwól na zmianę nazwy użytkownika", + "Accounts_AllowUserProfileChange" : "Pozwól na zmienianie profilów użytkowników", "Accounts_AvatarResize" : "Zmiana rozmiaru avatarów", "Accounts_AvatarSize" : "Rozmiar avataru", "Accounts_AvatarStorePath" : "Ścieżka przechowywania avatarów", "Accounts_AvatarStoreType" : "Rodzaj magazynu avatarów", "Accounts_denyUnverifiedEmail" : "Odrzucaj niezweryfikowane adresy email", "Accounts_EmailVerification" : "Weryfikacja adresu email", + "Accounts_Enrollment_Email" : "Adres email do rekrutacji", + "Accounts_Enrollment_Email_Description" : "Możesz użyć znaczników [name], [fname], [lname] by wstawić odpowiednio pełną nazwę użytkownika, jego imię, nazwisko.
\nMożesz użyć znacznika [email] by wstawić adres email użytkownika.", "Accounts_ManuallyApproveNewUsers" : "Ręczne zatwierdzanie nowych użytkowników", "Accounts_OAuth_Custom_Authorize_Path" : "Authorize Path", "Accounts_OAuth_Custom_Button_Color" : "Kolor przycisku", @@ -49,16 +51,14 @@ "Accounts_OAuth_Twitter_secret" : "Twitter Secret", "Accounts_Registration_AuthenticationServices_Enabled" : "Rejestracja przy użyciu serwisów zewnętrznych", "Accounts_RegistrationForm" : "Formularz rejestracyjny", - "Accounts_RegistrationForm_Public" : "Publiczny", "Accounts_RegistrationForm_Disabled" : "Wyłączony", "Accounts_RegistrationForm_LinkReplacementText" : "Treść tekstu zamiennego w formularzu rejestracyjnym", + "Accounts_RegistrationForm_Public" : "Publiczny", "Accounts_RegistrationForm_Secret_URL" : "Sekretny adres URL", "Accounts_RegistrationForm_SecretURL" : "Sekretny adres URL formularza rejestracyjnego", - "Accounts_RegistrationRequired" : "Wymagana rejestracja", + "Accounts_RegistrationRequired" : "Musisz się zarejestrować", "Accounts_RequireNameForSignUp" : "Wymagaj podana nazwy podczas rejestracji", - "Accounts_Enrollment_Email" : "Adres email do rekrutacji", - "Accounts_Enrollment_Email_Description" : "Możesz użyć znaczników [name], [fname], [lname] by wstawić odpowiednio pełną nazwę użytkownika, jego imię, nazwisko.
\nMożesz użyć znacznika [email] by wstawić adres email użytkownika.", - "Activate" : "Aktywować", + "Activate" : "Aktywuj", "Add_custom_oauth" : "Dodaj własne OAuth", "Add_Members" : "Dodaj członków", "Add_users" : "Dodaj użytkowników", @@ -68,22 +68,22 @@ "Allow_Invalid_SelfSigned_Certs_Description" : "Pozwól na nieprawidłowe i samodzielnie podpisane certyfikaty SSL podczas walidacji linków i podglądów", "and" : "i", "API" : "API", - "API_Analytics" : "Analityka", + "API_Analytics" : "Analytics", "API_Embed" : "Osadź", "API_EmbedDisabledFor" : "Wyłądz osadzanie dla użytkowników", "API_EmbedDisabledFor_Description" : "Lista użytkowników oddzielonych przecinkami", "are_also_typing" : "również piszą", "are_typing" : "piszą", - "Are_you_sure" : "Potwierdź, czy na pewno?", + "Are_you_sure" : "Jesteś pewny?", "Auto_Load_Images" : "Automatycznie ładuj zdjęcia", - "Avatar_changed_successfully" : "Avatar zmieniony z powodzeniem", + "Avatar_changed_successfully" : "Twój avatar został zapisany", "Avatar_url_invalid_or_error" : "Podany adres URL jest nieprawidłowy. Popraw go i spróbuj ponownie.", - "away" : "poza", - "Away" : "Poza", - "away_female" : "poza", - "Away_female" : "Poza", - "away_male" : "poza", - "Away_male" : "Poza", + "away" : "zaraz wracam", + "Away" : "Zaraz wracam", + "away_female" : "zaraz wracam", + "Away_female" : "Zaraz wracam", + "away_male" : "zaraz wracam", + "Away_male" : "Zaraz wracam", "Back_to_login" : "Wróć do strony logowania", "bold" : "pogrubienie", "busy" : "zajęty", @@ -107,31 +107,31 @@ "Contact" : "Kontakt", "Conversation" : "Rozmowa", "Convert_Ascii_Emojis" : "Konwertuj ASCII do Emoji", - "Create_new" : "Utwórz nowe", - "Create_new_direct_message_room" : "Utwórz nowy kanał prywatny", + "Create_new" : "Utwórz", + "Create_new_direct_message_room" : "Nowa prywatna rozmowa", "Create_new_private_group" : "Utwórz prywatną grupę", "Create_new_public_channel" : "Utwórz kanał publiczny", "Created_at" : "Utworzono", "Custom_oauth_helper" : "Przy konfiguracji dostawcy OAuth będziesz musiał podać zwrotny adres URL (Callback). Użyj adresu
%s
.", "Custom_oauth_unique_name" : "Nazwa własnego serwisu OAuth", "days" : "dni", - "Deactivate" : "Dezaktywować", + "Deactivate" : "Deaktywuj", "Delete_Room_Warning" : "Usunięcie pokoju wiąże się z usunięciem wszystkich wiadomości wysłanych do niego. Tej operacji nie można cofnąć.", "Delete_User_Warning" : "Usunięcie użytkownika wiąże się z usunięciem wszystkich jego wiadomości. Tej czynności nie można cofnąć.", "Deleted" : "Usunięte!", "Desktop_Notifications" : "Powiadomienia na pulpicie", "Desktop_Notifications_Disabled" : "Powiadomienia na pulpicie są wyłączone. Zmień ustawienia swojej przeglądarki jeżeli chcesz włączyć powiadomienia.", "Desktop_Notifications_Enabled" : "Powiadomienia na pulpicie są włączone", - "Direct_Messages" : "Bezpośrednie wiadomości", + "Direct_Messages" : "Prywatne wiadomości", "Disable_Favorite_Rooms" : "Wyłącz ulubione", "Disable_New_Message_Notification" : "Wyłącz powiadomienia dla nowych wiadomości", "Disable_New_Room_Notification" : "Wyłącz powiadomienia dla nowych kanałów", "Drop_to_upload_file" : "Przeciągnij, aby przesłać plik", - "Duplicate_channel_name" : "Kanał o nazwie \"% s\" istnieje", - "Duplicate_private_group_name" : "Grupa Prywatna o nazwie '% s' istnieje", + "Duplicate_channel_name" : "Kanał o nazwie \"%s\" już istnieje", + "Duplicate_private_group_name" : "Grupa Prywatna o nazwie '%s' istnieje", "E-mail" : "Email", "edited" : "zmieniono", - "Email_already_exists" : "Email już istnieje", + "Email_already_exists" : "Ten email jest zajęty", "Email_or_username" : "Email lub nazwa użytkownika", "Email_verified" : "E-mail zweryfikowany", "Emoji" : "Emoji", @@ -141,16 +141,16 @@ "Error_changing_password" : "Błąd zmiany hasła", "Error_too_many_requests" : "Błąd, zbyt wiele żądań. Proszę zwolnij. Musisz poczekać %s sekund zanim spróbujesz ponownie", "Esc_to" : "Naciśnij Esc: ", - "False" : "Fałsz", + "False" : "Nie", "Favorites" : "Ulubione", "FileUpload" : "Przesyłanie plików", "FileUpload_Enabled" : "Przesyłanie plików włączone", "FileUpload_MaxFileSize" : "Maksymalny rozmiar przesłanego pliku (w bajtach)", "FileUpload_MediaTypeWhiteList" : "Dozwolone typy plików", "FileUpload_MediaTypeWhiteListDescription" : "Typy plików, oddzielone przecinkami", - "Follow_social_profiles" : "Śledź nasze profile społeczne, widelec do nas na github i podziel się swoimi przemyśleniami na temat rocket.chat aplikacji na naszej trello pokładzie.", + "Follow_social_profiles" : "Śledź nas w portalach społecznościowych, forkuj projekt na githubie lub powiedz nam co myślisz o rocket.chat na naszym trello.", "Forgot_password" : "Zapomniałeś hasła", - "Fork_it_on_github" : "Fork it on GitHub", + "Fork_it_on_github" : "Forkuj projekt na GitHubie", "From_Email" : "Adres nadawcy", "General" : "Ogólne", "Get_to_know_the_team" : "Poznaj Rocket.Team", @@ -162,7 +162,7 @@ "History" : "Historia", "hours" : "godzin", "Incorrect_Password" : "Hasło jest nieprawidłowe", - "inline_code" : "inline", + "inline_code" : "kod", "Install_FxOs" : "Zainstaluj Rocket.Chat w Firefoksie", "Install_FxOs_done" : "Świetnie! Możesz teraz włączać Rocket.Chat poprzez ikonę na ekranie głównym. Życzymy miłego korzystania z Rocket.Chat!", "Install_FxOs_error" : "Niestety, coś nie zadziałało! Wystąpił następujący błąd:", @@ -171,7 +171,7 @@ "Invalid_email" : "E-mail jest nieprawidłowy", "Invalid_name" : "Nazwa nie może być pusta", "Invalid_pass" : "Hasło nie może być puste", - "Invalid_room_name" : "% snie jest poprawną nazwą pokoju,
użyj tylko liter, cyfr i myślników", + "Invalid_room_name" : "%s nie jest poprawną nazwą pokoju,
użyj tylko liter, cyfr i myślników", "invisible" : "niewidoczny", "Invisible" : "Niewidoczny", "Invitation_HTML" : "Kod HTML zaproszenia", @@ -202,7 +202,7 @@ "LDAP_Bind_Search" : "Zapytanie Bind", "LDAP_Bind_Search_Description" : "Kawałek kodu JSON który pozwala na powiązanie danych, w formie {\"filter\": \"(&(objectCategory=person)(objectclass=user)(memberOf=CN=ROCKET_ACCESS,CN=Users,DC=domain,DC=com)(sAMAccountName=#{username}))\", \"scope\": \"sub\", \"userDN\": \"rocket.service@domain.com\", \"password\": \"urpass\"}", "LDAP_Description" : "LDAP to hierarchiczna baza danych wykorzystywana przez wiele firm w celu udostępniania pojedynczej usługi autoryzacji użytkowników pomiędzy wieloma serwisami. Aby uzyskać dodatkowe informacje i przykłady konfiguracji, odwiedź nasze wiki: https://github.com/RocketChat/Rocket.Chat/wiki/LDAP-Authentication.", - "LDAP_DN" : "LDAP DN", + "LDAP_DN" : "Nazwa wyróżniająca (DN)", "LDAP_DN_Description" : "Search root; przykład: dc=domena,dc=com", "LDAP_Enable" : "Włącz LDAP", "LDAP_Enable_Description" : "Włącza LDAP podczas uwierzytelniania.", @@ -216,7 +216,7 @@ "LDAP_Url_Description" : "Adres serwera LDAP; na przykład: ldap://mojafirma.dns.com", "Leave_room" : "Opuść pokój", "line" : "linia", - "Load_more" : "Więcej", + "Load_more" : "Załaduj więcej", "Loading..." : "Ładowanie ...", "Loading_more_from_history" : "Ładowanie więcej z historii", "Loading_suggestion" : "Ładowanie sugestii...", @@ -231,8 +231,8 @@ "Members_List" : "Lista użytkowników", "Members_placeholder" : "Członkowie", "Message" : "Wiadomość", - "Message_AllowDeleting" : "Pozwól usunąć wiadomość", - "Message_AllowEditing" : "Pozwól edytować wiadomość", + "Message_AllowDeleting" : "Pozwól usuwać wiadomości", + "Message_AllowEditing" : "Pozwól edytować wiadomości", "Message_AllowEditing_BlockEditInMinutes" : "Blokuj edytowanie wiadomości po (n) minutach", "Message_AllowEditing_BlockEditInMinutesDescription" : "Wpisz 0, aby wyłączyć blokowanie.", "Message_AudioRecorderEnabled" : "Wysyłanie nagrań audio włączone", @@ -245,15 +245,15 @@ "Message_pinned" : "Wiadomość przypięta", "Message_pinning_not_allowed" : "Przypinanie wiadomości jest niedozwolone", "Message_removed" : "Wiadomość usunięta", - "Message_ShowDeletedStatus" : "Pokaż usunięty status", - "Message_ShowEditedStatus" : "Pokaż zmieniony status", + "Message_ShowDeletedStatus" : "Pokaż informację o usunięciu", + "Message_ShowEditedStatus" : "Pokaż informację o edycji", "Message_ShowFormattingTips" : "Pokaż porady formatowania wiadomości", "Messages" : "Wiadomości", "Meta_fb_app_id" : "Facebook APP ID", "Meta_google-site-verification" : "Weryfikacja Google", "Meta_language" : "Język", "Meta_msvalidate01" : "MSValidate.01", - "Meta_robots" : "Robots", + "Meta_robots" : "Roboty", "minutes" : "minut", "More_channels" : "Więcej kanałów", "More_groups" : "Więcej grup prywatnych", @@ -270,7 +270,7 @@ "No_channel_with_name_%s_was_found" : "Nie odnaleziono kanału o nazwie \"%s\"!", "No_channels_yet" : "Nie jesteś członkiem żadnego kanału.", "No_direct_messages_yet" : "Nie rozpocząłeś jeszcze żadnej rozmowy.", - "No_favorites_yet" : "Brak ulubionych.", + "No_favorites_yet" : "Nie masz żadnych ulubionych.", "No_group_with_name_%s_was_found" : "Nie odnaleziono grupy o nazwie \"%s\"!", "No_groups_yet" : "Nie masz prywatnych grup.", "No_livechats" : "Nie masz żadnych livechatów.", @@ -278,7 +278,7 @@ "No_user_with_username_%s_was_found" : "Nie odnaleziono użytkownika o nazwie \"%s\"!", "Not_allowed" : "Niedozwolone", "Not_authorized" : "Brak autoryzacji", - "Not_found_or_not_allowed" : "Nie znaleziono lub nie dozwolone", + "Not_found_or_not_allowed" : "Nie znaleziono lub niedozwolone", "Nothing_found" : "Nic nie znaleziono", "Notify_all_in_this_room" : "Powiadom wszystkich w pokoju", "Old_and_new_password_required" : "Aby zmienić hasło musisz podać zarówno stare jak i nowe hasło.", @@ -297,15 +297,15 @@ "Please_wait" : "Proszę czekaj", "Please_wait_activation" : "To może chwilę potrwać, proszę czekaj.", "Please_wait_statistics" : "Generuję statystyki, proszę czekaj.", - "Powered_by" : "Wspierane przez", + "Powered_by" : "Technologię dostarcza ", "Preferences" : "Preferencje", "Preferences_saved" : "Preferencje zapisane", "Privacy" : "Prywatność", "Private_Groups" : "Prywatne grupy", "Private_Groups_list" : "Lista prywatnych grup", "Profile" : "Profil", - "Profile_saved_successfully" : "Profil został zapisany", - "Proudly_developed" : "Dumnie opracowane z Meteor", + "Profile_saved_successfully" : "Dane zostały zapisane", + "Proudly_developed" : "Stworzone na platformie Meteor", "Push" : "Powiadomienia", "Push_apn_cert" : "Certyfikat APN", "Push_apn_dev_cert" : "Certyfikat Dev APN", @@ -313,7 +313,7 @@ "Push_apn_dev_passphrase" : "APN Dev Passphrase", "Push_apn_key" : "Klucz APN", "Push_apn_passphrase" : "APN Passphrase", - "Push_debug" : "Debug", + "Push_debug" : "Debugowanie", "Push_enable" : "Włącz", "Push_gcm_api_key" : "Klucz API GCM", "Push_gcm_project_number" : "Identyfikator projektu GCM", @@ -348,7 +348,7 @@ "Save_Mobile_Bandwidth" : "Oszczędzaj przepustowość", "Search" : "Szukaj", "Search_Messages" : "Przeszukaj wiadomości", - "Search_settings" : "Wyszukaj w ustawieniach", + "Search_settings" : "Przeszukaj ustawienia", "seconds" : "sekund", "See_all" : "Zobacz wszystko", "See_only_online" : "Wyłącznie w trybie online", @@ -365,22 +365,22 @@ "Send_invitation_email_warning" : "Aby wysłać zaproszenie, skonfiguruj najpierw ustawienia serwera SMTP.", "Send_Message" : "Wyślij wiadomość", "Settings" : "Ustawienia", - "Settings_updated" : "Ustawienia zaktualizowane", + "Settings_updated" : "Ustawienia zapisane", "Showing_online_users" : "Widocznych __total_online__ z __total__users", - "Showing_results" : "

Wyświetlono % swyników

", + "Showing_results" : "

Wyświetlono %s wyników

", "Silence" : "Cisza", "since_creation" : "od %s", "Site_Name" : "Nazwa strony", "Site_Url" : "Adres strony", "Site_Url_Description" : "Przykład: https://chat.domain.com/", "SMTP" : "SMTP", - "SMTP_Host" : "SMTP Host", + "SMTP_Host" : "Nazwa hosta SMTP", "SMTP_Password" : "Hasło SMTP", "SMTP_Port" : "Port SMTP", "SMTP_Username" : "Nazwa użytkownika SMTP", "Sound" : "Dźwięk", "Start_of_conversation" : "Rozpocznij rozmowę", - "Statistics" : "Statystyka", + "Statistics" : "Statystyki", "Stats_Active_Users" : "Aktywni użytkownicy", "Stats_Avg_Channel_Users" : "Średnio użytkowników w kanałach", "Stats_Avg_Private_Group_Users" : "Średnio użytkowników w grupach", @@ -408,15 +408,15 @@ "strike" : "przekreślenie", "Submit" : "Prześlij", "The_field_is_required" : "Pole %s jest wymagane.", - "True" : "Prawda", + "True" : "Tak", "Unnamed" : "Anonimowy", "Unread_Rooms" : "Nieprzeczytane pokoje", "Unread_Rooms_Mode" : "Tryb nieprzeczytanych pokoi", "Upload_file_question" : "Przesłać plik?", "Use_Emojis" : "Użyj Emoji", "Use_initials_avatar" : "Użyj inicjałów", - "use_menu" : "Skorzystaj z menu bocznego celem dostępu do pokoi i czatów", - "Use_service_avatar" : "Użyj %s avatar", + "use_menu" : "Otwórz menu boczne by uzyskać dostęp do twoich pokoi i rozmów", + "Use_service_avatar" : "Użyj avatar z %s", "Use_this_username" : "Użyj tej nazwy użytkownika", "Use_uploaded_avatar" : "Użyj dodany awatar", "Use_url_for_avatar" : "Użyj adresu URL", @@ -433,34 +433,34 @@ "User_joined_channel_female" : "Dołączyła do kanału", "User_joined_channel_male" : "Dołączył do kanału", "User_left" : "Użytkownik __user_left__ wyszedł.", - "User_left_female" : "Użytkownik __user_left__ wyszła.", + "User_left_female" : "Użytkowniczka __user_left__ wyszła.", "User_left_male" : "Użytkownik __user_left__ wyszedł.", "User_logged_out" : "Użytkownik jest wylogowany", "User_not_found_or_incorrect_password" : "Nie znaleziono użytkownika lub nieprawidłowe hasło", - "User_removed_by" : "Użytkownik __user_removed__usunięty przez __user_by__.", + "User_removed_by" : "Użytkownik __user_removed__ został usunięty przez __user_by__.", "User_Settings" : "Ustawienia użytkownika", "User_updated_successfully" : "Zaktualizowano dane użytkownika", "Username" : "Nazwa użytkownika", "Username_cant_be_empty" : "Nazwa użytkownika nie może być pusta", "Username_Change_Disabled" : "Administrator czatu nie zezwolił na zmianę nazw użytkownika", - "Username_description" : "Nazwa użytkownika jest używana, by inni mogli Cię wspomnieć w wiadomości.", - "Username_invalid" : "% snie jest prawidłową nazwą użytkownika,
użyj jedynie liter, cyfr, kropek i kresek", - "Username_title" : "Zarejestruj użytkownika", - "Username_unavaliable" : "% s jest zajęte :(", + "Username_description" : "Nazwa użytkownika jest używana, by inni mogli Cię wspomnieć w swoich wiadomościach.", + "Username_invalid" : "%s nie jest prawidłową nazwą użytkownika,
użyj jedynie liter, cyfr, kropek i kresek", + "Username_title" : "Utwórz nazwę użytkownika", + "Username_unavaliable" : "Nazwa %s jest zajęta :(", "Users" : "Użytkownicy", - "View_All" : "Zobacz wszystkie", + "View_All" : "Pokaż wszystko", "Wait_activation_warning" : "Zanim się zalogujesz, twoje konto musi być aktywowane przez administratora.", - "We_have_sent_password_email" : "Wysłaliśmy Ci e-mail z instrukcjami resetowania hasła. Jeśli nie dostaniesz wiadomości, spróbuj proszę ponownie.", - "We_have_sent_registration_email" : "Wysłaliśmy e-mail w celu potwierdzenie Twojej rejestracji. Jeśli nie dostaniesz wiadomości, spróbuj proszę ponownie.", - "Welcome" : "Witamy % s.", + "We_have_sent_password_email" : "Wysłaliśmy Ci e-mail z instrukcjami resetowania hasła. Jeśli nie dostaniesz wiadomości, prosimy spróbować ponownie.", + "We_have_sent_registration_email" : "Wysłaliśmy e-mail w celu potwierdzenie Twojej rejestracji. Jeśli nie dostaniesz wiadomości, prosimy spróbować ponownie.", + "Welcome" : "Witamy %s.", "Welcome_to_the" : "Witaj w", "With_whom" : "Z kim", "Yes" : "Tak", "Yes_clear_all" : "Tak, wyczyść!", "Yes_delete_it" : "Tak, usuń to!", "you_are_in_preview_mode_of" : "Jesteś w trybie podglądu kanału # __room_name__", - "You_need_confirm_email" : "Musisz potwierdzić swój adres e-mail, aby zalogować się!", - "You_will_not_be_able_to_recover" : "Nie będziesz w stanie odzyskać!", + "You_need_confirm_email" : "Aby się zalogować musisz potwierdzić swój adres e-mail!", + "You_will_not_be_able_to_recover" : "Nie będziesz w stanie odzyskać tej wiadomości!", "Your_entry_has_been_deleted" : "Twój wpis został usunięty.", "Your_Open_Source_solution" : "Twój własny czat Open Source" } \ No newline at end of file diff --git a/i18n/pt.i18n.json b/i18n/pt.i18n.json index 1af6d7f2715e..eedf1d79fa65 100644 --- a/i18n/pt.i18n.json +++ b/i18n/pt.i18n.json @@ -1,12 +1,15 @@ { + "Access_not_authorized" : "Acesso não autorizado", "Access_online_demo" : "Acesse o demo online", "Access_Online_Demo" : "Acesse o Demo Online", - "Access_not_authorized" : "Acesso não autorizado", "Accounts" : "Contas", - "Accounts_AllowedDomainsList" : "Lista de domínios permitidos (separados por vírgula)", - "Accounts_AllowUsernameChange" : "Permitir alterar usuário", + "Accounts_AllowedDomainsList" : "Lista de domínios permitidos", + "Accounts_AllowPasswordChange" : "Permitir Alteração de Senha", + "Accounts_AllowUsernameChange" : "Permitir alterar nome de usuário", "Accounts_AvatarResize" : "Redimensionar Avatares", "Accounts_AvatarSize" : "Tamanho do Avatar", + "Accounts_AvatarStorePath" : "Caminho para armazenar Avatares", + "Accounts_AvatarStoreType" : "Tipo de armazenamento de Avatares", "Accounts_denyUnverifiedEmail" : "Proibir e-mail não verificado", "Accounts_EmailVerification" : "Verificação de E-mail", "Accounts_ManuallyApproveNewUsers" : "Aprovar manualmente novos usuários", @@ -26,6 +29,7 @@ "Accounts_OAuth_Github" : "Login do GitHub", "Accounts_OAuth_Github_id" : "GitHub Id", "Accounts_OAuth_Github_secret" : "GitHub Secret", + "Accounts_OAuth_Gitlab" : "OAuth Ativado", "Accounts_OAuth_Gitlab_id" : "Gitlab Id", "Accounts_OAuth_Google" : "Login do Google", "Accounts_OAuth_Google_id" : "Google Id", @@ -39,6 +43,10 @@ "Accounts_OAuth_Twitter" : "Login do Twitter", "Accounts_OAuth_Twitter_id" : "Twitter Id", "Accounts_OAuth_Twitter_secret" : "Twitter Secret", + "Accounts_PasswordReset" : "Resetar senha", + "Accounts_RegistrationForm_Disabled" : "Desativado", + "Accounts_RegistrationForm_Public" : "Público", + "Accounts_RegistrationForm_Secret_URL" : "URL Secreta", "Accounts_RegistrationRequired" : "Registro Obrigatório", "Accounts_RequireNameForSignUp" : "Nome é obrigatório para cadastro", "Activate" : "Ativar", @@ -59,6 +67,7 @@ "Are_you_sure" : "Você tem certeza?", "Auto_Load_Images" : "Auto Carregar Imagens", "Avatar_changed_successfully" : "Avatar alterado com sucesso", + "Avatar_url_invalid_or_error" : "A URL fornecida é inválida ou não acessível. Por favor tente novamente, mas com uma url diferente.", "away" : "ausente", "Away" : "Ausente", "away_female" : "ausente", @@ -74,10 +83,12 @@ "busy_male" : "ocupado", "Busy_male" : "Ocupado", "Cancel" : "Cancelar", + "Certificates_and_Keys" : "Certificados e Chaves", "Change_avatar" : "Alterar avatar", "Channels" : "Canais", "Channels_list" : "Lista de canais públicos", "Chat_Rooms" : "Salas de Chat", + "Clear_all_unreads_question" : "Limpar todas não lidas?", "close" : "fechar", "coming_soon" : "em breve", "Commands" : "Comandos", @@ -95,6 +106,7 @@ "Custom_oauth_unique_name" : "Nome exclusivo para oauth customizado", "days" : "dias", "Deactivate" : "Desativar", + "Delete_Room_Warning" : "A exclusão de uma sala irá apagar todas as mensagens postadas na sala. Isso não pode ser desfeito.", "Delete_User_Warning" : "Excluir um usuário irá apagar todas as mensagens desse usuário também. Isso não poderá ser desfeito.", "Deleted" : "Deletado!", "Desktop_Notifications" : "Notificações Desktop", @@ -116,6 +128,7 @@ "Enable_Desktop_Notifications" : "Habilitar Notificações Desktop", "Enter_info" : "Entre com seus dados de login", "Enter_to" : "Enter para", + "Error" : "Erro", "Error_changing_password" : "Erro ao alterar senha", "Error_too_many_requests" : "Erro, foram realizadas muitas solicitações. Por favor, diminua a velocidade. Você dev esperar %s segundos antes de tentar novamente", "Esc_to" : "Esc para", @@ -124,7 +137,8 @@ "FileUpload" : "Upload de Arquivos", "FileUpload_Enabled" : "Habilitar upload de arquivos", "FileUpload_MaxFileSize" : "Tamanho máximo dos arquivos (em bytes)", - "FileUpload_MediaTypeWhiteList" : "Lista de tipos de mídia (separados por vírgula)", + "FileUpload_MediaTypeWhiteList" : "Lista de tipos de mídia", + "FileUpload_MediaTypeWhiteListDescription" : "Lista de tipos de mídia separada por vírgula", "Follow_social_profiles" : "Siga-nos nas redes sociais, faça fork no github e compartilhe suas ideias sobre o app rocket.chat em nosso trello.", "Forgot_password" : "Esqueceu sua senha", "Fork_it_on_github" : "Fork it on github", @@ -140,11 +154,17 @@ "hours" : "horas", "Incorrect_Password" : "Senha incorreta", "inline_code" : "código", + "Install_FxOs" : "Instale o Rocket.Chat em seu Firefox", "Invalid_confirm_pass" : "A confirmação de senha não é igual à senha", "Invalid_email" : "O e-mail informado é inválido", + "Invalid_file_height" : "Altura de arquivo inválida", + "Invalid_file_type" : "Tipo de arquivo inválido", + "Invalid_file_width" : "Altura de arquivo inválida", "Invalid_name" : "O nome não pode ser vazio", "Invalid_pass" : "A senha não pode ser vazia", "Invalid_room_name" : "%s não é um nome válido,
utilizar apenas letras, números e hífens", + "Invalid_Secret_URL" : "URL Secreta inválida", + "Invalid_secret_URL_message" : "A URL fornecida é inválida.", "invisible" : "invisível", "Invisible" : "Invisível", "Invitation_HTML" : "HTML do Convite", @@ -174,6 +194,7 @@ "Layout_Terms_of_Service" : "Termos de Serviço", "LDAP" : "LDAP", "LDAP_DN" : "DN LDAP", + "LDAP_Enable" : "Ativar LDAP", "LDAP_Port" : "Porta LDAP", "LDAP_Sync_User_Data" : "Manter dados dos usuários sincronizados", "LDAP_Sync_User_Data_FieldMap" : "Mapeamento de campos do usuário", @@ -237,6 +258,7 @@ "No_groups_yet" : "Nenhum grupo privado ainda.", "No_livechats" : "Nenhum atendimento.", "No_permission_to_view_room" : "Sem permissões para ver a sala", + "no_tokens_for_this_user" : "Não existem tokens para este usuário", "No_user_with_username_%s_was_found" : "Nenhum usuário com nome de usuário \"%s\" foi encontrado!", "Not_allowed" : "Não permitido", "Not_authorized" : "Não autorizado", @@ -252,8 +274,10 @@ "Opt_out_statistics_warning" : "Enviando suas estatísticas anonimamente você nos ajudará a identificar quantas instâncias do Rocket.Chat são implantadas, bem como o quão bom o sistema está se comportando, para que nós possamos melhorar ainda mais. Se você quiser continuar nos enviando suas estatísticas anonimamente, desmarque a caixa de seleção acima. Obrigado", "others" : "outros", "Password" : "Senha", + "Password_Change_Disabled" : "O administrador do Rocket.Chat desativou a mudança de senhas", "Password_changed_successfully" : "Senha alterada com sucesso", "People" : "Pessoas", + "Please_enter_value_for_url" : "Por favor insira um valor para a URL do seu avatar.", "Please_wait" : "Aguarde", "Please_wait_activation" : "Por favor aguarde, isso pode levar algum tempo.", "Please_wait_statistics" : "Por favor aguarde, as estatísticas estão sendo geradas.", @@ -274,8 +298,12 @@ "Push_apn_key" : "APN Key", "Push_apn_passphrase" : "APN Passphrase", "Push_debug" : "Debug", + "push_disabled" : "Push desativado", "Push_enable" : "Habilitar", + "Push_enable_gateway" : "Ativar Gateway", + "Push_gateway" : "Gateway", "Push_production" : "Produção", + "Push_test_push" : "Teste", "Quick_Search" : "Pesquisa Rápida", "quote" : "citação", "Recents" : "Recentes", @@ -287,6 +315,8 @@ "Remove_Admin" : "Remover Administrador", "Remove_custom_oauth" : "Remover oauth customizado", "Reset_password" : "Resetar senha", + "Restart" : "Reiniciar", + "Restart_the_server" : "Reiniciar o servidor", "Room" : "Sala", "Room_name_changed" : "Nome da sala alterado para: __room_name__ por __user_by__", "Room_name_changed_successfully" : "Nome da sala alterado com sucesso", @@ -297,6 +327,9 @@ "Rooms" : "Salas", "S_new_messages_since_s" : "%s novas mensagens desde %s", "SAML" : "SAML", + "SAML_Custom_Cert" : "Certificado personalizado", + "SAML_Custom_Entry_point" : "Entry Point personalizado", + "SAML_Custom_Generate_Username" : "Gerar nome de usuário", "Save_changes" : "Salvar alterações", "Save_Mobile_Bandwidth" : "Economizar Banda Móvel", "Search" : "Pesquisar", @@ -310,6 +343,7 @@ "Select_service_to_login" : "Selecione um serviço para iniciar sessão e carregar sua imagem ou faça upload de um arquivo de seu computador", "Selected_users" : "Membros selecionados", "Send" : "Enviar", + "Send_a_test_push_to_my_user" : "Enviar um Push de teste para o meu usuário", "Send_confirmation_email" : "Enviar email de confirmação", "Send_invitation_email" : "Enviar convite por e-mail", "Send_invitation_email_error" : "Você não forneceu qualquer e-mail válido.", @@ -360,18 +394,24 @@ "Stop_Recording" : "Parar Gravação", "strike" : "tachado", "Submit" : "Enviar", + "Success" : "Sucesso", + "The_configured_URL_is_different_from_the_URL_you_are_accessing" : "A URL configurada é diferente da URL que você está acessando!", "The_field_is_required" : "O campo %s é obrigatório.", + "The_server_will_restart_in_s_seconds" : "O servidor será reiniciado em %s segundos", + "This_is_a_push_test_messsage" : "Este é uma mensagem de teste de push notification", "True" : "Sim", "Unnamed" : "Sem nome", "Unread_Rooms" : "Não Lidas", "Unread_Rooms_Mode" : "Agrupar Salas Não Lidas", "Upload_file_question" : "Enviar arquivo?", + "Uploading_file" : "Subindo arquivo...", "Use_Emojis" : "Usar Emojis", "Use_initials_avatar" : "Usar as iniciais do seu nome de usuário", "use_menu" : "Utilize o menu à esquerda para acessar suas salas", "Use_service_avatar" : "Use o avatar de %s", "Use_this_username" : "Usar este nome de usuário", "Use_uploaded_avatar" : "Use o avatar de upload", + "Use_url_for_avatar" : "Use url para o avatar", "User_added_by" : "Usuário __user_added__ adicionado à conversa por __user_by__.", "User_Channels" : "Canais do Usuário", "User_has_been_activated" : "Usuário foi ativado", @@ -394,6 +434,7 @@ "User_updated_successfully" : "Usuário atualizado com sucesso", "Username" : "Nome de usuário", "Username_cant_be_empty" : "O nome de usuário não pode ser vazio", + "Username_Change_Disabled" : "O administrador do Rocket.Chat desabilitou a mudança de nome de usuário", "Username_description" : "O nome de usuário serve para que outras pessoas possam mencionar você em mensagens", "Username_invalid" : "%s não é um nome de usuário válido,
usar somente letras, números, pontos e traços", "Username_title" : "Cadastre um nome de usuário", @@ -407,10 +448,12 @@ "Welcome_to_the" : "Bem-vindo ao", "With_whom" : "Com quem", "Yes" : "Sim", + "Yes_clear_all" : "Sim, limpar tudo!", "Yes_delete_it" : "Sim, exclua!", "you_are_in_preview_mode_of" : "Esta é uma prévia do canal #__room_name__", "You_need_confirm_email" : "Você precisa confirmar seu email para logar!", "You_will_not_be_able_to_recover" : "Você não será capaz de desfazer!", "Your_entry_has_been_deleted" : "Sua mensagem foi excluída.", - "Your_Open_Source_solution" : "Sua própria solução Open Source" + "Your_Open_Source_solution" : "Sua própria solução Open Source", + "Your_push_was_sent_to_s_devices" : "Sua natificação foi enviada para %s dispositivos" } \ No newline at end of file diff --git a/packages/rocketchat-authorization/i18n/ar.i18n.json b/packages/rocketchat-authorization/i18n/ar.i18n.json index 0a06728ddc3f..6983bb7d0fe6 100644 --- a/packages/rocketchat-authorization/i18n/ar.i18n.json +++ b/packages/rocketchat-authorization/i18n/ar.i18n.json @@ -1,4 +1,6 @@ { + "Add_user" : "إضافة مستخدم", "Save" : "حفظ", - "User_added" : "وأضاف العضو __user_added__." + "User_added" : "وأضاف العضو __user_added__.", + "User_removed" : "ازيل المستخدم" } \ No newline at end of file diff --git a/packages/rocketchat-authorization/i18n/en.i18n.json b/packages/rocketchat-authorization/i18n/en.i18n.json index de2989add914..46367ea01760 100644 --- a/packages/rocketchat-authorization/i18n/en.i18n.json +++ b/packages/rocketchat-authorization/i18n/en.i18n.json @@ -3,7 +3,6 @@ "Back_to_permissions" : "Back to permissions", "Cannot_delete_a_protected_role" : "Cannot delete a protected role", "Cannot_delete_role_because_its_in_use" : "Cannot delete role because it's in use", - "Description" : "Description", "New_role" : "New role", "Permissions" : "Permissions", "Removed" : "Removed", @@ -11,7 +10,6 @@ "Role_Editing" : "Role Editing", "Role_removed" : "Role removed", "Save" : "Save", - "Saved" : "Saved", "Saving" : "Saving", "There_are_no_users_in_this_role" : "There are no users in this role.", "User_added" : "User added", diff --git a/packages/rocketchat-authorization/i18n/fi.i18n.json b/packages/rocketchat-authorization/i18n/fi.i18n.json index dbd25410a43b..041ed788cf19 100644 --- a/packages/rocketchat-authorization/i18n/fi.i18n.json +++ b/packages/rocketchat-authorization/i18n/fi.i18n.json @@ -1,4 +1,19 @@ { + "Add_user" : "Lisää käyttäjä", + "Back_to_permissions" : "Takaisin käyttöoikeuksiin", + "Cannot_delete_a_protected_role" : "Et voi poistaa suojattua roolia", + "Cannot_delete_role_because_its_in_use" : "Et voi poistaa roolia, koska se on käytössä", + "New_role" : "Uusi rooli", + "Permissions" : "Oikeudet", + "Removed" : "Poistettu", + "Role" : "Rooli", + "Role_Editing" : "Roolin muokkaaminen", + "Role_removed" : "Rooli poistettu", "Save" : "Tallenna", - "User_added" : "Käyttäjä __user_added__ lisätty." + "Saving" : "Tallennetaan", + "There_are_no_users_in_this_role" : "Roolissa ei ole käyttäjiä", + "User_added" : "Käyttäjä __user_added__ lisätty.", + "User_not_found" : "Käyttäjää ei löydy", + "User_removed" : "Käyttäjä on poistettu", + "Users_in_role" : "Roolin käyttäjiä" } \ No newline at end of file diff --git a/packages/rocketchat-authorization/i18n/ku.i18n.json b/packages/rocketchat-authorization/i18n/ku.i18n.json new file mode 100644 index 000000000000..1e7dd6a08761 --- /dev/null +++ b/packages/rocketchat-authorization/i18n/ku.i18n.json @@ -0,0 +1,4 @@ +{ + "Save" : "پاشەکەوت", + "User_added" : "بەکارهێنەر زیادکرا" +} \ No newline at end of file diff --git a/packages/rocketchat-authorization/i18n/lo.i18n.json b/packages/rocketchat-authorization/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-authorization/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-authorization/i18n/nl.i18n.json b/packages/rocketchat-authorization/i18n/nl.i18n.json new file mode 100644 index 000000000000..039425c06c54 --- /dev/null +++ b/packages/rocketchat-authorization/i18n/nl.i18n.json @@ -0,0 +1,4 @@ +{ + "Save" : "Bewaren", + "User_added" : "Gebruiker toegevoegd" +} \ No newline at end of file diff --git a/packages/rocketchat-authorization/i18n/pt.i18n.json b/packages/rocketchat-authorization/i18n/pt.i18n.json index dca06e8c94c2..8664e27746f7 100644 --- a/packages/rocketchat-authorization/i18n/pt.i18n.json +++ b/packages/rocketchat-authorization/i18n/pt.i18n.json @@ -3,7 +3,6 @@ "Back_to_permissions" : "Voltar para permissões", "Cannot_delete_a_protected_role" : "Não é possível remover um papel protegido", "Cannot_delete_role_because_its_in_use" : "Não é possível remover o papel pois ele está em uso", - "Description" : "Descrição", "New_role" : "Novo papel", "Permissions" : "Permissões", "Removed" : "Removido", @@ -11,7 +10,6 @@ "Role_Editing" : "Edição de Papel", "Role_removed" : "Papel Removido", "Save" : "Salvar", - "Saved" : "Salvo", "Saving" : "Salvando", "There_are_no_users_in_this_role" : "Não há usuários neste papel.", "User_added" : "Usuário adicionado", diff --git a/packages/rocketchat-authorization/server/publications/integrations.coffee b/packages/rocketchat-authorization/server/publications/integrations.coffee new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/rocketchat-authorization/server/startup.coffee b/packages/rocketchat-authorization/server/startup.coffee index e1b57d541e7b..905a43410e67 100644 --- a/packages/rocketchat-authorization/server/startup.coffee +++ b/packages/rocketchat-authorization/server/startup.coffee @@ -92,6 +92,9 @@ Meteor.startup -> { _id: 'manage-assets', roles : ['admin']} + + { _id: 'manage-integrations', + roles : ['admin']} ] #alanning:roles diff --git a/packages/rocketchat-channel-settings/i18n/fi.i18n.json b/packages/rocketchat-channel-settings/i18n/fi.i18n.json index 6f31cf5a2e62..ba9ae6c0008e 100644 --- a/packages/rocketchat-channel-settings/i18n/fi.i18n.json +++ b/packages/rocketchat-channel-settings/i18n/fi.i18n.json @@ -1 +1,8 @@ -{ } \ No newline at end of file +{ + "Channel" : "Kanava", + "Private_Group" : "Privaattiryhmä", + "Room_Type" : "Huoneen tyyppi", + "Room_Settings" : "Huoneen asetukset", + "room_changed_privacy" : "Huoneen tyyppi vaihdettu __room_type__ käyttäjän __user_by__ toimesta", + "room_changed_topic" : "Huoneen aihe vaihdettu __room_topic__ käyttäjän __user_by__ toimesta" +} \ No newline at end of file diff --git a/packages/rocketchat-channel-settings/i18n/ku.i18n.json b/packages/rocketchat-channel-settings/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-channel-settings/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-channel-settings/i18n/lo.i18n.json b/packages/rocketchat-channel-settings/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-channel-settings/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-channel-settings/i18n/nl.i18n.json b/packages/rocketchat-channel-settings/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-channel-settings/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-channel-settings/i18n/pt.i18n.json b/packages/rocketchat-channel-settings/i18n/pt.i18n.json index 6f31cf5a2e62..f9d1b2c38ccf 100644 --- a/packages/rocketchat-channel-settings/i18n/pt.i18n.json +++ b/packages/rocketchat-channel-settings/i18n/pt.i18n.json @@ -1 +1,6 @@ -{ } \ No newline at end of file +{ + "Channel" : "Canal", + "Private_Group" : "Grupo Privado", + "Room_Type" : "Tipo de sala", + "Room_Settings" : "Configurações da Sala" +} \ No newline at end of file diff --git a/packages/rocketchat-chatops/i18n/ku.i18n.json b/packages/rocketchat-chatops/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-chatops/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-chatops/i18n/lo.i18n.json b/packages/rocketchat-chatops/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-chatops/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-chatops/i18n/nl.i18n.json b/packages/rocketchat-chatops/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-chatops/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-github-enterprise/i18n/fi.i18n.json b/packages/rocketchat-github-enterprise/i18n/fi.i18n.json index 107ca5894b88..dd02132add10 100644 --- a/packages/rocketchat-github-enterprise/i18n/fi.i18n.json +++ b/packages/rocketchat-github-enterprise/i18n/fi.i18n.json @@ -3,5 +3,5 @@ "API_GitHub_Enterprise_URL" : "Server URL", "Accounts_OAuth_GitHub_Enterprise_id" : "Client ID", "Accounts_OAuth_GitHub_Enterprise_secret" : "Client Secret", - "Github_Enterprise_Url_No_Trail" : "Huom: Älä syötä viimeistä kenoviivaa" + "Github_Enterprise_Url_No_Trail" : "Esim: http://example.com (ei kauttaviivaa loppuun)" } \ No newline at end of file diff --git a/packages/rocketchat-github-enterprise/i18n/ku.i18n.json b/packages/rocketchat-github-enterprise/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-github-enterprise/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-github-enterprise/i18n/lo.i18n.json b/packages/rocketchat-github-enterprise/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-github-enterprise/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-github-enterprise/i18n/nl.i18n.json b/packages/rocketchat-github-enterprise/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-github-enterprise/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-gitlab/i18n/ku.i18n.json b/packages/rocketchat-gitlab/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-gitlab/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-gitlab/i18n/lo.i18n.json b/packages/rocketchat-gitlab/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-gitlab/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-gitlab/i18n/nl.i18n.json b/packages/rocketchat-gitlab/i18n/nl.i18n.json new file mode 100644 index 000000000000..aa29615cd108 --- /dev/null +++ b/packages/rocketchat-gitlab/i18n/nl.i18n.json @@ -0,0 +1,3 @@ +{ + "API_Gitlab_URL" : "GitLab URL" +} \ No newline at end of file diff --git a/packages/rocketchat-hubot/i18n/ku.i18n.json b/packages/rocketchat-hubot/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-hubot/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-hubot/i18n/lo.i18n.json b/packages/rocketchat-hubot/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-hubot/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-hubot/i18n/nl.i18n.json b/packages/rocketchat-hubot/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-hubot/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-integrations/client/collection.coffee b/packages/rocketchat-integrations/client/collection.coffee new file mode 100644 index 000000000000..dd1f798db858 --- /dev/null +++ b/packages/rocketchat-integrations/client/collection.coffee @@ -0,0 +1 @@ +@ChatIntegrations = new Meteor.Collection 'rocketchat_integrations' diff --git a/packages/rocketchat-integrations/client/route.coffee b/packages/rocketchat-integrations/client/route.coffee new file mode 100644 index 000000000000..4a87624ca342 --- /dev/null +++ b/packages/rocketchat-integrations/client/route.coffee @@ -0,0 +1,26 @@ +FlowRouter.route '/admin/integrations', + name: 'admin-integrations' + action: (params) -> + BlazeLayout.render 'main', + center: 'pageSettingsContainer' + pageTitle: t('Integrations') + pageTemplate: 'integrations' + + +FlowRouter.route '/admin/integrations/new', + name: 'admin-integrations-new' + action: (params) -> + BlazeLayout.render 'main', + center: 'pageSettingsContainer' + pageTitle: t('Integration_New') + pageTemplate: 'integrationsNew' + + +FlowRouter.route '/admin/integrations/incoming/:id?', + name: 'admin-integrations-incoming' + action: (params) -> + BlazeLayout.render 'main', + center: 'pageSettingsContainer' + pageTitle: t('Integration_Incoming_WebHook') + pageTemplate: 'integrationsIncoming' + params: params diff --git a/packages/rocketchat-integrations/client/startup.coffee b/packages/rocketchat-integrations/client/startup.coffee new file mode 100644 index 000000000000..64191b37e73b --- /dev/null +++ b/packages/rocketchat-integrations/client/startup.coffee @@ -0,0 +1,7 @@ +Meteor.subscribe 'integrations' + +RocketChat.AdminBox.addOption + href: 'admin-integrations' + i18nLabel: 'Integrations' + permissionGranted: -> + return RocketChat.authz.hasAllPermission('manage-integrations') diff --git a/packages/rocketchat-integrations/client/stylesheets/integrations.less b/packages/rocketchat-integrations/client/stylesheets/integrations.less new file mode 100644 index 000000000000..04e51fba4147 --- /dev/null +++ b/packages/rocketchat-integrations/client/stylesheets/integrations.less @@ -0,0 +1,48 @@ +.admin-integrations-new-panel { + .admin-integrations-new-item { + display: flex; + align-items: center; + padding: 20px 10px; + color: #444; + border-bottom: 1px solid #ddd; + cursor: pointer; + + &:hover { + background-color: #fafafa; + } + + >i { + font-size: 2rem; + color: #aaa; + } + + .admin-integrations-new-item-body { + display: flex; + flex-direction: column; + flex-grow: 1; + padding: 0 20px; + } + + .admin-integrations-new-item-title { + font-size: 1.4rem; + line-height: 2.1rem; + font-weight: 500; + } + + .admin-integrations-new-item-description { + font-size: 1rem; + line-height: 1.5rem; + color: #aaa; + } + } + + > a:last-child > .admin-integrations-new-item { + border-bottom: none; + } +} + +.message-example { + li { + list-style: none; + } +} diff --git a/packages/rocketchat-integrations/client/stylesheets/load.coffee b/packages/rocketchat-integrations/client/stylesheets/load.coffee new file mode 100644 index 000000000000..88d4bb35ad13 --- /dev/null +++ b/packages/rocketchat-integrations/client/stylesheets/load.coffee @@ -0,0 +1,2 @@ +RocketChat.theme.addPackageAsset -> + return Assets.getText 'client/stylesheets/integrations.less' diff --git a/packages/rocketchat-integrations/client/views/integrations.coffee b/packages/rocketchat-integrations/client/views/integrations.coffee new file mode 100644 index 000000000000..bd869cc421c4 --- /dev/null +++ b/packages/rocketchat-integrations/client/views/integrations.coffee @@ -0,0 +1,9 @@ +Template.integrations.helpers + hasPermission: -> + return RocketChat.authz.hasAllPermission 'manage-integrations' + + integrations: -> + return ChatIntegrations.find() + + dateFormated: (date) -> + return moment(date).format('L LT') diff --git a/packages/rocketchat-integrations/client/views/integrations.html b/packages/rocketchat-integrations/client/views/integrations.html new file mode 100644 index 000000000000..d1075af7756b --- /dev/null +++ b/packages/rocketchat-integrations/client/views/integrations.html @@ -0,0 +1,37 @@ + diff --git a/packages/rocketchat-integrations/client/views/integrationsIncoming.coffee b/packages/rocketchat-integrations/client/views/integrationsIncoming.coffee new file mode 100644 index 000000000000..28f19b530c6f --- /dev/null +++ b/packages/rocketchat-integrations/client/views/integrationsIncoming.coffee @@ -0,0 +1,113 @@ +Template.integrationsIncoming.onCreated -> + @record = new ReactiveVar + username: 'rocket.cat' + + +Template.integrationsIncoming.helpers + + hasPermission: -> + return RocketChat.authz.hasAllPermission 'manage-integrations' + + data: -> + params = Template.instance().data.params?() + + if params?.id? + data = ChatIntegrations.findOne({_id: params.id}) + if data? + data.url = Meteor.absoluteUrl("hooks/#{encodeURIComponent(data._id)}/#{encodeURIComponent(data.userId)}/#{encodeURIComponent(data.token)}") + Template.instance().record.set data + return data + + return Template.instance().record.curValue + + example: -> + record = Template.instance().record.get() + return {} = + _id: Random.id() + alias: record.alias + avatar: record.avatar + msg: 'Example message' + bot: + i: Random.id() + attachments: [{ + title: "Rocket.Chat" + title_link: "https://rocket.chat" + text: "Rocket.Chat, the best open source chat" + image_url: "https://rocket.chat/images/mockup.png" + color: "#764FA5" + }] + ts: new Date + u: + _id: Random.id() + username: record.username + + +Template.integrationsIncoming.events + "blur input": (e, t) -> + t.record.set + name: $('[name=name]').val().trim() + alias: $('[name=alias]').val().trim() + avatar: $('[name=avatar]').val().trim() + channel: $('[name=channel]').val().trim() + username: $('[name=username]').val().trim() + + "click .submit > .delete": -> + params = Template.instance().data.params() + + swal + title: t('Are_you_sure') + text: t('You_will_not_be_able_to_recover') + type: 'warning' + showCancelButton: true + confirmButtonColor: '#DD6B55' + confirmButtonText: t('Yes_delete_it') + cancelButtonText: t('Cancel') + closeOnConfirm: false + html: false + , -> + Meteor.call "deleteIntegration", params.id, (err, data) -> + swal + title: t('Deleted') + text: t('Your_entry_has_been_deleted') + type: 'success' + timer: 1000 + showConfirmButton: false + + FlowRouter.go "admin-integrations" + + "click .submit > .save": -> + name = $('[name=name]').val().trim() + alias = $('[name=alias]').val().trim() + avatar = $('[name=avatar]').val().trim() + channel = $('[name=channel]').val().trim() + username = $('[name=username]').val().trim() + + if channel is '' + return toastr.error TAPi18n.__("The_channel_name_is_required") + + if username is '' + return toastr.error TAPi18n.__("The_username_is_required") + + integration = + channel: channel + alias: alias if alias isnt '' + avatar: avatar if avatar isnt '' + name: name if name isnt '' + + params = Template.instance().data.params?() + if params?.id? + Meteor.call "updateIntegration", params.id, integration, (err, data) -> + if err? + return toastr.error TAPi18n.__(err.error) + + toastr.success TAPi18n.__("Integration_updated") + else + integration.type = 'webhook-incoming' + integration.username = username + + Meteor.call "addIntegration", integration, (err, data) -> + if err? + return toastr.error TAPi18n.__(err.error) + + toastr.success TAPi18n.__("Integration_added") + FlowRouter.go "admin-integrations-incoming", {id: data._id} diff --git a/packages/rocketchat-integrations/client/views/integrationsIncoming.html b/packages/rocketchat-integrations/client/views/integrationsIncoming.html new file mode 100644 index 000000000000..d17db30e5c59 --- /dev/null +++ b/packages/rocketchat-integrations/client/views/integrationsIncoming.html @@ -0,0 +1,76 @@ + diff --git a/packages/rocketchat-integrations/client/views/integrationsNew.coffee b/packages/rocketchat-integrations/client/views/integrationsNew.coffee new file mode 100644 index 000000000000..dfa96b396911 --- /dev/null +++ b/packages/rocketchat-integrations/client/views/integrationsNew.coffee @@ -0,0 +1,3 @@ +Template.integrationsNew.helpers + hasPermission: -> + return RocketChat.authz.hasAllPermission 'manage-integrations' diff --git a/packages/rocketchat-integrations/client/views/integrationsNew.html b/packages/rocketchat-integrations/client/views/integrationsNew.html new file mode 100644 index 000000000000..496cf5112bbc --- /dev/null +++ b/packages/rocketchat-integrations/client/views/integrationsNew.html @@ -0,0 +1,44 @@ + diff --git a/packages/rocketchat-integrations/i18n/en.i18n.json b/packages/rocketchat-integrations/i18n/en.i18n.json new file mode 100644 index 000000000000..0db3279e44b0 --- /dev/null +++ b/packages/rocketchat-integrations/i18n/en.i18n.json @@ -0,0 +1,3 @@ +{ + +} diff --git a/packages/rocketchat-integrations/i18n/pt.i18n.json b/packages/rocketchat-integrations/i18n/pt.i18n.json new file mode 100644 index 000000000000..0db3279e44b0 --- /dev/null +++ b/packages/rocketchat-integrations/i18n/pt.i18n.json @@ -0,0 +1,3 @@ +{ + +} diff --git a/packages/rocketchat-integrations/lib/rocketchat.coffee b/packages/rocketchat-integrations/lib/rocketchat.coffee new file mode 100644 index 000000000000..c04702a3fffd --- /dev/null +++ b/packages/rocketchat-integrations/lib/rocketchat.coffee @@ -0,0 +1 @@ +RocketChat.integrations = {} diff --git a/packages/rocketchat-integrations/package.js b/packages/rocketchat-integrations/package.js new file mode 100644 index 000000000000..ae298211d728 --- /dev/null +++ b/packages/rocketchat-integrations/package.js @@ -0,0 +1,58 @@ +Package.describe({ + name: 'rocketchat:integrations', + version: '0.0.1', + summary: 'Integrations with services and WebHooks', + git: '', + documentation: 'README.md' +}); + +Package.onUse(function(api) { + api.versionsFrom('1.0'); + + api.use('coffeescript'); + api.use('underscore'); + api.use('rocketchat:lib@0.0.1'); + + api.use('kadira:flow-router', 'client'); + api.use('templating', 'client'); + + api.addFiles('lib/rocketchat.coffee', ['server','client']); + api.addFiles('client/collection.coffee', ['client']); + api.addFiles('client/startup.coffee', 'client'); + api.addFiles('client/route.coffee', 'client'); + + // views + api.addFiles('client/views/integrations.html', 'client'); + api.addFiles('client/views/integrations.coffee', 'client'); + api.addFiles('client/views/integrationsNew.html', 'client'); + api.addFiles('client/views/integrationsNew.coffee', 'client'); + api.addFiles('client/views/integrationsIncoming.html', 'client'); + api.addFiles('client/views/integrationsIncoming.coffee', 'client'); + + // stylesheets + api.addAssets('client/stylesheets/integrations.less', 'server'); + api.addFiles('client/stylesheets/load.coffee', 'server'); + + api.addFiles('server/models/Integrations.coffee', 'server'); + + // publications + api.addFiles('server/publications/integrations.coffee', 'server'); + + // methods + api.addFiles('server/methods/addIntegration.coffee', 'server'); + api.addFiles('server/methods/updateIntegration.coffee', 'server'); + api.addFiles('server/methods/deleteIntegration.coffee', 'server'); + + // api + api.addFiles('server/api/api.coffee', 'server'); + + var _ = Npm.require('underscore'); + var fs = Npm.require('fs'); + tapi18nFiles = _.compact(_.map(fs.readdirSync('packages/rocketchat-integrations/i18n'), function(filename) { + if (fs.statSync('packages/rocketchat-integrations/i18n/' + filename).size > 16) { + return 'i18n/' + filename; + } + })); + api.use('tap:i18n', ['client', 'server']); + api.addFiles(tapi18nFiles, ['client', 'server']); +}); diff --git a/packages/rocketchat-integrations/server/api/api.coffee b/packages/rocketchat-integrations/server/api/api.coffee new file mode 100644 index 000000000000..4001e3c09a79 --- /dev/null +++ b/packages/rocketchat-integrations/server/api/api.coffee @@ -0,0 +1,87 @@ +Api = new Restivus + enableCors: false + apiPath: 'hooks/' + auth: + user: -> + user = RocketChat.models.Users.findOne + _id: @request.params.userId + 'services.resume.loginTokens.hashedToken': decodeURIComponent @request.params.token + + return user: user + + +Api.addRoute ':integrationId/:userId/:token', authRequired: true, + post: -> + if @bodyParams?.payload? + @bodyParams = JSON.parse @bodyParams.payload + + integration = RocketChat.models.Integrations.findOne(@urlParams.integrationId) + user = RocketChat.models.Users.findOne(@userId) + + channel = @bodyParams.channel or integration.channel + channelType = channel[0] + channel = channel.substr(1) + + switch channelType + when '#' + room = RocketChat.models.Rooms.findOne + $or: [ + {_id: channel} + {name: channel} + ] + + if not room? + return {} = + statusCode: 400 + body: + success: false + error: 'invalid-channel' + + rid = room._id + Meteor.runAsUser user._id, -> + Meteor.call 'joinRoom', room._id + + when '@' + roomUser = RocketChat.models.Users.findOne + $or: [ + {_id: channel} + {username: channel} + ] + + if not roomUser? + return {} = + statusCode: 400 + body: + success: false + error: 'invalid-channel' + + rid = [user._id, roomUser._id].sort().join('') + room = RocketChat.models.Rooms.findOne(rid) + + if not room + Meteor.runAsUser user._id, -> + Meteor.call 'createDirectMessage', roomUser._id + room = RocketChat.models.Rooms.findOne(rid) + + else + return {} = + statusCode: 400 + body: + success: false + error: 'invalid-channel-type' + + message = + avatar: integration.avatar + alias: integration.alias + msg: @bodyParams.text or '' + attachments: @bodyParams.attachments + parseUrls: false + bot: + i: integration._id + + RocketChat.sendMessage user, message, room, {} + + return {} = + statusCode: 200 + body: + success: true diff --git a/packages/rocketchat-integrations/server/methods/addIntegration.coffee b/packages/rocketchat-integrations/server/methods/addIntegration.coffee new file mode 100644 index 000000000000..454b87d6bd23 --- /dev/null +++ b/packages/rocketchat-integrations/server/methods/addIntegration.coffee @@ -0,0 +1,65 @@ +Meteor.methods + addIntegration: (integration) -> + if not RocketChat.authz.hasPermission @userId, 'manage-integrations' + throw new Meteor.Error 'not_authorized' + + if not _.isString(integration.channel) + throw new Meteor.Error 'invalid_channel', '[methods] addIntegration -> channel must be string' + + if integration.channel.trim() is '' + throw new Meteor.Error 'invalid_channel', '[methods] addIntegration -> channel can\'t be empty' + + if integration.channel[0] not in ['@', '#'] + throw new Meteor.Error 'invalid_channel', '[methods] addIntegration -> channel should start with # or @' + + if not _.isString(integration.username) + throw new Meteor.Error 'invalid_username', '[methods] addIntegration -> username must be string' + + if integration.username.trim() is '' + throw new Meteor.Error 'invalid_username', '[methods] addIntegration -> username can\'t be empty' + + record = undefined + channelType = integration.channel[0] + channel = integration.channel.substr(1) + + switch channelType + when '#' + record = RocketChat.models.Rooms.findOne + $or: [ + {_id: channel} + {name: channel} + ] + when '@' + record = RocketChat.models.Users.findOne + $or: [ + {_id: channel} + {username: channel} + ] + + if record is undefined + throw new Meteor.Error 'channel_does_not_exists', "[methods] addIntegration -> The channel does not exists" + + user = RocketChat.models.Users.findOne({username: integration.username}) + + if not user? + throw new Meteor.Error 'user_does_not_exists', "[methods] addIntegration -> The username does not exists" + + stampedToken = Accounts._generateStampedLoginToken() + hashStampedToken = Accounts._hashStampedToken(stampedToken) + + updateObj = + $push: + 'services.resume.loginTokens': + hashedToken: hashStampedToken.hashedToken + integration: true + + integration.token = hashStampedToken.hashedToken + integration.userId = user._id + integration._createdAt = new Date + integration._createdBy = RocketChat.models.Users.findOne @userId, {fields: {username: 1}} + + RocketChat.models.Users.update {_id: user._id}, updateObj + + integration._id = RocketChat.models.Integrations.insert integration + + return integration diff --git a/packages/rocketchat-integrations/server/methods/deleteIntegration.coffee b/packages/rocketchat-integrations/server/methods/deleteIntegration.coffee new file mode 100644 index 000000000000..d6f22c27701d --- /dev/null +++ b/packages/rocketchat-integrations/server/methods/deleteIntegration.coffee @@ -0,0 +1,21 @@ +Meteor.methods + deleteIntegration: (integrationId) -> + if not RocketChat.authz.hasPermission @userId, 'manage-integrations' + throw new Meteor.Error 'not_authorized' + + integration = RocketChat.models.Integrations.findOne(integrationId) + + if not integration? + throw new Meteor.Error 'invalid_integration', '[methods] addIntegration -> integration not found' + + updateObj = + $pull: + 'services.resume.loginTokens': + hashedToken: integration.token + integration: true + + RocketChat.models.Users.update {_id: integration.userId}, updateObj + + RocketChat.models.Integrations.remove _id: integrationId + + return true diff --git a/packages/rocketchat-integrations/server/methods/updateIntegration.coffee b/packages/rocketchat-integrations/server/methods/updateIntegration.coffee new file mode 100644 index 000000000000..d41d0e3d145a --- /dev/null +++ b/packages/rocketchat-integrations/server/methods/updateIntegration.coffee @@ -0,0 +1,48 @@ +Meteor.methods + updateIntegration: (integrationId, integration) -> + if not RocketChat.authz.hasPermission @userId, 'manage-integrations' + throw new Meteor.Error 'not_authorized' + + if not _.isString(integration.channel) + throw new Meteor.Error 'invalid_channel', '[methods] addIntegration -> channel must be string' + + if integration.channel.trim() is '' + throw new Meteor.Error 'invalid_channel', '[methods] addIntegration -> channel can\'t be empty' + + if integration.channel[0] not in ['@', '#'] + throw new Meteor.Error 'invalid_channel', '[methods] addIntegration -> channel should start with # or @' + + if not RocketChat.models.Integrations.findOne(integrationId)? + throw new Meteor.Error 'invalid_integration', '[methods] addIntegration -> integration not found' + + record = undefined + channelType = integration.channel[0] + channel = integration.channel.substr(1) + + switch channelType + when '#' + record = RocketChat.models.Rooms.findOne + $or: [ + {_id: channel} + {name: channel} + ] + when '@' + record = RocketChat.models.Users.findOne + $or: [ + {_id: channel} + {username: channel} + ] + + if record is undefined + throw new Meteor.Error 'channel_does_not_exists', "[methods] addIntegration -> The channel does not exists" + + RocketChat.models.Integrations.update integrationId, + $set: + name: integration.name + avatar: integration.avatar + alias: integration.alias + channel: integration.channel + _updatedAt: new Date + _updatedBy: RocketChat.models.Users.findOne @userId, {fields: {username: 1}} + + return RocketChat.models.Integrations.findOne(integrationId) diff --git a/packages/rocketchat-integrations/server/models/Integrations.coffee b/packages/rocketchat-integrations/server/models/Integrations.coffee new file mode 100644 index 000000000000..8ca464e07ce9 --- /dev/null +++ b/packages/rocketchat-integrations/server/models/Integrations.coffee @@ -0,0 +1,13 @@ +RocketChat.models.Integrations = new class extends RocketChat.models._Base + constructor: -> + @_initModel 'integrations' + + + # FIND + # findByRole: (role, options) -> + # query = + # roles: role + + # return @find query, options + + # CREATE diff --git a/packages/rocketchat-integrations/server/publications/integrations.coffee b/packages/rocketchat-integrations/server/publications/integrations.coffee new file mode 100644 index 000000000000..1d958bd2922c --- /dev/null +++ b/packages/rocketchat-integrations/server/publications/integrations.coffee @@ -0,0 +1,8 @@ +Meteor.publish 'integrations', -> + unless @userId + return @ready() + + if not RocketChat.authz.hasPermission @userId, 'manage-integrations' + throw new Meteor.Error "not-authorized" + + return RocketChat.models.Integrations.find() diff --git a/packages/rocketchat-ldap/i18n/ku.i18n.json b/packages/rocketchat-ldap/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-ldap/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-ldap/i18n/lo.i18n.json b/packages/rocketchat-ldap/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-ldap/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-ldap/i18n/nl.i18n.json b/packages/rocketchat-ldap/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-ldap/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-lib/client/lib/settings.coffee b/packages/rocketchat-lib/client/lib/settings.coffee index 579f7234991c..16ce89cf20f2 100644 --- a/packages/rocketchat-lib/client/lib/settings.coffee +++ b/packages/rocketchat-lib/client/lib/settings.coffee @@ -32,16 +32,17 @@ RocketChat.settings.init = -> RocketChat.settings.init() Meteor.startup -> - Tracker.autorun (c) -> - siteUrl = RocketChat.settings.get('Site_Url') - if not siteUrl or not Meteor.userId()? - return + if Meteor.isCordova is false + Tracker.autorun (c) -> + siteUrl = RocketChat.settings.get('Site_Url') + if not siteUrl or not Meteor.userId()? + return - if RocketChat.authz.hasRole(Meteor.userId(), 'admin') is false - return c.stop() + if RocketChat.authz.hasRole(Meteor.userId(), 'admin') is false + return c.stop() - siteUrl = siteUrl.replace /\/$/, '' - if siteUrl isnt location.origin - toastr.warning TAPi18n.__('The_configured_URL_is_different_from_the_URL_you_are_accessing'), TAPi18n.__('Warning') + siteUrl = siteUrl.replace /\/$/, '' + if siteUrl isnt location.origin + toastr.warning TAPi18n.__('The_configured_URL_is_different_from_the_URL_you_are_accessing'), TAPi18n.__('Warning') - return c.stop() + return c.stop() diff --git a/packages/rocketchat-lib/i18n/ku.i18n.json b/packages/rocketchat-lib/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-lib/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-lib/i18n/lo.i18n.json b/packages/rocketchat-lib/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-lib/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-lib/i18n/nl.i18n.json b/packages/rocketchat-lib/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-lib/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-lib/lib/settings.coffee b/packages/rocketchat-lib/lib/settings.coffee index 7f3694134de5..91d58ae475ec 100644 --- a/packages/rocketchat-lib/lib/settings.coffee +++ b/packages/rocketchat-lib/lib/settings.coffee @@ -41,5 +41,8 @@ RocketChat.settings = # else if Meteor.settings?[_id]? # callback key, Meteor.settings[_id], false - RocketChat.settings.callbacks[key] ?= [] - RocketChat.settings.callbacks[key].push callback + keys = [].concat key + + for k in keys + RocketChat.settings.callbacks[k] ?= [] + RocketChat.settings.callbacks[k].push callback diff --git a/packages/rocketchat-lib/package.js b/packages/rocketchat-lib/package.js index 3d150e39dd3d..897bd0bab52c 100644 --- a/packages/rocketchat-lib/package.js +++ b/packages/rocketchat-lib/package.js @@ -66,6 +66,7 @@ Package.onUse(function(api) { api.addFiles('server/methods/setRealName.coffee', 'server'); api.addFiles('server/methods/setUsername.coffee', 'server'); api.addFiles('server/methods/updateUser.coffee', 'server'); + api.addFiles('server/methods/restartServer.coffee', 'server'); // SERVER STARTUP api.addFiles('server/startup/settingsOnLoadCdnPrefix.coffee', 'server'); diff --git a/packages/rocketchat-lib/server/functions/sendMessage.coffee b/packages/rocketchat-lib/server/functions/sendMessage.coffee index ed0159147b08..20620d1c9dc5 100644 --- a/packages/rocketchat-lib/server/functions/sendMessage.coffee +++ b/packages/rocketchat-lib/server/functions/sendMessage.coffee @@ -10,8 +10,9 @@ RocketChat.sendMessage = (user, message, room, options) -> message.rid = room._id - if urls = message.msg.match /([A-Za-z]{3,9}):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+=!:~%\/\.@\,\w]+)?\??([-\+=&!:;%@\/\.\,\w]+)?#?([\w]+)?)?/g - message.urls = urls.map (url) -> url: url + if message.parseUrls isnt false + if urls = message.msg.match /([A-Za-z]{3,9}):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+=!:~%\/\.@\,\w]+)?\??([-\+=&!:;%@\/\.\,\w]+)?#?([\w]+)?)?/g + message.urls = urls.map (url) -> url: url message = RocketChat.callbacks.run 'beforeSaveMessage', message diff --git a/packages/rocketchat-lib/server/functions/setUsername.coffee b/packages/rocketchat-lib/server/functions/setUsername.coffee index 95ae56aad69d..da23f4970b57 100644 --- a/packages/rocketchat-lib/server/functions/setUsername.coffee +++ b/packages/rocketchat-lib/server/functions/setUsername.coffee @@ -45,6 +45,14 @@ RocketChat._setUsername = (userId, username) -> RocketChat.models.Subscriptions.setUserUsernameByUserId user._id, username RocketChat.models.Subscriptions.setNameForDirectRoomsWithOldName previousUsername, username + rs = RocketChatFileAvatarInstance.getFileWithReadStream(encodeURIComponent("#{previousUsername}.jpg")) + if rs? + RocketChatFileAvatarInstance.deleteFile encodeURIComponent("#{username}.jpg") + ws = RocketChatFileAvatarInstance.createWriteStream encodeURIComponent("#{username}.jpg"), rs.contentType + ws.on 'end', Meteor.bindEnvironment -> + RocketChatFileAvatarInstance.deleteFile encodeURIComponent("#{previousUsername}.jpg") + rs.readStream.pipe(ws) + # Set new username RocketChat.models.Users.setUsername user._id, username user.username = username diff --git a/packages/rocketchat-lib/server/methods/addOAuthService.coffee b/packages/rocketchat-lib/server/methods/addOAuthService.coffee index bf10e8f89078..4545add58416 100644 --- a/packages/rocketchat-lib/server/methods/addOAuthService.coffee +++ b/packages/rocketchat-lib/server/methods/addOAuthService.coffee @@ -10,13 +10,13 @@ Meteor.methods name = name.toLowerCase().replace(/[^a-z0-9]/g, '') name = s.capitalize(name) - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}" , false , { type: 'boolean', group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Enable'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_url" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_URL'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_token_path" , '/oauth/token' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Token_Path'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_identity_path" , '/me' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Identity_Path'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_authorize_path" , '/oauth/authorize', { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Authorize_Path'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_id" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_id'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_secret" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Secret'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_button_label_text" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Text'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_button_label_color", '#FFFFFF' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Color'} - RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_button_color" , '#13679A' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Button_Color'} + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}" , false , { type: 'boolean', group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Enable', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_url" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_URL', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_token_path" , '/oauth/token' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Token_Path', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_identity_path" , '/me' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Identity_Path', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_authorize_path" , '/oauth/authorize', { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Authorize_Path', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_id" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_id', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_secret" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Secret', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_button_label_text" , '' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Text', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_button_label_color", '#FFFFFF' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Button_Label_Color', persistent: true } + RocketChat.settings.add "Accounts_OAuth_Custom_#{name}_button_color" , '#13679A' , { type: 'string' , group: 'Accounts', section: "Custom OAuth: #{name}", i18nLabel: 'Accounts_OAuth_Custom_Button_Color', persistent: true } diff --git a/packages/rocketchat-lib/server/methods/restartServer.coffee b/packages/rocketchat-lib/server/methods/restartServer.coffee new file mode 100644 index 000000000000..4b15cf58488c --- /dev/null +++ b/packages/rocketchat-lib/server/methods/restartServer.coffee @@ -0,0 +1,15 @@ +Meteor.methods + restart_server: -> + if not Meteor.userId() + throw new Meteor.Error 'invalid-user', "[methods] restart_server -> Invalid user" + + unless RocketChat.authz.hasRole( Meteor.userId(), 'admin') is true + throw new Meteor.Error 'not-authorized', '[methods] restart_server -> Not authorized' + + Meteor.setTimeout -> + process.exit(0) + , 2000 + + return {} = + message: "The_server_will_restart_in_s_seconds" + params: [2] diff --git a/packages/rocketchat-lib/server/models/Messages.coffee b/packages/rocketchat-lib/server/models/Messages.coffee index 3d05788863c9..b7449cddf475 100644 --- a/packages/rocketchat-lib/server/models/Messages.coffee +++ b/packages/rocketchat-lib/server/models/Messages.coffee @@ -269,6 +269,8 @@ RocketChat.models.Messages = new class extends RocketChat.models._Base createRoomRenamedWithRoomIdRoomNameAndUser: (roomId, roomName, user, extraData) -> return @createWithTypeRoomIdMessageAndUser 'r', roomId, roomName, user, extraData + createCommandWithRoomIdAndUser: (command, roomId, user, extraData) -> + return @createWithTypeRoomIdMessageAndUser 'command', roomId, command, user, extraData # REMOVE removeById: (_id) -> diff --git a/packages/rocketchat-lib/server/startup/settings.coffee b/packages/rocketchat-lib/server/startup/settings.coffee index 2421e30a7ece..688e0cd49248 100644 --- a/packages/rocketchat-lib/server/startup/settings.coffee +++ b/packages/rocketchat-lib/server/startup/settings.coffee @@ -47,6 +47,8 @@ RocketChat.settings.add 'Accounts_AllowUsernameChange', true, { type: 'boolean', RocketChat.settings.add 'Accounts_AllowPasswordChange', true, { type: 'boolean', group: 'Accounts', section: 'General', public: true } RocketChat.settings.add 'Accounts_RequireNameForSignUp', true, { type: 'boolean', group: 'Accounts', section: 'General', public: true } +RocketChat.settings.add 'Accounts_LoginExpiration', 90, { type: 'int', group: 'Accounts', section: 'General', public: true } + RocketChat.settings.addGroup 'FileUpload' RocketChat.settings.add 'FileUpload_Enabled', true, { type: 'boolean', group: 'FileUpload', public: true } RocketChat.settings.add 'FileUpload_MaxFileSize', 2097152, { type: 'int', group: 'FileUpload', public: true } @@ -59,8 +61,9 @@ RocketChat.settings.add 'Site_Name', 'Rocket.Chat', { type: 'string', group: 'Ge RocketChat.settings.add 'Allow_Invalid_SelfSigned_Certs', false, { type: 'boolean', group: 'General' } RocketChat.settings.add 'Disable_Favorite_Rooms', false, { type: 'boolean', group: 'General' } RocketChat.settings.add 'CDN_PREFIX', '', { type: 'string', group: 'General' } +RocketChat.settings.add 'Restart', 'restart_server', { type: 'action', group: 'General', actionText: 'Restart_the_server' } -RocketChat.settings.add 'UTF8_Names_Validation', '[0-9a-zA-Z-_.]+', { type: 'string', group: 'General', section: 'UTF8', public: true } +RocketChat.settings.add 'UTF8_Names_Validation', '[0-9a-zA-Z-_.]+', { type: 'string', group: 'General', section: 'UTF8', public: true ,i18nDescription: 'UTF8_Names_Validation_Description'} RocketChat.settings.add 'UTF8_Names_Slugify', true, { type: 'boolean', group: 'General', section: 'UTF8', public: true } RocketChat.settings.addGroup 'API' @@ -104,6 +107,7 @@ RocketChat.settings.add 'Push_enable', true, { type: 'boolean', group: 'Push', p RocketChat.settings.add 'Push_enable_gateway', true, { type: 'boolean', group: 'Push' } RocketChat.settings.add 'Push_gateway', 'https://rocket.chat', { type: 'string', group: 'Push' } RocketChat.settings.add 'Push_production', true, { type: 'boolean', group: 'Push', public: true } +RocketChat.settings.add 'Push_test_push', 'push_test', { type: 'action', group: 'Push', actionText: 'Send_a_test_push_to_my_user' } RocketChat.settings.add 'Push_apn_passphrase', '', { type: 'string', group: 'Push', section: 'Certificates_and_Keys' } RocketChat.settings.add 'Push_apn_key', '', { type: 'string', multiline: true, group: 'Push', section: 'Certificates_and_Keys' } RocketChat.settings.add 'Push_apn_cert', '', { type: 'string', multiline: true, group: 'Push', section: 'Certificates_and_Keys' } diff --git a/packages/rocketchat-livechat/app/.meteor/packages b/packages/rocketchat-livechat/app/.meteor/packages index b5196ffad92c..2f093f910063 100644 --- a/packages/rocketchat-livechat/app/.meteor/packages +++ b/packages/rocketchat-livechat/app/.meteor/packages @@ -34,3 +34,5 @@ mizzao:timesync reactive-var accounts-password standard-minifiers +tap:i18n +kevohagan:sweetalert diff --git a/packages/rocketchat-livechat/app/.meteor/versions b/packages/rocketchat-livechat/app/.meteor/versions index 2ca4cd982ac5..34a2055ee61d 100644 --- a/packages/rocketchat-livechat/app/.meteor/versions +++ b/packages/rocketchat-livechat/app/.meteor/versions @@ -1,5 +1,6 @@ accounts-base@1.2.2 accounts-password@1.1.4 +aldeed:simple-schema@1.3.3 arunoda:streams@0.1.17 babel-compiler@5.8.24_1 babel-runtime@0.1.4 @@ -11,6 +12,7 @@ boilerplate-generator@1.0.4 caching-compiler@1.0.0 caching-html-compiler@1.0.2 callback-hook@1.0.4 +cfs:http-methods@0.0.30 check@1.1.0 coffeescript@1.0.11 cosmos:browserify@0.9.2 @@ -33,12 +35,14 @@ id-map@1.0.4 jquery@1.11.4 kadira:blaze-layout@2.3.0 kadira:flow-router@2.10.0 +kevohagan:sweetalert@1.0.0 konecty:nrr@2.0.2 less@2.5.1 livedata@1.0.15 localstorage@1.0.5 logging@1.0.8 meteor@1.1.10 +meteorspark:util@0.2.0 minifiers@1.1.7 minimongo@1.0.10 mizzao:timesync@0.3.4 @@ -50,6 +54,7 @@ npm-mongo@1.4.39_1 observe-sequence@1.0.7 ordered-dict@1.0.4 promise@0.5.1 +raix:eventemitter@0.1.3 random@1.0.5 rate-limit@1.0.0 reactive-dict@1.1.3 @@ -63,6 +68,7 @@ spacebars@1.0.7 spacebars-compiler@1.0.7 srp@1.0.4 standard-minifiers@1.0.2 +tap:i18n@1.7.0 templating@1.1.5 templating-tools@1.0.0 tracker@1.0.9 diff --git a/packages/rocketchat-livechat/app/client/lib/fromApp/RoomHistoryManager.coffee b/packages/rocketchat-livechat/app/client/lib/fromApp/RoomHistoryManager.coffee index 08cec76ff0f9..c12bd00df8d2 100644 --- a/packages/rocketchat-livechat/app/client/lib/fromApp/RoomHistoryManager.coffee +++ b/packages/rocketchat-livechat/app/client/lib/fromApp/RoomHistoryManager.coffee @@ -30,7 +30,9 @@ ts = new Date Meteor.call 'loadHistory', rid, ts, limit, undefined, (err, result) -> - ChatMessage.upsert {_id: item._id}, item for item in result?.messages or [] + for item in result?.messages or [] + if item.t isnt 'command' + ChatMessage.upsert {_id: item._id}, item room.isLoading.set false room.loaded += result.messages.length if result.messages.length < limit diff --git a/packages/rocketchat-livechat/app/client/lib/tapi18n.coffee b/packages/rocketchat-livechat/app/client/lib/tapi18n.coffee new file mode 100644 index 000000000000..1cf705e3952e --- /dev/null +++ b/packages/rocketchat-livechat/app/client/lib/tapi18n.coffee @@ -0,0 +1,15 @@ +@t = (key, replaces...) -> + if _.isObject replaces[0] + return TAPi18n.__ key, replaces + else + return TAPi18n.__ key, { postProcess: 'sprintf', sprintf: replaces } + +@tr = (key, options, replaces...) -> + if _.isObject replaces[0] + return TAPi18n.__ key, options, replaces + else + return TAPi18n.__ key, options, { postProcess: 'sprintf', sprintf: replaces } + +@isRtl = (language) -> + # https://en.wikipedia.org/wiki/Right-to-left#cite_note-2 + return language?.split('-').shift().toLowerCase() in ['ar', 'dv', 'fa', 'he', 'ku', 'ps', 'sd', 'ug', 'ur', 'yi'] diff --git a/packages/rocketchat-livechat/app/client/routes/router.coffee b/packages/rocketchat-livechat/app/client/routes/router.coffee index 976443f1c313..1105938efd90 100644 --- a/packages/rocketchat-livechat/app/client/routes/router.coffee +++ b/packages/rocketchat-livechat/app/client/routes/router.coffee @@ -1,3 +1,5 @@ +BlazeLayout.setRoot('body'); + FlowRouter.route '/livechat', name: 'index' diff --git a/packages/rocketchat-livechat/app/client/startup/room.coffee b/packages/rocketchat-livechat/app/client/startup/room.coffee index 81c83bb3e4ba..cbed0d65ef51 100644 --- a/packages/rocketchat-livechat/app/client/startup/room.coffee +++ b/packages/rocketchat-livechat/app/client/startup/room.coffee @@ -2,4 +2,9 @@ msgStream = new Meteor.Stream 'messages' Tracker.autorun -> if visitor.getRoom()? msgStream.on visitor.getRoom(), (msg) -> - ChatMessage.upsert { _id: msg._id }, msg + if msg.t is 'command' + if msg.msg is 'survey' + unless $('body #survey').length + Blaze.render(Template.survey, $('body').get(0)) + else + ChatMessage.upsert { _id: msg._id }, msg diff --git a/packages/rocketchat-livechat/app/client/stylesheets/fontello.css b/packages/rocketchat-livechat/app/client/stylesheets/fontello.css new file mode 100644 index 000000000000..fc28243c86e7 --- /dev/null +++ b/packages/rocketchat-livechat/app/client/stylesheets/fontello.css @@ -0,0 +1,509 @@ +@font-face { + font-family: 'fontello'; + src: url('/fonts/fontello.eot?52343198'); + src: url('/fonts/fontello.eot?52343198#iefix') format('embedded-opentype'), + url('/fonts/fontello.woff?52343198') format('woff'), + url('/fonts/fontello.ttf?52343198') format('truetype'), + url('/fonts/fontello.svg?52343198#fontello') format('svg'); + font-weight: normal; + font-style: normal; +} +/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ +/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ +/* +@media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'fontello'; + src: url('/fonts/fontello.svg?52343198#fontello') format('svg'); + } +} +*/ + + [class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "fontello"; + font-style: normal; + font-weight: normal; + speak: none; + + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Font smoothing. That was taken from TWBS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} + +.icon-religious-islam:before { content: '\21'; } /* '!' */ +.icon-religious-jewish:before { content: '\22'; } /* '"' */ +.icon-graduation-cap-1:before { content: '\23'; } /* '#' */ +.icon-universal-access:before { content: '\24'; } /* '$' */ +.icon-paper-plane:before { content: '\25'; } /* '%' */ +.icon-paw:before { content: '\26'; } /* '&' */ +.icon-spoon:before { content: '\27'; } /* ''' */ +.icon-chrome:before { content: '\2a'; } /* '*' */ +.icon-opera:before { content: '\2b'; } /* '+' */ +.icon-crown:before { content: '\2c'; } /* ',' */ +.icon-recycle:before { content: '\2d'; } /* '-' */ +.icon-note-beamed:before { content: '\2e'; } /* '.' */ +.icon-ie:before { content: '\2f'; } /* '/' */ +.icon-note:before { content: '\30'; } /* '0' */ +.icon-alert:before { content: '\31'; } /* '1' */ +.icon-chat-1:before { content: '\32'; } /* '2' */ +.icon-360:before { content: '\33'; } /* '3' */ +.icon-cab:before { content: '\34'; } /* '4' */ +.icon-share:before { content: '\35'; } /* '5' */ +.icon-building-filled:before { content: '\36'; } /* '6' */ +.icon-linux:before { content: '\37'; } /* '7' */ +.icon-camera-tour:before { content: '\38'; } /* '8' */ +.icon-spin1:before { content: '\39'; } /* '9' */ +.icon-spin2:before { content: '\3a'; } /* ':' */ +.icon-spin3:before { content: '\3b'; } /* ';' */ +.icon-left-open:before { content: '\3c'; } /* '<' */ +.icon-spin5:before { content: '\3d'; } /* '=' */ +.icon-right-open:before { content: '\3e'; } /* '>' */ +.icon-history:before { content: '\3f'; } /* '?' */ +.icon-circle-notch:before { content: '\40'; } /* '@' */ +.icon-marquee:before { content: '\41'; } /* 'A' */ +.icon-eye:before { content: '\42'; } /* 'B' */ +.icon-users:before { content: '\43'; } /* 'C' */ +.icon-shower:before { content: '\44'; } /* 'D' */ +.icon-swimming:before { content: '\45'; } /* 'E' */ +.icon-chart-area:before { content: '\46'; } /* 'F' */ +.icon-chart-pie:before { content: '\47'; } /* 'G' */ +.icon-chart-line:before { content: '\48'; } /* 'H' */ +.icon-bicycle:before { content: '\49'; } /* 'I' */ +.icon-bus:before { content: '\4a'; } /* 'J' */ +.icon-at:before { content: '\4b'; } /* 'K' */ +.icon-infinity:before { content: '\4c'; } /* 'L' */ +.icon-at-1:before { content: '\4d'; } /* 'M' */ +.icon-child:before { content: '\4e'; } /* 'N' */ +.icon-plus-squared-alt:before { content: '\4f'; } /* 'O' */ +.icon-unlink:before { content: '\50'; } /* 'P' */ +.icon-share-squared:before { content: '\51'; } /* 'Q' */ +.icon-tree:before { content: '\52'; } /* 'R' */ +.icon-database:before { content: '\53'; } /* 'S' */ +.icon-lifebuoy:before { content: '\54'; } /* 'T' */ +.icon-cubes:before { content: '\55'; } /* 'U' */ +.icon-cube:before { content: '\56'; } /* 'V' */ +.icon-bell-off:before { content: '\57'; } /* 'W' */ +.icon-trash-1:before { content: '\58'; } /* 'X' */ +.icon-toggle-off:before { content: '\59'; } /* 'Y' */ +.icon-toggle-on:before { content: '\5a'; } /* 'Z' */ +.icon-birthday:before { content: '\5b'; } /* '[' */ +.icon-github-circled:before { content: '\5c'; } /* '\' */ +.icon-google:before { content: '\5d'; } /* ']' */ +.icon-pied-piper-squared:before { content: '\5e'; } /* '^' */ +.icon-slideshare:before { content: '\5f'; } /* '_' */ +.icon-wordpress:before { content: '\60'; } /* '`' */ +.icon-digg:before { content: '\61'; } /* 'a' */ +.icon-delicious:before { content: '\62'; } /* 'b' */ +.icon-hash:before { content: '\63'; } /* 'c' */ +.icon-hash-1:before { content: '\64'; } /* 'd' */ +.icon-clock-1:before { content: '\65'; } /* 'e' */ +.icon-asterisk-1:before { content: '\66'; } /* 'f' */ +.icon-cancel-circled:before { content: '\67'; } /* 'g' */ +.icon-bell-off-empty:before { content: '\68'; } /* 'h' */ +.icon-meteor:before { content: '\69'; } /* 'i' */ +.icon-git-squared:before { content: '\6a'; } /* 'j' */ +.icon-angellist:before { content: '\6b'; } /* 'k' */ +.icon-behance:before { content: '\6c'; } /* 'l' */ +.icon-gitlab:before { content: '\6d'; } /* 'm' */ +.icon-rocketchat:before { content: '\6e'; } /* 'n' */ +.icon-spin4:before { content: '\6f'; } /* 'o' */ +.icon-sliders:before { content: '\70'; } /* 'p' */ +.icon-spin6:before { content: '\71'; } /* 'q' */ +.icon-firefox:before { content: '\72'; } /* 'r' */ +.icon-angle-double-left:before { content: '\ab'; } /* '«' */ +.icon-angle-double-right:before { content: '\bb'; } /* '»' */ +.icon-angle-left:before { content: '\2039'; } /* '‹' */ +.icon-angle-right:before { content: '\203a'; } /* '›' */ +.icon-left-open-small:before { content: '\276e'; } /* '❮' */ +.icon-right-open-small:before { content: '\276f'; } /* '❯' */ +.icon-camera:before { content: '\e800'; } /* '' */ +.icon-videocam:before { content: '\e801'; } /* '' */ +.icon-heart:before { content: '\e802'; } /* '' */ +.icon-star:before { content: '\e803'; } /* '' */ +.icon-star-empty:before { content: '\e804'; } /* '' */ +.icon-star-half:before { content: '\e805'; } /* '' */ +.icon-star-half-alt:before { content: '\e806'; } /* '' */ +.icon-thumbs-up-alt:before { content: '\e807'; } /* '' */ +.icon-thumbs-down-alt:before { content: '\e808'; } /* '' */ +.icon-print:before { content: '\e809'; } /* '' */ +.icon-user:before { content: '\e80a'; } /* '' */ +.icon-ok:before { content: '\e80b'; } /* '' */ +.icon-bell-alt:before { content: '\e80c'; } /* '' */ +.icon-bell:before { content: '\e80d'; } /* '' */ +.icon-direction:before { content: '\e80e'; } /* '' */ +.icon-home:before { content: '\e80f'; } /* '' */ +.icon-trash:before { content: '\e810'; } /* '' */ +.icon-menu:before { content: '\e811'; } /* '' */ +.icon-attach:before { content: '\e812'; } /* '' */ +.icon-th-list:before { content: '\e813'; } /* '' */ +.icon-th:before { content: '\e814'; } /* '' */ +.icon-th-large:before { content: '\e815'; } /* '' */ +.icon-ok-circled:before { content: '\e816'; } /* '' */ +.icon-cancel:before { content: '\e818'; } /* '' */ +.icon-attention:before { content: '\e819'; } /* '' */ +.icon-attention-circled:before { content: '\e81a'; } /* '' */ +.icon-location:before { content: '\e81b'; } /* '' */ +.icon-pencil:before { content: '\e81c'; } /* '' */ +.icon-glass:before { content: '\e81d'; } /* '' */ +.icon-music:before { content: '\e81e'; } /* '' */ +.icon-search:before { content: '\e81f'; } /* '' */ +.icon-mail:before { content: '\e820'; } /* '' */ +.icon-mail-alt:before { content: '\e821'; } /* '' */ +.icon-heart-empty:before { content: '\e822'; } /* '' */ +.icon-male:before { content: '\e824'; } /* '' */ +.icon-female:before { content: '\e825'; } /* '' */ +.icon-video:before { content: '\e826'; } /* '' */ +.icon-picture:before { content: '\e827'; } /* '' */ +.icon-ok-squared:before { content: '\e82a'; } /* '' */ +.icon-plus:before { content: '\e82c'; } /* '' */ +.icon-plus-circled:before { content: '\e82d'; } /* '' */ +.icon-plus-squared:before { content: '\e82e'; } /* '' */ +.icon-religious-christian:before { content: '\e82f'; } /* '' */ +.icon-water:before { content: '\e830'; } /* '' */ +.icon-toilet:before { content: '\e831'; } /* '' */ +.icon-droplet:before { content: '\e832'; } /* '' */ +.icon-minus:before { content: '\e833'; } /* '' */ +.icon-minus-circled:before { content: '\e834'; } /* '' */ +.icon-minus-squared:before { content: '\e835'; } /* '' */ +.icon-airport:before { content: '\e836'; } /* '' */ +.icon-help:before { content: '\e837'; } /* '' */ +.icon-help-circled:before { content: '\e838'; } /* '' */ +.icon-info-circled:before { content: '\e839'; } /* '' */ +.icon-info:before { content: '\e83a'; } /* '' */ +.icon-link:before { content: '\e83b'; } /* '' */ +.icon-link-ext:before { content: '\e83d'; } /* '' */ +.icon-link-ext-alt:before { content: '\e83e'; } /* '' */ +.icon-thumbs-down:before { content: '\e83f'; } /* '' */ +.icon-thumbs-up:before { content: '\e840'; } /* '' */ +.icon-flag-checkered:before { content: '\e841'; } /* '' */ +.icon-flag-empty:before { content: '\e842'; } /* '' */ +.icon-flag:before { content: '\e843'; } /* '' */ +.icon-bookmark-empty:before { content: '\e844'; } /* '' */ +.icon-bookmark:before { content: '\e845'; } /* '' */ +.icon-tags:before { content: '\e846'; } /* '' */ +.icon-tag:before { content: '\e847'; } /* '' */ +.icon-eye-off:before { content: '\e848'; } /* '' */ +.icon-minus-squared-alt:before { content: '\e84a'; } /* '' */ +.icon-pin:before { content: '\e84b'; } /* '' */ +.icon-lock-open-alt:before { content: '\e84c'; } /* '' */ +.icon-lock-open:before { content: '\e84d'; } /* '' */ +.icon-lock:before { content: '\e84e'; } /* '' */ +.icon-download:before { content: '\e84f'; } /* '' */ +.icon-upload:before { content: '\e850'; } /* '' */ +.icon-download-cloud:before { content: '\e851'; } /* '' */ +.icon-upload-cloud:before { content: '\e852'; } /* '' */ +.icon-reply:before { content: '\e853'; } /* '' */ +.icon-edit:before { content: '\e854'; } /* '' */ +.icon-compass:before { content: '\e855'; } /* '' */ +.icon-retweet:before { content: '\e856'; } /* '' */ +.icon-keyboard:before { content: '\e857'; } /* '' */ +.icon-gamepad:before { content: '\e858'; } /* '' */ +.icon-comment:before { content: '\e859'; } /* '' */ +.icon-chat:before { content: '\e85a'; } /* '' */ +.icon-comment-empty:before { content: '\e85b'; } /* '' */ +.icon-chat-empty:before { content: '\e85c'; } /* '' */ +.icon-reply-all:before { content: '\e85d'; } /* '' */ +.icon-forward:before { content: '\e85e'; } /* '' */ +.icon-quote-left:before { content: '\e85f'; } /* '' */ +.icon-quote-right:before { content: '\e860'; } /* '' */ +.icon-code:before { content: '\e861'; } /* '' */ +.icon-export:before { content: '\e862'; } /* '' */ +.icon-export-alt:before { content: '\e863'; } /* '' */ +.icon-pencil-squared:before { content: '\e864'; } /* '' */ +.icon-attention-alt:before { content: '\e865'; } /* '' */ +.icon-doc:before { content: '\e866'; } /* '' */ +.icon-docs:before { content: '\e867'; } /* '' */ +.icon-doc-text:before { content: '\e868'; } /* '' */ +.icon-doc-inv:before { content: '\e869'; } /* '' */ +.icon-doc-text-inv:before { content: '\e86a'; } /* '' */ +.icon-folder-open:before { content: '\e86b'; } /* '' */ +.icon-folder-empty:before { content: '\e86c'; } /* '' */ +.icon-folder:before { content: '\e86d'; } /* '' */ +.icon-folder-open-empty:before { content: '\e86e'; } /* '' */ +.icon-box:before { content: '\e86f'; } /* '' */ +.icon-rss:before { content: '\e870'; } /* '' */ +.icon-rss-squared:before { content: '\e871'; } /* '' */ +.icon-phone:before { content: '\e872'; } /* '' */ +.icon-phone-squared:before { content: '\e873'; } /* '' */ +.icon-blank:before { content: '\e874'; } /* '' */ +.icon-youtube-play:before { content: '\e875'; } /* '' */ +.icon-youtube-squared:before { content: '\e876'; } /* '' */ +.icon-youtube:before { content: '\e877'; } /* '' */ +.icon-key-1:before { content: '\e878'; } /* '' */ +.icon-foxter:before { content: '\e879'; } /* '' */ +.icon-windows:before { content: '\e87a'; } /* '' */ +.icon-kettle:before { content: '\e87b'; } /* '' */ +.icon-graduation-cap:before { content: '\e87c'; } /* '' */ +.icon-vimeo-squared:before { content: '\e87d'; } /* '' */ +.icon-twitter:before { content: '\e87e'; } /* '' */ +.icon-twitter-squared:before { content: '\e87f'; } /* '' */ +.icon-tumblr-squared:before { content: '\e880'; } /* '' */ +.icon-tumblr:before { content: '\e881'; } /* '' */ +.icon-trello:before { content: '\e882'; } /* '' */ +.icon-stackoverflow:before { content: '\e883'; } /* '' */ +.icon-lemon:before { content: '\e884'; } /* '' */ +.icon-parking:before { content: '\e885'; } /* '' */ +.icon-gittip:before { content: '\e886'; } /* '' */ +.icon-gplus:before { content: '\e887'; } /* '' */ +.icon-html5:before { content: '\e888'; } /* '' */ +.icon-gplus-squared:before { content: '\e889'; } /* '' */ +.icon-instagramm:before { content: '\e88a'; } /* '' */ +.icon-linkedin-squared:before { content: '\e88b'; } /* '' */ +.icon-fuel:before { content: '\e88c'; } /* '' */ +.icon-linkedin:before { content: '\e88d'; } /* '' */ +.icon-money-1:before { content: '\e88e'; } /* '' */ +.icon-pagelines:before { content: '\e88f'; } /* '' */ +.icon-pinterest-circled:before { content: '\e890'; } /* '' */ +.icon-pinterest-squared:before { content: '\e891'; } /* '' */ +.icon-skype:before { content: '\e892'; } /* '' */ +.icon-stackexchange:before { content: '\e893'; } /* '' */ +.icon-renren:before { content: '\e894'; } /* '' */ +.icon-bank:before { content: '\e895'; } /* '' */ +.icon-school:before { content: '\e896'; } /* '' */ +.icon-foursquare:before { content: '\e897'; } /* '' */ +.icon-flickr:before { content: '\e898'; } /* '' */ +.icon-facebook-squared:before { content: '\e899'; } /* '' */ +.icon-facebook:before { content: '\e89a'; } /* '' */ +.icon-dropbox:before { content: '\e89b'; } /* '' */ +.icon-dribbble:before { content: '\e89c'; } /* '' */ +.icon-css3:before { content: '\e89d'; } /* '' */ +.icon-bitbucket-squared:before { content: '\e89e'; } /* '' */ +.icon-bitbucket:before { content: '\e89f'; } /* '' */ +.icon-apple:before { content: '\e8a0'; } /* '' */ +.icon-android:before { content: '\e8a1'; } /* '' */ +.icon-adn:before { content: '\e8a2'; } /* '' */ +.icon-wheelchair:before { content: '\e8a3'; } /* '' */ +.icon-bullseye:before { content: '\e8a4'; } /* '' */ +.icon-user-md:before { content: '\e8a5'; } /* '' */ +.icon-stethoscope:before { content: '\e8a6'; } /* '' */ +.icon-ambulance:before { content: '\e8a7'; } /* '' */ +.icon-medkit:before { content: '\e8a8'; } /* '' */ +.icon-hospital:before { content: '\e8a9'; } /* '' */ +.icon-h-sigh:before { content: '\e8aa'; } /* '' */ +.icon-building:before { content: '\e8ab'; } /* '' */ +.icon-smile:before { content: '\e8ac'; } /* '' */ +.icon-frown:before { content: '\e8ad'; } /* '' */ +.icon-meh:before { content: '\e8ae'; } /* '' */ +.icon-anchor:before { content: '\e8af'; } /* '' */ +.icon-terminal:before { content: '\e8b0'; } /* '' */ +.icon-eraser:before { content: '\e8b1'; } /* '' */ +.icon-puzzle:before { content: '\e8b2'; } /* '' */ +.icon-shield:before { content: '\e8b3'; } /* '' */ +.icon-extinguisher:before { content: '\e8b4'; } /* '' */ +.icon-beer:before { content: '\e8b5'; } /* '' */ +.icon-food:before { content: '\e8b6'; } /* '' */ +.icon-coffee:before { content: '\e8b7'; } /* '' */ +.icon-spinner:before { content: '\e8b8'; } /* '' */ +.icon-sitemap:before { content: '\e8b9'; } /* '' */ +.icon-gauge:before { content: '\e8ba'; } /* '' */ +.icon-hammer:before { content: '\e8bb'; } /* '' */ +.icon-sort-number-down:before { content: '\e8bc'; } /* '' */ +.icon-sort-name-down:before { content: '\e8bd'; } /* '' */ +.icon-sort-number-up:before { content: '\e8be'; } /* '' */ +.icon-sort-name-up:before { content: '\e8bf'; } /* '' */ +.icon-sort-alt-down:before { content: '\e8c0'; } /* '' */ +.icon-sort-alt-up:before { content: '\e8c1'; } /* '' */ +.icon-sort-up:before { content: '\e8c2'; } /* '' */ +.icon-sort-down:before { content: '\e8c3'; } /* '' */ +.icon-sort:before { content: '\e8c4'; } /* '' */ +.icon-certificate:before { content: '\e8c5'; } /* '' */ +.icon-tasks:before { content: '\e8c6'; } /* '' */ +.icon-filter:before { content: '\e8c7'; } /* '' */ +.icon-beaker:before { content: '\e8c8'; } /* '' */ +.icon-magic:before { content: '\e8c9'; } /* '' */ +.icon-truck:before { content: '\e8ca'; } /* '' */ +.icon-money:before { content: '\e8cb'; } /* '' */ +.icon-euro:before { content: '\e8cc'; } /* '' */ +.icon-pound:before { content: '\e8cd'; } /* '' */ +.icon-dollar:before { content: '\e8ce'; } /* '' */ +.icon-bug:before { content: '\e8cf'; } /* '' */ +.icon-rocket:before { content: '\e8d0'; } /* '' */ +.icon-fork:before { content: '\e8d1'; } /* '' */ +.icon-key:before { content: '\e8d2'; } /* '' */ +.icon-hdd:before { content: '\e8d3'; } /* '' */ +.icon-megaphone:before { content: '\e8d4'; } /* '' */ +.icon-floppy:before { content: '\e8d5'; } /* '' */ +.icon-credit-card:before { content: '\e8d6'; } /* '' */ +.icon-ticket:before { content: '\e8d7'; } /* '' */ +.icon-chart-bar:before { content: '\e8d8'; } /* '' */ +.icon-magnet:before { content: '\e8d9'; } /* '' */ +.icon-fire:before { content: '\e8da'; } /* '' */ +.icon-gift:before { content: '\e8db'; } /* '' */ +.icon-asterisk:before { content: '\e8dc'; } /* '' */ +.icon-dot-circled:before { content: '\e8dd'; } /* '' */ +.icon-circle-empty:before { content: '\e8de'; } /* '' */ +.icon-paste:before { content: '\e8df'; } /* '' */ +.icon-briefcase:before { content: '\e8e0'; } /* '' */ +.icon-suitcase:before { content: '\e8e1'; } /* '' */ +.icon-ellipsis:before { content: '\e8e2'; } /* '' */ +.icon-ellipsis-vert:before { content: '\e8e3'; } /* '' */ +.icon-off:before { content: '\e8e4'; } /* '' */ +.icon-road:before { content: '\e8e5'; } /* '' */ +.icon-qrcode:before { content: '\e8e6'; } /* '' */ +.icon-barcode:before { content: '\e8e7'; } /* '' */ +.icon-list-alt:before { content: '\e8e8'; } /* '' */ +.icon-book:before { content: '\e8e9'; } /* '' */ +.icon-ajust:before { content: '\e8ea'; } /* '' */ +.icon-tint:before { content: '\e8eb'; } /* '' */ +.icon-check:before { content: '\e8ec'; } /* '' */ +.icon-check-empty:before { content: '\e8ed'; } /* '' */ +.icon-circle:before { content: '\e8ee'; } /* '' */ +.icon-cog:before { content: '\e8ef'; } /* '' */ +.icon-cog-alt:before { content: '\e8f0'; } /* '' */ +.icon-wrench:before { content: '\e8f1'; } /* '' */ +.icon-basket:before { content: '\e8f2'; } /* '' */ +.icon-calendar-empty:before { content: '\e8f3'; } /* '' */ +.icon-calendar:before { content: '\e8f4'; } /* '' */ +.icon-login:before { content: '\e8f5'; } /* '' */ +.icon-logout:before { content: '\e8f6'; } /* '' */ +.icon-mic:before { content: '\e8f7'; } /* '' */ +.icon-mute:before { content: '\e8f8'; } /* '' */ +.icon-volume-off:before { content: '\e8f9'; } /* '' */ +.icon-volume-down:before { content: '\e8fa'; } /* '' */ +.icon-volume-up:before { content: '\e8fb'; } /* '' */ +.icon-headphones:before { content: '\e8fc'; } /* '' */ +.icon-clock:before { content: '\e8fd'; } /* '' */ +.icon-up-dir:before { content: '\e8fe'; } /* '' */ +.icon-down-dir:before { content: '\e8ff'; } /* '' */ +.icon-right-circled2:before { content: '\e900'; } /* '' */ +.icon-left-circled2:before { content: '\e901'; } /* '' */ +.icon-up-circled2:before { content: '\e902'; } /* '' */ +.icon-down-circled2:before { content: '\e903'; } /* '' */ +.icon-zoom-out:before { content: '\e904'; } /* '' */ +.icon-zoom-in:before { content: '\e905'; } /* '' */ +.icon-move:before { content: '\e906'; } /* '' */ +.icon-resize-horizontal:before { content: '\e907'; } /* '' */ +.icon-resize-vertical:before { content: '\e908'; } /* '' */ +.icon-resize-small:before { content: '\e909'; } /* '' */ +.icon-resize-full-alt:before { content: '\e90a'; } /* '' */ +.icon-resize-full:before { content: '\e90b'; } /* '' */ +.icon-block:before { content: '\e90c'; } /* '' */ +.icon-lightbulb:before { content: '\e90d'; } /* '' */ +.icon-left-dir:before { content: '\e90e'; } /* '' */ +.icon-right-dir:before { content: '\e90f'; } /* '' */ +.icon-down-open:before { content: '\e910'; } /* '' */ +.icon-up-open:before { content: '\e913'; } /* '' */ +.icon-angle-up:before { content: '\e916'; } /* '' */ +.icon-angle-down:before { content: '\e917'; } /* '' */ +.icon-angle-circled-left:before { content: '\e918'; } /* '' */ +.icon-angle-circled-right:before { content: '\e919'; } /* '' */ +.icon-angle-circled-down:before { content: '\e91a'; } /* '' */ +.icon-angle-circled-up:before { content: '\e91d'; } /* '' */ +.icon-scissors:before { content: '\e91e'; } /* '' */ +.icon-align-left:before { content: '\e91f'; } /* '' */ +.icon-mobile:before { content: '\e920'; } /* '' */ +.icon-play-circled2:before { content: '\e921'; } /* '' */ +.icon-right-circled:before { content: '\e922'; } /* '' */ +.icon-left-circled:before { content: '\e923'; } /* '' */ +.icon-play-circled:before { content: '\e924'; } /* '' */ +.icon-tablet:before { content: '\e925'; } /* '' */ +.icon-text-width:before { content: '\e926'; } /* '' */ +.icon-crop:before { content: '\e927'; } /* '' */ +.icon-columns:before { content: '\e928'; } /* '' */ +.icon-text-height:before { content: '\e929'; } /* '' */ +.icon-laptop:before { content: '\e92a'; } /* '' */ +.icon-play:before { content: '\e92b'; } /* '' */ +.icon-down-hand:before { content: '\e92c'; } /* '' */ +.icon-up-hand:before { content: '\e92d'; } /* '' */ +.icon-collapse-left:before { content: '\e92e'; } /* '' */ +.icon-desktop:before { content: '\e92f'; } /* '' */ +.icon-italic:before { content: '\e930'; } /* '' */ +.icon-table:before { content: '\e931'; } /* '' */ +.icon-subscript:before { content: '\e932'; } /* '' */ +.icon-bold:before { content: '\e933'; } /* '' */ +.icon-award:before { content: '\e934'; } /* '' */ +.icon-expand-right:before { content: '\e935'; } /* '' */ +.icon-left-hand:before { content: '\e936'; } /* '' */ +.icon-right-hand:before { content: '\e937'; } /* '' */ +.icon-signal:before { content: '\e938'; } /* '' */ +.icon-collapse:before { content: '\e939'; } /* '' */ +.icon-font:before { content: '\e93a'; } /* '' */ +.icon-superscript:before { content: '\e93b'; } /* '' */ +.icon-align-center:before { content: '\e93c'; } /* '' */ +.icon-align-right:before { content: '\e93d'; } /* '' */ +.icon-align-justify:before { content: '\e93e'; } /* '' */ +.icon-indent-left:before { content: '\e93f'; } /* '' */ +.icon-indent-right:before { content: '\e940'; } /* '' */ +.icon-list:before { content: '\e941'; } /* '' */ +.icon-list-bullet:before { content: '\e942'; } /* '' */ +.icon-list-numbered:before { content: '\e943'; } /* '' */ +.icon-strike:before { content: '\e944'; } /* '' */ +.icon-underline:before { content: '\e945'; } /* '' */ +.icon-leaf:before { content: '\e946'; } /* '' */ +.icon-fighter-jet:before { content: '\e947'; } /* '' */ +.icon-flight:before { content: '\e948'; } /* '' */ +.icon-umbrella:before { content: '\e949'; } /* '' */ +.icon-moon:before { content: '\e94a'; } /* '' */ +.icon-flash:before { content: '\e94b'; } /* '' */ +.icon-cloud:before { content: '\e94c'; } /* '' */ +.icon-sun:before { content: '\e94d'; } /* '' */ +.icon-globe:before { content: '\e94e'; } /* '' */ +.icon-inbox:before { content: '\e94f'; } /* '' */ +.icon-stop:before { content: '\e950'; } /* '' */ +.icon-pause:before { content: '\e951'; } /* '' */ +.icon-to-end:before { content: '\e952'; } /* '' */ +.icon-to-end-alt:before { content: '\e953'; } /* '' */ +.icon-to-start:before { content: '\e954'; } /* '' */ +.icon-fast-fw:before { content: '\e955'; } /* '' */ +.icon-to-start-alt:before { content: '\e956'; } /* '' */ +.icon-fast-bw:before { content: '\e957'; } /* '' */ +.icon-eject:before { content: '\e958'; } /* '' */ +.icon-target:before { content: '\e959'; } /* '' */ +.icon-expand:before { content: '\e95a'; } /* '' */ +.icon-exchange:before { content: '\e95b'; } /* '' */ +.icon-shuffle:before { content: '\e95c'; } /* '' */ +.icon-level-down:before { content: '\e95d'; } /* '' */ +.icon-arrows-cw:before { content: '\e95e'; } /* '' */ +.icon-level-up:before { content: '\e95f'; } /* '' */ +.icon-ccw:before { content: '\e960'; } /* '' */ +.icon-cw:before { content: '\e961'; } /* '' */ +.icon-down-circled:before { content: '\e962'; } /* '' */ +.icon-up-circled:before { content: '\e963'; } /* '' */ +.icon-angle-double-up:before { content: '\e964'; } /* '' */ +.icon-angle-double-down:before { content: '\e965'; } /* '' */ +.icon-down:before { content: '\e966'; } /* '' */ +.icon-left:before { content: '\e967'; } /* '' */ +.icon-right:before { content: '\e968'; } /* '' */ +.icon-up:before { content: '\e969'; } /* '' */ +.icon-down-big:before { content: '\e96a'; } /* '' */ +.icon-left-big:before { content: '\e96b'; } /* '' */ +.icon-right-big:before { content: '\e96c'; } /* '' */ +.icon-up-big:before { content: '\e96d'; } /* '' */ +.icon-bedroom:before { content: '\e96e'; } /* '' */ +.icon-fast-food:before { content: '\e96f'; } /* '' */ +.icon-police:before { content: '\e971'; } /* '' */ +.icon-elevator:before { content: '\e972'; } /* '' */ +.icon-food-1:before { content: '\e973'; } /* '' */ +.icon-pan:before { content: '\e974'; } /* '' */ +.icon-tap:before { content: '\e975'; } /* '' */ +.icon-gym:before { content: '\e976'; } /* '' */ +.icon-sports:before { content: '\e977'; } /* '' */ +.icon-football:before { content: '\e978'; } /* '' */ +.icon-tennis:before { content: '\e979'; } /* '' */ +.icon-fax:before { content: '\e97a'; } /* '' */ +.icon-taxi:before { content: '\e97b'; } /* '' */ +.icon-paragraph:before { content: '\e97c'; } /* '' */ diff --git a/packages/rocketchat-livechat/app/client/stylesheets/main.less b/packages/rocketchat-livechat/app/client/stylesheets/main.less index de53ed4ab8f2..1335a0114511 100644 --- a/packages/rocketchat-livechat/app/client/stylesheets/main.less +++ b/packages/rocketchat-livechat/app/client/stylesheets/main.less @@ -9,6 +9,9 @@ -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } +html, body { + height: 100%; +} body { padding: 0; margin: 0; @@ -21,7 +24,7 @@ body { -webkit-font-smoothing: antialiased; line-height: 1rem; padding: 0; - overflow: visible; + overflow: hidden; position: relative; // background-color: @primary-background-color; } @@ -40,41 +43,101 @@ input:focus { box-shadow: 0 0 0; } +.button { + &:extend(.unselectable); + display: inline-block; + padding: 9px 12px; + font-weight: 500; + font-size: 13px; + margin: 4px; + text-transform: uppercase; + word-spacing: 0; + box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.125); + border: none; + line-height: 16px; + position: relative; + cursor: pointer;background-color: #FFF; + color: rgba(255, 255, 255, 0.85); + background-color: lighten(desaturate(@primary-background-color, 15%), 12.5%); + span { + position: relative; + z-index: 2; + } + &:before { + background-color: rgba(0, 0, 0, 0.1); + content: " "; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + z-index: 1; + .transition(opacity .1s ease-out); + } + &:hover { + text-decoration: none; + color: #FFF; + &:before { + opacity: 1; + } + } + &.secondary { + background-color: @tertiary-background-color; + color: @primary-font-color; + &:before { + background-color: rgba(0, 0, 0, 0.045); + } + } + &.clean { + font-size: 14px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.08); + &.primary { + font-weight: 600; + } + } + &.button-block { + display: block; + width: 100%; + } +} + .livechat-room { - position: fixed; - top: 0; - bottom: 0; + display: flex; + flex-direction: column; + height: 100%; + .title { + flex: 1 0 @header-min-height; + + line-height: @header-min-height; + border-top-right-radius: 5px; border-top-left-radius: 5px; color: #FFF; - position: fixed; - top: 0; - width: 100%; - height: @header-min-height; - display: table; z-index: 10; cursor: pointer; h1 { margin: 0; padding: 0 5px; font-size: 9pt; - display: table-cell; - vertical-align: middle; + display: inline-block; + } + + .toolbar { + display: inline-block; + float: right; + padding-right: 5px; } } .messages { - display: block; + flex: 1 1 100%; + background-color: #FFF; - top: @header-min-height; - bottom: @footer-min-height; border-left: 1px solid #E7E7E7; border-right: 1px solid #E7E7E7; - position: fixed; - width: 100%; + overflow-y: auto; .wrapper { - height: 100%; - overflow-y: auto; padding-bottom: 6px; ul { @@ -262,35 +325,36 @@ input:focus { cursor: pointer; bottom: 8px; left: 50%; + z-index: 5; .transition(transform 0.3s ease-out); - .transform(translateY(0)); + .transform(translateY(-40px)); &.not { - .transform(translateY(150%)); + .transform(translateY(100%)); } } .error { - bottom: 50px; + bottom: 40px; position: fixed; width: 100%; background-color: #F7D799; padding: 5px; + z-index: 8; - .transition(transform 0.3s ease-out); - .transform(translateY(200%)); + .transition(transform 0.2s ease-out); + .transform(translateY(100%)); &.show { - .transform(translateY(8px)); + .transform(translateY(0)); } } } .footer { - display: block; + flex: 1 0 @footer-min-height; + + z-index: 10; + background-color: #FCFCFC; - position: fixed; - bottom: 0; - width: 100%; - height: auto; border-top: 1px solid #E7E7E7; border-left: 1px solid #E7E7E7; border-right: 1px solid #E7E7E7; @@ -318,6 +382,99 @@ input:focus { } } } + .offline { + flex: 1 1 100%; + font-weight: bold; + background-color: white; + padding: 2em 0; + text-align: center; + } +} + +.livechat-form { + flex: 1 1 100%; + display: block; + background-color: #FFF; + border-left: 1px solid #E7E7E7; + border-right: 1px solid #E7E7E7; + + input, button { + display: block; + padding: 5px; + margin: 5px; + } + .error { + display: none; + // width: 100%; + background-color: #F7D799; + padding: 5px; + + // .transition(transform 0.3s ease-out); + // .transform(translateY(-100%)); + + &.show { + display: block; + // .transform(translateY(0px)); + } + } +} + +#survey { + .overlay { + background-color: rgba(0,0,0,0.5); + position: fixed; + height: 100%; + width: 100%; + + .wrapper { + background: white; + position: fixed; + height: 60vh; + width: 60vw; + top: 20vh; + left: 20vw; + border-radius: 6px; + display: flex; + flex-direction: column; + + header { + flex: 1 0 40px; + padding: 0 15px; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + line-height: 40px; + } + + .content { + overflow-y: scroll; + padding: 10px; + flex: 1 1 100%; + + .instructions { + margin-top: 5px; + } + + .survey-item { + margin-top: 20px; + + .question { + display: block; + } + + .answer { + margin-right: 5px; + } + } + } + + footer { + flex: 1 0 60px; + border-top: 1px solid rgba(0, 0, 0, 0.1); + line-height: 60px; + text-align: right; + padding-right: 20px; + } + } + } } @media all and(max-height: 200px) { diff --git a/packages/rocketchat-livechat/app/client/views/messages.html b/packages/rocketchat-livechat/app/client/views/messages.html new file mode 100644 index 000000000000..8bfbfd49b62f --- /dev/null +++ b/packages/rocketchat-livechat/app/client/views/messages.html @@ -0,0 +1,23 @@ + diff --git a/packages/rocketchat-livechat/app/client/views/messages.js b/packages/rocketchat-livechat/app/client/views/messages.js new file mode 100644 index 000000000000..d2f45ce48d05 --- /dev/null +++ b/packages/rocketchat-livechat/app/client/views/messages.js @@ -0,0 +1,97 @@ +Template.messages.helpers({ + messages: function() { + return ChatMessage.find({ + rid: visitor.getRoom(), + t: { + '$ne': 't' + } + }, { + sort: { + ts: 1 + } + }); + }, +}); + +Template.messages.events({ + 'keyup .input-message': function(event) { + // Inital height is 28. If the scrollHeight is greater than that( we have more text than area ), + // increase the size of the textarea. The max-height is set at 200 + // even if the scrollHeight become bigger than that it should never exceed that. + // Account for no text in the textarea when increasing the height. + // If there is no text, reset the height. + var inputScrollHeight; + Template.instance().chatMessages.keyup(visitor.getRoom(), event, Template.instance()); + inputScrollHeight = $(event.currentTarget).prop('scrollHeight'); + if (inputScrollHeight > 28) { + return $(event.currentTarget).height($(event.currentTarget).val() === '' ? '15px' : (inputScrollHeight >= 200 ? inputScrollHeight - 50 : inputScrollHeight - 20)); + } + }, + 'keydown .input-message': function(event) { + return Template.instance().chatMessages.keydown(visitor.getRoom(), event, Template.instance()); + }, + 'click .new-message': function() { + Template.instance().atBottom = true; + return Template.instance().find('.input-message').focus(); + }, + 'click .error': function(event) { + return $(event.currentTarget).removeClass('show'); + }, +}); + +Template.messages.onCreated(function() { + var self; + self = this; + self.autorun(function() { + self.subscribe('livechat:visitorRoom', visitor.getToken(), function() { + var room; + room = ChatRoom.findOne(); + if (room != null) { + visitor.setRoom(room._id); + RoomHistoryManager.getMoreIfIsEmpty(room._id); + } + }); + }); + self.atBottom = true; +}); + +Template.messages.onRendered(function() { + this.chatMessages = new ChatMessages; + this.chatMessages.init(this.firstNode); +}); + +Template.messages.onRendered(function() { + var messages, newMessage, onscroll, template; + messages = this.find('.messages'); + newMessage = this.find(".new-message"); + template = this; + if (messages) { + onscroll = _.throttle(function() { + template.atBottom = messages.scrollTop >= messages.scrollHeight - messages.clientHeight; + }, 200); + Meteor.setInterval(function() { + if (template.atBottom) { + messages.scrollTop = messages.scrollHeight - messages.clientHeight; + newMessage.className = "new-message not"; + } + }, 100); + messages.addEventListener('touchstart', function() { + template.atBottom = false; + }); + messages.addEventListener('touchend', function() { + onscroll(); + }); + messages.addEventListener('scroll', function() { + template.atBottom = false; + onscroll(); + }); + messages.addEventListener('mousewheel', function() { + template.atBottom = false; + onscroll(); + }); + messages.addEventListener('wheel', function() { + template.atBottom = false; + onscroll(); + }); + } +}); diff --git a/packages/rocketchat-livechat/app/client/views/register.coffee b/packages/rocketchat-livechat/app/client/views/register.coffee new file mode 100644 index 000000000000..f815eab9013f --- /dev/null +++ b/packages/rocketchat-livechat/app/client/views/register.coffee @@ -0,0 +1,50 @@ +Template.register.helpers + error: -> + return Template.instance().error.get() + + title: -> + return '' unless Template.instance().subscriptionsReady() + return Settings.findOne('Livechat_title')?.value or 'Rocket.Chat' + + color: -> + return 'transparent' unless Template.instance().subscriptionsReady() + return Settings.findOne('Livechat_title_color')?.value or '#C1272D' + + welcomeMessage: -> + return "" + +Template.register.events + 'submit #livechat-registration': (e, instance) -> + e.preventDefault() + + $name = instance.$('input[name=name]') + $email = instance.$('input[name=email]') + + unless $name.val().trim() and $email.val().trim() + return instance.showError TAPi18n.__('Please_fill_name_and_email') + else + Meteor.call 'registerGuest', visitor.getToken(), $name.val(), $email.val(), (error, result) -> + if error? + return instance.showError error.reason + + Meteor.loginWithPassword result.user, result.pass, (error) -> + if error + return instance.showError error.reason + + 'click .error': (e, instance) -> + instance.hideError() + +Template.register.onCreated -> + @subscribe 'settings', ['Livechat_title', 'Livechat_title_color'] + @error = new ReactiveVar + + @showError = (msg) => + $('.error').addClass('show') + @error.set msg + return + + @hideError = => + $('.error').removeClass('show') + @error.set() + return + diff --git a/packages/rocketchat-livechat/app/client/views/register.html b/packages/rocketchat-livechat/app/client/views/register.html new file mode 100644 index 000000000000..39ef026bf5e3 --- /dev/null +++ b/packages/rocketchat-livechat/app/client/views/register.html @@ -0,0 +1,15 @@ + diff --git a/packages/rocketchat-livechat/app/client/views/room.coffee b/packages/rocketchat-livechat/app/client/views/room.coffee deleted file mode 100644 index f29371d9d735..000000000000 --- a/packages/rocketchat-livechat/app/client/views/room.coffee +++ /dev/null @@ -1,96 +0,0 @@ -Template.room.helpers - messages: -> - return ChatMessage.find { rid: visitor.getRoom(), t: { '$ne': 't' } }, { sort: { ts: 1 } } - - title: -> - return '' unless Template.instance().subscriptionsReady() - return Settings.findOne('Livechat_title')?.value or 'Rocket.Chat' - - color: -> - return 'transparent' unless Template.instance().subscriptionsReady() - return Settings.findOne('Livechat_title_color')?.value or '#C1272D' - -Template.room.events - 'keyup .input-message': (event) -> - Template.instance().chatMessages.keyup(visitor.getRoom(), event, Template.instance()) - # Inital height is 28. If the scrollHeight is greater than that( we have more text than area ), - # increase the size of the textarea. The max-height is set at 200 - # even if the scrollHeight become bigger than that it should never exceed that. - # Account for no text in the textarea when increasing the height. - # If there is no text, reset the height. - inputScrollHeight = $(event.currentTarget).prop('scrollHeight') - if inputScrollHeight > 28 - $(event.currentTarget).height( if $(event.currentTarget).val() == '' then '15px' else (if inputScrollHeight >= 200 then inputScrollHeight-50 else inputScrollHeight-20)) - - 'keydown .input-message': (event) -> - Template.instance().chatMessages.keydown(visitor.getRoom(), event, Template.instance()) - - 'click .new-message': (e) -> - Template.instance().atBottom = true - Template.instance().find('.input-message').focus() - - 'click .title': -> - parentCall 'toggleWindow' - - 'click .error': (e) -> - $(e.currentTarget).removeClass('show') - -Template.room.onCreated -> - self = @ - self.autorun -> - self.subscribe 'livechat:visitorRoom', visitor.getToken(), -> - room = ChatRoom.findOne() - if room? - visitor.setRoom room._id - RoomHistoryManager.getMoreIfIsEmpty room._id - - self.subscribe 'settings', ['Livechat_title', 'Livechat_title_color'] - - self.atBottom = true - -Template.room.onRendered -> - this.chatMessages = new ChatMessages - this.chatMessages.init(this.firstNode) - -Template.room.onRendered -> - wrapper = this.find('.wrapper') - newMessage = this.find(".new-message") - - template = this - - onscroll = _.throttle -> - template.atBottom = wrapper.scrollTop >= wrapper.scrollHeight - wrapper.clientHeight - , 200 - - Meteor.setInterval -> - if template.atBottom - wrapper.scrollTop = wrapper.scrollHeight - wrapper.clientHeight - newMessage.className = "new-message not" - , 100 - - wrapper.addEventListener 'touchstart', -> - template.atBottom = false - - wrapper.addEventListener 'touchend', -> - onscroll() - # readMessage.enable() - # readMessage.read() - - wrapper.addEventListener 'scroll', -> - template.atBottom = false - onscroll() - - wrapper.addEventListener 'mousewheel', -> - template.atBottom = false - onscroll() - # readMessage.enable() - # readMessage.read() - - wrapper.addEventListener 'wheel', -> - template.atBottom = false - onscroll() - # readMessage.enable() - # readMessage.read() - - # salva a data da renderização para exibir alertas de novas mensagens - # $.data(this.firstNode, 'renderedAt', new Date) diff --git a/packages/rocketchat-livechat/app/client/views/room.html b/packages/rocketchat-livechat/app/client/views/room.html index 4edc9dce073f..0220ed9abfa6 100644 --- a/packages/rocketchat-livechat/app/client/views/room.html +++ b/packages/rocketchat-livechat/app/client/views/room.html @@ -1,28 +1,24 @@ diff --git a/packages/rocketchat-livechat/app/client/views/room.js b/packages/rocketchat-livechat/app/client/views/room.js new file mode 100644 index 000000000000..a844293decb8 --- /dev/null +++ b/packages/rocketchat-livechat/app/client/views/room.js @@ -0,0 +1,58 @@ +Template.room.helpers({ + title: function() { + var ref; + if (!Template.instance().subscriptionsReady()) { + return ''; + } + return ((ref = Settings.findOne('Livechat_title')) != null ? ref.value : void 0) || 'Rocket.Chat'; + }, + color: function() { + var ref; + if (!Template.instance().subscriptionsReady()) { + return 'transparent'; + } + return ((ref = Settings.findOne('Livechat_title_color')) != null ? ref.value : void 0) || '#C1272D'; + }, + popoutActive: function() { + return FlowRouter.getQueryParam('mode') === 'popout'; + }, + livechatStartedEnabled: function() { + return Template.instance().startedEnabled.get() !== null; + }, + livechatEnabled: function() { + return Template.instance().startedEnabled.get(); + } +}); + +Template.room.events({ + 'click .title': function() { + parentCall('toggleWindow'); + }, + 'click .popout': function(event) { + event.stopPropagation(); + parentCall('openPopout'); + } +}); + +Template.room.onCreated(function() { + self = this; + + self.startedEnabled = new ReactiveVar(null); + + self.subscribe('settings', ['Livechat_title', 'Livechat_title_color', 'Livechat_enabled']); + + var initialCheck = true; + + self.autorun(function() { + if (self.subscriptionsReady()) { + var enabled = Settings.findOne('Livechat_enabled'); + if (enabled !== undefined) { + if (!enabled.value && initialCheck) { + parentCall('removeWidget'); + } + initialCheck = false; + self.startedEnabled.set(enabled.value); + } + } + }); +}); diff --git a/packages/rocketchat-livechat/app/client/views/survey.html b/packages/rocketchat-livechat/app/client/views/survey.html new file mode 100644 index 000000000000..07babef73d29 --- /dev/null +++ b/packages/rocketchat-livechat/app/client/views/survey.html @@ -0,0 +1,66 @@ + diff --git a/packages/rocketchat-livechat/app/client/views/survey.js b/packages/rocketchat-livechat/app/client/views/survey.js new file mode 100644 index 000000000000..95b4919a887b --- /dev/null +++ b/packages/rocketchat-livechat/app/client/views/survey.js @@ -0,0 +1,17 @@ +Template.survey.events({ + 'click button.skip': function(e, instance) { + instance.$('#survey').remove(); + }, + + 'click button.send': function(e, instance) { + formData = instance.$('form').serializeArray(); + Meteor.call('livechat:saveSurveyFeedback', visitor.getToken(), visitor.getRoom(), formData, function(err, results) { + instance.$('#survey').remove(); + swal({ + title: t('Thank_you_for_your_feedback'), + type: 'success', + timer: 2000 + }); + }); + } +}) diff --git a/packages/rocketchat-livechat/app/i18n/ar.i18n.json b/packages/rocketchat-livechat/app/i18n/ar.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ar.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/cs.i18n.json b/packages/rocketchat-livechat/app/i18n/cs.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/cs.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/de.i18n.json b/packages/rocketchat-livechat/app/i18n/de.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/de.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/el.i18n.json b/packages/rocketchat-livechat/app/i18n/el.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/el.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/en.i18n.json b/packages/rocketchat-livechat/app/i18n/en.i18n.json new file mode 100644 index 000000000000..b8a9e1d8a1b4 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/en.i18n.json @@ -0,0 +1,20 @@ +{ + "Additional_Feedback" : "Additional Feedback", + "Skip" : "Skip", + "E-mail" : "E-mail", + "How_friendly_was_the_chat_agent" : "How friendly was the chat agent?", + "How_knowledgeable_was_the_chat_agent" : "How knowledgeable was the chat agent?", + "How_responsive_was_the_chat_agent" : "How responsive was the chat agent?", + "How_satisfied_were_you_with_this_chat" : "How satisfied were you with this chat?", + "Message" : "Message", + "Name" : "Name", + "Please_answer_survey" : "Please take a moment to answer a quick survey about this chat", + "Please_fill_name_and_email" : "Please fill name and e-mail", + "Send" : "Send", + "Start_Chat" : "Start Chat", + "Survey" : "Survey", + "Survey_instructions" : "Rate each question according to your satisfaction, 1 meaning you are completely unsatisfied and 5 meaning you are completely satisfied.", + "Thank_you_for_your_feedback" : "Thank you for your feedback", + "User_left" : "Has left the channel.", + "We_are_offline_Sorry_for_the_inconvenience" : "We are offline. Sorry for the inconvenience." +} diff --git a/packages/rocketchat-livechat/app/i18n/es.i18n.json b/packages/rocketchat-livechat/app/i18n/es.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/es.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/fa.i18n.json b/packages/rocketchat-livechat/app/i18n/fa.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/fa.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/fi.i18n.json b/packages/rocketchat-livechat/app/i18n/fi.i18n.json new file mode 100644 index 000000000000..f279ec41b30d --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/fi.i18n.json @@ -0,0 +1,14 @@ +{ + "Additional_Feedback" : "Lisäpalaute", + "Skip" : "Ohita", + "How_friendly_was_the_chat_agent" : "Kuinka ystävällinen oli chat agentti?", + "How_knowledgeable_was_the_chat_agent" : "Miten osaava oli chat agentti?", + "How_responsive_was_the_chat_agent" : "Miten reagoiva oli chat agentti?", + "How_satisfied_were_you_with_this_chat" : "Kuinka tyytyväinen olet tähän chattiin?", + "Please_answer_survey" : "Käytä hetki vastataksesi pikakyselyyn tästä chatista", + "Please_fill_name_and_email" : "Täytä nimi ja sähköpostiosoite", + "Start_Chat" : "Aloita chat", + "Survey" : "Tutkimus", + "Survey_instructions" : "Arvioi jokainen kysymys sen mukaan miten tyytyväinen olet, 1 tarkoittaa että olet täysin tyytymätön ja 5 tarkoittaa että olet täysin tyytyväinen.", + "Thank_you_for_your_feedback" : "Kiitos palautteestasi" +} \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/fr.i18n.json b/packages/rocketchat-livechat/app/i18n/fr.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/fr.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/he.i18n.json b/packages/rocketchat-livechat/app/i18n/he.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/he.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/hr.i18n.json b/packages/rocketchat-livechat/app/i18n/hr.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/hr.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/hu.i18n.json b/packages/rocketchat-livechat/app/i18n/hu.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/hu.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/it.i18n.json b/packages/rocketchat-livechat/app/i18n/it.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/it.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/ja.i18n.json b/packages/rocketchat-livechat/app/i18n/ja.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ja.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/km.i18n.json b/packages/rocketchat-livechat/app/i18n/km.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/km.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/ko.i18n.json b/packages/rocketchat-livechat/app/i18n/ko.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ko.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/ku.i18n.json b/packages/rocketchat-livechat/app/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/lo.i18n.json b/packages/rocketchat-livechat/app/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/ms-MY.i18n.json b/packages/rocketchat-livechat/app/i18n/ms-MY.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ms-MY.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/nl.i18n.json b/packages/rocketchat-livechat/app/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/pl.i18n.json b/packages/rocketchat-livechat/app/i18n/pl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/pl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/pt.i18n.json b/packages/rocketchat-livechat/app/i18n/pt.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/pt.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/ru.i18n.json b/packages/rocketchat-livechat/app/i18n/ru.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ru.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/sq.i18n.json b/packages/rocketchat-livechat/app/i18n/sq.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/sq.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/sv.i18n.json b/packages/rocketchat-livechat/app/i18n/sv.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/sv.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/ta-IN.i18n.json b/packages/rocketchat-livechat/app/i18n/ta-IN.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ta-IN.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/tr.i18n.json b/packages/rocketchat-livechat/app/i18n/tr.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/tr.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/ug.i18n.json b/packages/rocketchat-livechat/app/i18n/ug.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/ug.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/uk.i18n.json b/packages/rocketchat-livechat/app/i18n/uk.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/uk.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/app/i18n/zh.i18n.json b/packages/rocketchat-livechat/app/i18n/zh.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/app/i18n/zh.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/assets/demo.html b/packages/rocketchat-livechat/assets/demo.html new file mode 100644 index 000000000000..8b3929901c4b --- /dev/null +++ b/packages/rocketchat-livechat/assets/demo.html @@ -0,0 +1,24 @@ + + + + + + + + + +

test

+

Talk to us.

+ + + diff --git a/packages/rocketchat-livechat/rocket-livechat.js b/packages/rocketchat-livechat/assets/rocket-livechat.js similarity index 76% rename from packages/rocketchat-livechat/rocket-livechat.js rename to packages/rocketchat-livechat/assets/rocket-livechat.js index 363881f57b95..c16c5a7bd927 100644 --- a/packages/rocketchat-livechat/rocket-livechat.js +++ b/packages/rocketchat-livechat/assets/rocket-livechat.js @@ -4,24 +4,41 @@ // var h = d.getElementsByTagName(s)[0], // j = d.createElement(s); // j.async = true; -// j.src = 'rocket-livechat.js'; +// j.src = '/packages/rocketchat_livechat/assets/rocket-livechat.js'; // h.parentNode.insertBefore(j, h); // })(window, document, 'script', 'initRocket', 'http://localhost:5000/livechat'); // ;(function(w) { var exports = {}; + var config = {}; + var widget; + + var closeWidget = () => { + widget.dataset.state = 'closed'; + widget.style.height = '30px'; + }; + + var openWidget = () => { + widget.dataset.state = 'opened'; + widget.style.height = '300px'; + }; var api = { - toggleWindow: function() { - var widget = document.querySelector('.rocketchat-widget'); + toggleWindow: function(forceClose) { if (widget.dataset.state === 'closed') { - widget.dataset.state = 'opened'; - widget.style.height = '300px'; + openWidget(); } else { - widget.dataset.state = 'closed'; - widget.style.height = '30px'; + closeWidget(); } + }, + openPopout: function() { + closeWidget(); + var popup = window.open(config.url + '?mode=popout', 'livechat-popout', 'width=400, height=450, toolbars=no'); + popup.focus(); + }, + removeWidget: function() { + document.getElementsByTagName('body')[0].removeChild(widget); } }; @@ -30,6 +47,8 @@ return; } + config.url = url; + var chatWidget = document.createElement('div'); chatWidget.dataset.state = 'closed'; chatWidget.className = 'rocketchat-widget'; @@ -48,6 +67,8 @@ document.getElementsByTagName('body')[0].appendChild(chatWidget); + widget = document.querySelector('.rocketchat-widget'); + w.addEventListener('message', function(msg) { if (typeof msg.data === 'object' && msg.data.src !== undefined && msg.data.src === 'rocketchat') { if (api[msg.data.fn] !== undefined && typeof api[msg.data.fn] === 'function') { diff --git a/packages/rocketchat-livechat/client/lib/LivechatDepartment.js b/packages/rocketchat-livechat/client/lib/LivechatDepartment.js new file mode 100644 index 000000000000..3a8d17776056 --- /dev/null +++ b/packages/rocketchat-livechat/client/lib/LivechatDepartment.js @@ -0,0 +1 @@ +this.LivechatDepartment = new Mongo.Collection('rocketchat_livechat_department'); diff --git a/packages/rocketchat-livechat/client/route.js b/packages/rocketchat-livechat/client/route.js index fb95d8c23c97..a2029900297f 100644 --- a/packages/rocketchat-livechat/client/route.js +++ b/packages/rocketchat-livechat/client/route.js @@ -9,3 +9,24 @@ FlowRouter.route('/live/:name', { triggersExit: [roomExit] }); + +FlowRouter.route('/livechat-manager/departments', { + name: 'livechat-departments', + + action: function(params, queryParams) { + BlazeLayout.render('main', { center: 'pageContainer', pageTemplate: 'livechatDepartments', pageTitle: t('Departments') }); + } +}); + +FlowRouter.route('/livechat-manager/department/:_id?', { + name: 'livechat-department', + + action: function(params, queryParams) { + if (params._id) { + pageTitle = t('Edit_Department'); + } else { + pageTitle = t('New_Department'); + } + BlazeLayout.render('main', { center: 'pageContainer', pageTemplate: 'livechatDepartmentForm', pageTitle: pageTitle}); + } +}); diff --git a/packages/rocketchat-livechat/client/ui.js b/packages/rocketchat-livechat/client/ui.js index 920d8ca5c552..ea863114c22f 100644 --- a/packages/rocketchat-livechat/client/ui.js +++ b/packages/rocketchat-livechat/client/ui.js @@ -20,18 +20,15 @@ RocketChat.roomTypes.add('l', 5, { AccountBox.addItem({ name: 'Livechat', icon: 'icon-chat-empty', - class: 'livechat-manager', - route: { - name: 'livechat-manager', - path: '/livechat-manager', - action(params, queryParams) { - Session.set('openedRoom'); - BlazeLayout.render('main', { - center: 'pageContainer', - pageTitle: t('Livechat_Manager'), - pageTemplate: 'livechatManager' - }); - } - }, - permissions: ['view-livechat-manager'] + href: 'livechat-manager', + sideNav: 'livechatFlex', + permissions: ['view-livechat-manager'], +}); + +AccountBox.addRoute({ + name: 'livechat-manager', + path: '/livechat-manager', + sideNav: 'livechatFlex', + pageTitle: t('Livechat_Manager'), + pageTemplate: 'livechatManager' }); diff --git a/packages/rocketchat-livechat/client/views/app/livechatDepartmentForm.html b/packages/rocketchat-livechat/client/views/app/livechatDepartmentForm.html new file mode 100644 index 000000000000..5a82ac77c719 --- /dev/null +++ b/packages/rocketchat-livechat/client/views/app/livechatDepartmentForm.html @@ -0,0 +1,65 @@ + diff --git a/packages/rocketchat-livechat/client/views/app/livechatDepartmentForm.js b/packages/rocketchat-livechat/client/views/app/livechatDepartmentForm.js new file mode 100644 index 000000000000..d4ff6d0fcac6 --- /dev/null +++ b/packages/rocketchat-livechat/client/views/app/livechatDepartmentForm.js @@ -0,0 +1,113 @@ +Template.livechatDepartmentForm.helpers({ + department() { + // return Template.instance().department && !_.isEmpty(Template.instance().department.get()) ? Template.instance().department.get() : { enabled: true }; + return Template.instance().department.get(); + }, + agents() { + return Template.instance().department && !_.isEmpty(Template.instance().department.get()) ? Template.instance().department.get().agents : [] + } +}); + +Template.livechatDepartmentForm.events({ + 'submit #department-form' (e, instance) { + e.preventDefault(); + var $btn = instance.$('button.save'); + + var _id = $(e.currentTarget).data('id'); + var enabled = instance.$('input[name=enabled]:checked').val() + var name = instance.$('input[name=name]').val() + var description = instance.$('textarea[name=description]').val() + + if (enabled !== "1" && enabled !== "0") { + return toastr.error(t('Please_select_enabled_yes_or_no')); + } + + if (name.trim() === '') { + return toastr.error(t('Please_fill_a_name')); + } + + var oldBtnValue = $btn.html(); + $btn.html(t('Saving')); + + agents = instance.department && !_.isEmpty(instance.department.get()) ? instance.department.get().agents : []; + + departmentData = { + enabled: enabled === "1" ? true : false, + name: name.trim(), + description: description.trim(), + agents: agents + } + + Meteor.call('livechat:saveDepartment', _id, departmentData, function(error, result) { + $btn.html(oldBtnValue); + if (error) { + return toastr.error(t(error.reason || error.error)); + } + + toastr.success(t('Saved')); + FlowRouter.go('livechat-departments'); + }); + }, + + 'click button.back' (e, instance) { + e.preventDefault(); + FlowRouter.go('livechat-departments'); + }, + + 'click button.add-agent' (e, instance) { + e.preventDefault(); + var $btn = $(e.currentTarget); + + var $agent = instance.$('input[name=agent]') + + if ($agent.val().trim() === '') { + return toastr.error(t('Please_fill_a_username')); + } + + var oldBtnValue = $btn.html(); + $btn.html(t('Saving')); + + Meteor.call('livechat:searchAgent', $agent.val(), function(error, user) { + $btn.html(oldBtnValue); + if (error) { + return toastr.error(t(error.reason || error.error)); + } + department = instance.department.get() || {}; + if (department.agents === undefined || !_.isArray(department.agents)) { + department.agents = []; + } + if (!_.findWhere(department.agents, { _id: user._id })) { + department.agents.push(user); + } + instance.department.set(department); + $agent.val(''); + }); + }, + + 'click a.remove-agent' (e, instance) { + e.preventDefault(); + department = instance.department.get(); + department.agents = _.reject(department.agents, (agent) => { return agent._id === this._id }); + instance.department.set(department); + }, + + 'keydown input[name=agent]' (e, instance) { + if (e.keyCode === 13) { + e.preventDefault(); + $("button.add-agent").click(); + } + } +}); + +Template.livechatDepartmentForm.onCreated(function() { + this.department = new ReactiveVar({ enabled: true }); + this.autorun(() => { + var sub = this.subscribe('livechat:departments', FlowRouter.getParam('_id')); + if (sub.ready()) { + department = LivechatDepartment.findOne({ _id: FlowRouter.getParam('_id') }); + if (department) { + this.department.set(department); + } + } + }); +}); diff --git a/packages/rocketchat-livechat/client/views/app/livechatDepartments.html b/packages/rocketchat-livechat/client/views/app/livechatDepartments.html new file mode 100644 index 000000000000..a334421e88e3 --- /dev/null +++ b/packages/rocketchat-livechat/client/views/app/livechatDepartments.html @@ -0,0 +1,31 @@ + diff --git a/packages/rocketchat-livechat/client/views/app/livechatDepartments.js b/packages/rocketchat-livechat/client/views/app/livechatDepartments.js new file mode 100644 index 000000000000..274f1d1876e5 --- /dev/null +++ b/packages/rocketchat-livechat/client/views/app/livechatDepartments.js @@ -0,0 +1,55 @@ +Template.livechatDepartments.helpers({ + "departments": () => { + return LivechatDepartment.find(); + }, + "numAgents"() { + if (Array.isArray(this.agents)) { + return this.agents.length; + } + } +}); + +Template.livechatDepartments.events({ + "click button[name=newDepartment]": (event, instance) => { + event.preventDefault(); + FlowRouter.go('livechat-department'); + }, + + 'click .remove-department' (e, instance) { + e.preventDefault(); + e.stopPropagation(); + + swal({ + title: t('Are_you_sure'), + type: 'warning', + showCancelButton: true, + confirmButtonColor: '#DD6B55', + confirmButtonText: t('Yes'), + cancelButtonText: t('Cancel'), + closeOnConfirm: false, + html: false + }, () => { + Meteor.call('livechat:removeDepartment', this._id, function(error, result) { + if (error) { + return toastr.error(t(error.reason || error.error)); + } + swal({ + title: t('Removed'), + text: t('Department_removed'), + type: 'success', + timer: 1000, + showConfirmButton: false, + }); + }); + }); + }, + + 'click .department-info' (e, instance) { + e.preventDefault(); + FlowRouter.go('livechat-department', { _id: this._id }); + } +}); + +Template.livechatDepartments.onCreated(function() { + this.subscribe('livechat:departments'); +}); diff --git a/packages/rocketchat-livechat/client/views/sideNav/livechatFlex.html b/packages/rocketchat-livechat/client/views/sideNav/livechatFlex.html new file mode 100644 index 000000000000..ae76e6746d9f --- /dev/null +++ b/packages/rocketchat-livechat/client/views/sideNav/livechatFlex.html @@ -0,0 +1,21 @@ + diff --git a/packages/rocketchat-livechat/client/views/sideNav/livechatFlex.js b/packages/rocketchat-livechat/client/views/sideNav/livechatFlex.js new file mode 100644 index 000000000000..2fa2ed15adfa --- /dev/null +++ b/packages/rocketchat-livechat/client/views/sideNav/livechatFlex.js @@ -0,0 +1,13 @@ +Template.livechatFlex.events({ + 'mouseenter header' () { + SideNav.overArrow() + }, + + 'mouseleave header' () { + SideNav.leaveArrow() + }, + + 'click header' () { + SideNav.closeFlex() + } +}) diff --git a/packages/rocketchat-livechat/config.js b/packages/rocketchat-livechat/config.js index 1295c45ed9c7..9ae62a8ecb13 100644 --- a/packages/rocketchat-livechat/config.js +++ b/packages/rocketchat-livechat/config.js @@ -2,4 +2,5 @@ Meteor.startup(function() { RocketChat.settings.addGroup('Livechat'); RocketChat.settings.add('Livechat_title' , 'Rocket.Chat', { type: 'string', group: 'Livechat', public: true }); RocketChat.settings.add('Livechat_title_color' , '#C1272D', { type: 'string', group: 'Livechat', public: true }); + RocketChat.settings.add('Livechat_enabled' , true, { type: 'boolean', group: 'Livechat', public: true }); }); diff --git a/packages/rocketchat-livechat/i18n/en.i18n.json b/packages/rocketchat-livechat/i18n/en.i18n.json index c03fbe02fa00..a6db675dc4f1 100644 --- a/packages/rocketchat-livechat/i18n/en.i18n.json +++ b/packages/rocketchat-livechat/i18n/en.i18n.json @@ -4,14 +4,33 @@ "Add_manager" : "Add manager", "Agent_added" : "Agent added", "Agent_removed" : "Agent removed", + "Back" : "Back", + "Dashboard" : "Dashboard", + "Department_not_found" : "Department not found", + "Department_removed" : "Department removed", + "Departments" : "Departments", + "Description" : "Description", + "Edit_Department" : "Edit Department", + "Enable" : "Enable", + "Enabled" : "Enabled", "Enter_a_username" : "Enter a username", + "Live_sessions" : "Live sessions", "Livechat_agents" : "Livechat agents", + "Livechat_enabled" : "Livechat enabled", "Livechat_Manager" : "Livechat Manager", "Livechat_managers" : "Livechat managers", "Livechat_title" : "Livechat Title", "Livechat_title_color" : "Livechat Title Background Color", "Manager_added" : "Manager added", "Manager_removed" : "Manager removed", + "New_Department" : "New Department", + "Num_Agents" : "# Agents", + "Please_fill_a_name" : "Please fill a name", "Please_fill_a_username" : "Please fill a username", + "Please_select_enabled_yes_or_no" : "Please select an option for Enabled", + "Saved" : "Saved", + "Theme" : "Theme", + "There_are_no_agents_added_to_this_department_yet" : "There are no agents added to this department yet.", + "User_management" : "User Management", "Username_not_found" : "Username not found" } \ No newline at end of file diff --git a/packages/rocketchat-livechat/i18n/fi.i18n.json b/packages/rocketchat-livechat/i18n/fi.i18n.json index 7a2d15b05eb8..c3913e2b43c3 100644 --- a/packages/rocketchat-livechat/i18n/fi.i18n.json +++ b/packages/rocketchat-livechat/i18n/fi.i18n.json @@ -1,4 +1,35 @@ { + "Add" : "Lisää", + "Add_agent" : "Lisää agentti", + "Add_manager" : "Lisää manageri", + "Agent_added" : "Agentti lisätty", + "Agent_removed" : "Agentti poistettu", + "Back" : "Takaisin", + "Dashboard" : "Kojelauta", + "Department_not_found" : "Osasto ei löytynyt", + "Department_removed" : "Osasto poistettu", + "Departments" : "Osastot", + "Description" : "Kuvaus", + "Edit_Department" : "Muokkaa osastoa", + "Enable" : "Ota käyttöön", + "Enabled" : "Käytössä", + "Enter_a_username" : "Syötä käyttäjätunnus", + "Live_sessions" : "Live-istunnot", + "Livechat_agents" : "Livechat agentit", + "Livechat_Manager" : "Livechat manageri", + "Livechat_managers" : "Livechat managerit", "Livechat_title" : "Livechat otsikko", - "Livechat_title_color" : "Livechat otsikon taustaväri" + "Livechat_title_color" : "Livechat otsikon taustaväri", + "Manager_added" : "Manageri lisätty", + "Manager_removed" : "Manageri poistettu", + "New_Department" : "Uusi osasto", + "Num_Agents" : "# Agenttia", + "Please_fill_a_name" : "Täytä nimi", + "Please_fill_a_username" : "Täytä käyttäjätunnus", + "Please_select_enabled_yes_or_no" : "Valitse vaihtoehto Käytössä", + "Saved" : "Tallennettu", + "Theme" : "Teema", + "There_are_no_agents_added_to_this_department_yet" : "Yhtään agenttia ei ole vielä lisätty tähän osastoon.", + "User_management" : "Käyttäjien hallinta", + "Username_not_found" : "Käyttäjätunnusta ei löydy" } \ No newline at end of file diff --git a/packages/rocketchat-livechat/i18n/ku.i18n.json b/packages/rocketchat-livechat/i18n/ku.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/i18n/ku.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/i18n/lo.i18n.json b/packages/rocketchat-livechat/i18n/lo.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/i18n/lo.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/i18n/nl.i18n.json b/packages/rocketchat-livechat/i18n/nl.i18n.json new file mode 100644 index 000000000000..6f31cf5a2e62 --- /dev/null +++ b/packages/rocketchat-livechat/i18n/nl.i18n.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/packages/rocketchat-livechat/i18n/pt.i18n.json b/packages/rocketchat-livechat/i18n/pt.i18n.json index 18ea87b4f363..629deb060be1 100644 --- a/packages/rocketchat-livechat/i18n/pt.i18n.json +++ b/packages/rocketchat-livechat/i18n/pt.i18n.json @@ -4,6 +4,7 @@ "Add_manager" : "Adicionar gerente", "Agent_added" : "Agente adicionado", "Agent_removed" : "Agente removido", + "Description" : "Descrição", "Enter_a_username" : "Nome de usuário", "Livechat_agents" : "Agentes do Livechat", "Livechat_Manager" : "Administração Livechat", @@ -13,5 +14,6 @@ "Manager_added" : "Gerente adicionado", "Manager_removed" : "Gerente removido", "Please_fill_a_username" : "Por favor preencha um nome de usuário", + "Saved" : "Salvo", "Username_not_found" : "Nome de usuário não encontrado" } \ No newline at end of file diff --git a/packages/rocketchat-livechat/package.js b/packages/rocketchat-livechat/package.js index 0cc296524de2..dc6d77ad8f18 100644 --- a/packages/rocketchat-livechat/package.js +++ b/packages/rocketchat-livechat/package.js @@ -24,6 +24,7 @@ Package.onUse(function(api) { api.use('rocketchat:lib'); api.use('kadira:flow-router', 'client'); api.use('templating', 'client'); + api.use('mongo'); api.addFiles('livechat.js', 'server'); api.addFiles('server/methods.js', 'server'); @@ -38,25 +39,41 @@ Package.onUse(function(api) { // client views api.addFiles('client/views/app/livechatManager.html', 'client'); api.addFiles('client/views/app/livechatManager.js', 'client'); + api.addFiles('client/views/app/livechatDepartments.html', 'client'); + api.addFiles('client/views/app/livechatDepartments.js', 'client'); + api.addFiles('client/views/app/livechatDepartmentForm.html', 'client'); + api.addFiles('client/views/app/livechatDepartmentForm.js', 'client'); api.addFiles('client/views/sideNav/livechat.html', 'client'); api.addFiles('client/views/sideNav/livechat.js', 'client'); + api.addFiles('client/views/sideNav/livechatFlex.html', 'client'); + api.addFiles('client/views/sideNav/livechatFlex.js', 'client'); // methods api.addFiles('server/methods/addAgent.js', 'server'); api.addFiles('server/methods/addManager.js', 'server'); + api.addFiles('server/methods/saveDepartment.js', 'server'); + api.addFiles('server/methods/saveSurveyFeedback.js', 'server'); + api.addFiles('server/methods/searchAgent.js', 'server'); api.addFiles('server/methods/removeAgent.js', 'server'); api.addFiles('server/methods/removeManager.js', 'server'); - + api.addFiles('server/methods/removeDepartment.js', 'server'); // models api.addFiles('server/models/Users.js', 'server'); + api.addFiles('server/models/Rooms.js', 'server'); + api.addFiles('server/models/LivechatDepartment.js', 'server'); + + // collections + api.addFiles('client/lib/LivechatDepartment.js', 'client'); // publications api.addFiles('server/publications/livechatAgents.js', 'server'); api.addFiles('server/publications/livechatManagers.js', 'server'); + api.addFiles('server/publications/livechatDepartments.js', 'server'); api.addFiles('server/publications/visitorRoom.js', 'server'); // livechat app - api.addAssets('rocket-livechat.js', 'client'); + api.addAssets('assets/demo.html', 'client'); + api.addAssets('assets/rocket-livechat.js', 'client'); api.addAssets('public/livechat.css', 'client'); api.addAssets('public/livechat.js', 'client'); api.addAssets('public/head.html', 'server'); diff --git a/packages/rocketchat-livechat/server/methods.js b/packages/rocketchat-livechat/server/methods.js index f97d83ecce67..8b7b0dd70e72 100644 --- a/packages/rocketchat-livechat/server/methods.js +++ b/packages/rocketchat-livechat/server/methods.js @@ -1,5 +1,5 @@ Meteor.methods({ - registerGuest: function(token) { + registerGuest: function(token, name, email) { console.log('registerGuest ->'.green, token); var pass, qt, user, userData, userExists, userId, inc = 0; check(token, String); @@ -36,12 +36,19 @@ Meteor.methods({ password: pass }; userId = Accounts.createUser(userData); + + updateUser = { + name: name || user, + "profile.guest": true, + "profile.token": token + } + + if (email && email.trim() !== "") { + updateUser.emails = [{ "address": email }]; + } + Meteor.users.update(userId, { - $set: { - name: user, - "profile.guest": true, - "profile.token": token - } + $set: updateUser }); return { user: user, diff --git a/packages/rocketchat-livechat/server/methods/removeDepartment.js b/packages/rocketchat-livechat/server/methods/removeDepartment.js new file mode 100644 index 000000000000..8fb2b620dff4 --- /dev/null +++ b/packages/rocketchat-livechat/server/methods/removeDepartment.js @@ -0,0 +1,19 @@ +Meteor.methods({ + 'livechat:removeDepartment' (_id) { + if (!Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userId(), 'view-livechat-manager')) { + throw new Meteor.Error("not-authorized"); + } + + check(_id, String); + + console.log('[methods] livechat:removeDepartment -> '.green, 'arguments:', arguments); + + var department = RocketChat.models.LivechatDepartment.findOneById(_id, { fields: { _id: 1 } }); + + if (!department) { + throw new Meteor.Error('department-not-found', 'Department_not_found'); + } + + return RocketChat.models.LivechatDepartment.removeById(_id); + } +}); diff --git a/packages/rocketchat-livechat/server/methods/removeManager.js b/packages/rocketchat-livechat/server/methods/removeManager.js index 43bebc3e8cb3..38e462d3f0e0 100644 --- a/packages/rocketchat-livechat/server/methods/removeManager.js +++ b/packages/rocketchat-livechat/server/methods/removeManager.js @@ -4,9 +4,7 @@ Meteor.methods({ throw new Meteor.Error("not-authorized"); } - if (!username || !_.isString(username)) { - throw new Meteor.Error('invalid-arguments'); - } + check(username, String); console.log('[methods] livechat:removeManager -> '.green, 'arguments:', arguments); diff --git a/packages/rocketchat-livechat/server/methods/saveDepartment.js b/packages/rocketchat-livechat/server/methods/saveDepartment.js new file mode 100644 index 000000000000..526b32134f28 --- /dev/null +++ b/packages/rocketchat-livechat/server/methods/saveDepartment.js @@ -0,0 +1,24 @@ +Meteor.methods({ + 'livechat:saveDepartment' (_id, departmentData) { + console.log('[methods] livechat:saveDepartment -> '.green, 'arguments:', arguments); + + if (!Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userId(), 'view-livechat-manager')) { + throw new Meteor.Error("not-authorized"); + } + + if (_id) { + check(_id, String); + } + + check(departmentData, Match.ObjectIncluding({ enabled: Boolean, name: String, description: Match.Optional(String), agents: Match.Optional([Match.ObjectIncluding({ _id: String, username: String })]) })); + + if (_id) { + department = RocketChat.models.LivechatDepartment.findOneById(_id); + if (!department) { + throw new Meteor.Error('department-not-found', 'Department_not_found'); + } + } + + return RocketChat.models.LivechatDepartment.createOrUpdateDepartment(_id, departmentData.enabled, departmentData.name, departmentData.description, departmentData.agents); + } +}); diff --git a/packages/rocketchat-livechat/server/methods/saveSurveyFeedback.js b/packages/rocketchat-livechat/server/methods/saveSurveyFeedback.js new file mode 100644 index 000000000000..44d8fd05767b --- /dev/null +++ b/packages/rocketchat-livechat/server/methods/saveSurveyFeedback.js @@ -0,0 +1,26 @@ +Meteor.methods({ + 'livechat:saveSurveyFeedback' (visitorToken, visitorRoom, formData) { + check(visitorToken, String); + check(visitorRoom, String); + check(formData, [Match.ObjectIncluding({ name: String, value: String })]); + + console.log('[methods] livechat:saveSurveyFeedback -> '.green, 'arguments:', arguments); + + visitor = RocketChat.models.Users.getVisitorByToken(visitorToken); + room = RocketChat.models.Rooms.findOneById(visitorRoom); + + if (visitor !== undefined && room !== undefined && room.v !== undefined && visitor.profile !== undefined && room.v.token === visitor.profile.token) { + updateData = {}; + for (var item of formData) { + if (_.contains(['satisfaction', 'agentKnowledge', 'agentResposiveness', 'agentFriendliness'], item.name) && _.contains(["1","2","3","4","5"], item.value)) { + updateData[item.name] = item.value; + } else if (item.name === 'additionalFeedback') { + updateData[item.name] = item.value; + } + } + if (!_.isEmpty(updateData)) { + return RocketChat.models.Rooms.updateSurveyFeedbackById(room._id, updateData); + } + } + } +}); diff --git a/packages/rocketchat-livechat/server/methods/searchAgent.js b/packages/rocketchat-livechat/server/methods/searchAgent.js new file mode 100644 index 000000000000..72b9d3d9bb08 --- /dev/null +++ b/packages/rocketchat-livechat/server/methods/searchAgent.js @@ -0,0 +1,21 @@ +Meteor.methods({ + 'livechat:searchAgent' (username) { + if (!Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userId(), 'view-livechat-manager')) { + throw new Meteor.Error("not-authorized"); + } + + if (!username || !_.isString(username)) { + throw new Meteor.Error('invalid-arguments'); + } + + console.log('[methods] livechat:searchAgent -> '.green, 'arguments:', arguments); + + var user = RocketChat.models.Users.findOneByUsername(username, { fields: { _id: 1, username: 1 } }); + + if (!user) { + throw new Meteor.Error('user-not-found', 'Username_not_found'); + } + + return user; + } +}); diff --git a/packages/rocketchat-livechat/server/models/LivechatDepartment.js b/packages/rocketchat-livechat/server/models/LivechatDepartment.js new file mode 100644 index 000000000000..41141b8d68ef --- /dev/null +++ b/packages/rocketchat-livechat/server/models/LivechatDepartment.js @@ -0,0 +1,49 @@ +/** + * Livechat Department model + */ +class LivechatDepartment extends RocketChat.models._Base { + constructor() { + super(); + this._initModel('livechat_department'); + } + + // FIND + findOneById(_id, options) { + query = { _id: _id }; + + return this.findOne(query, options); + } + + findByDepartmentId(_id, options) { + query = { _id: _id }; + return this.find(query, options); + } + + // UPSERT + createOrUpdateDepartment(_id, enabled, name, description, agents, extraData) { + record = { + enabled: enabled, + name: name, + description: description, + agents: [] + } + + if (!_.isEmpty(agents)) { + for (agent of agents) { + record.agents.push({ _id: agent._id, username: agent.username }); + } + } + + _.extend(record, extraData); + this.upsert({ _id: _id }, { $set: record }); + return _.extend(record, { _id: _id }); + } + + // REMOVE + removeById(_id) { + query = { _id: _id }; + return this.remove(query); + } +} + +RocketChat.models.LivechatDepartment = new LivechatDepartment(); diff --git a/packages/rocketchat-livechat/server/models/Rooms.js b/packages/rocketchat-livechat/server/models/Rooms.js new file mode 100644 index 000000000000..d1a654f24934 --- /dev/null +++ b/packages/rocketchat-livechat/server/models/Rooms.js @@ -0,0 +1,17 @@ +/** + * Gets visitor by token + * @param {string} token - Visitor token + */ +RocketChat.models.Rooms.updateSurveyFeedbackById = function(_id, surveyFeedback) { + query = { + _id: _id + }; + + update = { + $set: { + surveyFeedback: surveyFeedback + } + }; + + return this.update(query, update); +}; diff --git a/packages/rocketchat-livechat/server/models/Users.js b/packages/rocketchat-livechat/server/models/Users.js index adc6863d0112..1481564cf1d6 100644 --- a/packages/rocketchat-livechat/server/models/Users.js +++ b/packages/rocketchat-livechat/server/models/Users.js @@ -12,3 +12,16 @@ RocketChat.models.Users.setOperator = function(_id, operator) { return this.update(_id, update); }; + +/** + * Gets visitor by token + * @param {string} token - Visitor token + */ +RocketChat.models.Users.getVisitorByToken = function(token, options) { + var query = { + "profile.guest": true, + "profile.token": token + }; + + return this.findOne(query, options); +}; diff --git a/packages/rocketchat-livechat/server/publications/livechatDepartments.js b/packages/rocketchat-livechat/server/publications/livechatDepartments.js new file mode 100644 index 000000000000..ab35d5dd88c2 --- /dev/null +++ b/packages/rocketchat-livechat/server/publications/livechatDepartments.js @@ -0,0 +1,18 @@ +Meteor.publish('livechat:departments', function(_id) { + if (!this.userId) { + throw new Meteor.Error('not-authorized'); + } + + if (!RocketChat.authz.hasPermission(this.userId, 'view-livechat-manager')) { + throw new Meteor.Error('not-authorized'); + } + + console.log('[publish] livechat:departments -> '.green, 'arguments:', arguments); + + if (_id !== undefined) { + return RocketChat.models.LivechatDepartment.findByDepartmentId(_id); + } else { + return RocketChat.models.LivechatDepartment.find(); + } + +}); diff --git a/packages/rocketchat-mailer/client/router.coffee b/packages/rocketchat-mailer/client/router.coffee index 361cd663ae93..5205c1f2a693 100644 --- a/packages/rocketchat-mailer/client/router.coffee +++ b/packages/rocketchat-mailer/client/router.coffee @@ -1,15 +1,15 @@ tabReset = -> RocketChat.TabBar.reset() -FlowRouter.route '/rocket-mailer', - name: 'rocket-mailer' +FlowRouter.route '/mailer', + name: 'mailer' triggersEnter: [tabReset] triggersExit: [tabReset] action: -> - BlazeLayout.render 'main', {center: 'rocketMailer'} + BlazeLayout.render 'main', {center: 'mailer'} -FlowRouter.route '/rocket-mailer/unsubscribe/:_id/:createdAt', - name: 'rocket-mailer-unsubscribe' +FlowRouter.route '/mailer/unsubscribe/:_id/:createdAt', + name: 'mailer-unsubscribe' action: (params) -> - Meteor.call 'RocketMailer.unsubscribe', params._id, params.createdAt - BlazeLayout.render 'rocketMailerUnsubscribe' + Meteor.call 'Mailer:unsubscribe', params._id, params.createdAt + BlazeLayout.render 'mailerUnsubscribe' diff --git a/packages/rocketchat-mailer/client/startup.coffee b/packages/rocketchat-mailer/client/startup.coffee index c7abd7b5de98..9b4dd0847261 100644 --- a/packages/rocketchat-mailer/client/startup.coffee +++ b/packages/rocketchat-mailer/client/startup.coffee @@ -1,5 +1,5 @@ RocketChat.AdminBox.addOption - href: 'rocket-mailer' - i18nLabel: 'Rocket_Mailer' + href: 'mailer' + i18nLabel: 'Mailer' permissionGranted: -> - return RocketChat.authz.hasAllPermission('access-rocket-mailer') + return RocketChat.authz.hasAllPermission('access-mailer') diff --git a/packages/rocketchat-mailer/client/views/rocketMailer.coffee b/packages/rocketchat-mailer/client/views/mailer.coffee similarity index 70% rename from packages/rocketchat-mailer/client/views/rocketMailer.coffee rename to packages/rocketchat-mailer/client/views/mailer.coffee index d615dad8f390..e42403176209 100644 --- a/packages/rocketchat-mailer/client/views/rocketMailer.coffee +++ b/packages/rocketchat-mailer/client/views/mailer.coffee @@ -1,13 +1,15 @@ -Template.rocketMailer.helpers +Template.mailer.helpers fromEmail: -> return RocketChat.settings.get 'From_Email' -Template.rocketMailer.events +Template.mailer.events 'click .send': (e, t) -> e.preventDefault() from = $(t.find('[name=from]')).val() subject = $(t.find('[name=subject]')).val() body = $(t.find('[name=body]')).val() + dryrun = $(t.find('[name=dryrun]:checked')).val() + query = $(t.find('[name=query]')).val() unless from toastr.error TAPi18n.__('From_email_is_required') @@ -17,6 +19,6 @@ Template.rocketMailer.events toastr.error TAPi18n.__('You_must_provide_the_unsubscribe_link') return - Meteor.call 'RocketMailer.sendMail', from, subject, body, (err) -> + Meteor.call 'Mailer.sendMail', from, subject, body, dryrun, query, (err) -> return toastr.error err.reason if err toastr.success TAPi18n.__('The_emails_are_being_sent') diff --git a/packages/rocketchat-mailer/client/views/rocketMailer.html b/packages/rocketchat-mailer/client/views/mailer.html similarity index 61% rename from packages/rocketchat-mailer/client/views/rocketMailer.html rename to packages/rocketchat-mailer/client/views/mailer.html index 309b0d661226..43f609e117c3 100644 --- a/packages/rocketchat-mailer/client/views/rocketMailer.html +++ b/packages/rocketchat-mailer/client/views/mailer.html @@ -1,13 +1,13 @@ -