Commit Graph

19204 Commits

Author SHA1 Message Date
Harshit Bansal
4cb8ac100a emoji: Fix the title and alt text for unicode emojis.
Unicode emojis when rendered should display canonical short name.
Similarly, the alt text should be of the format `:<short_name>:`.
For both of these we currently display the actual unicode symbol.
As some systems don't have the fonts necessary for displaying them
properly, they are rendered as empty square blocks. This commit also
ensures that the markup generated for emoji generated by canonical
name and by an unicode emoji is same.

Fixes: #5555.
2017-07-01 11:14:24 -07:00
Harshit Bansal
8c92024fae build_emoji: Add codepoint_to_name dict to emoji_codes.js.
This dict is a mapping from codepoint to canonical name.
2017-07-01 11:14:24 -07:00
Harshit Bansal
fee4065571 build_emoji: Generate codepoint_to_name.json file.
Store the `codepoint_to_name` map in a JSON file which can be used
by the rest of codebase(zerver) to convert emoji codepoints to
canonical names.
2017-07-01 11:14:24 -07:00
Cory Lynch
8abbb6d781 search: Remove in:all token from suggestions. 2017-07-01 12:19:52 -04:00
Rishi Gupta
b55dce197d actions.py: Clear ScheduledJobs of users in do_deactivate_{user,realm}. 2017-07-01 08:44:47 -07:00
Pweaver (Paul Weaver)
2c10e7c0db Change from and noreply emails to use EXTERNAL_HOST domain.
This eliminates another mandatory setting from what one needs to
configure to setup a Zulip server.
2017-07-01 08:09:25 -07:00
Steve Howell
3fe6d12ab6 node tests: Test server_events_dispatch.js directly.
The dispatch.js tests now no longer go through server_events.js,
so the tests are isolated from some of the setup you have to
do for the main event loop.  They now directly call into
server_events_dispatch.js.
2017-07-01 08:50:50 -04:00
Steve Howell
0f4b7496e1 Use _.each to set page_params values for update_dict events. 2017-07-01 08:50:50 -04:00
Greg Price
ec8ead3033 docs/translating: Clarify Handlebars discussion
I found the new paragraph from 74d83cc47 somewhat hard to follow,
so here's another version.  Also try to make the structure of
the rest of the section around it somewhat more clear.
2017-06-30 21:59:58 -07:00
Kenji Okimoto
2eb6c49a89 github_webhook: Fix a typo to handle issues event properly.
issue -> issues in the HTTP_X_GITHUB_EVENT.
2017-06-30 10:55:01 -07:00
Greg Price
7b526b3946 narrow: Add comments explaining how we limit to legitimately-visible results.
Two wrinkles here:

* It's actually a little subtle why `ok_to_include_history` is
  correct; in particular, it's not true that a term `stream:foo` will
  always limit the query to the stream `foo`.  For this, add an
  explanatory comment backed up by an assert.

* The TODO comment in `messages_in_narrow_backend` about assuming this
  is a search, I'm pretty sure doesn't matter; it seems to only be
  saying that we return the set of fields we would for a search.
  They're harmless to send, and in any case it doesn't appear to be
  true anymore that the client only calls this for a search: the
  `can_apply_locally` function also causes narrows with `has:` to go
  to the server.  So just take that comment out.
2017-06-30 11:47:40 -04:00
Greg Price
7785a1046b narrow: Describe the key security invariant of NarrowBuilder.
(After writing the term "invariant" a few times in these comments and
now this commit message, my inner mathematician reminds me that this
property is properly termed a "monovariant" -- something does change,
but it changes only in one direction.  Pretty sure saying "invariant"
communicates better here, though.)
2017-06-30 11:47:40 -04:00
Sadjad Fouladi
92fefa0e7e Fix a grammatical error in status change message. 2017-06-30 11:44:04 -04:00
Aditya Bansal
74f40a0a58 compose.js: Add node test coverage for report_as_received() function. 2017-06-30 19:57:15 +05:30
Aditya Bansal
4b3c2931ea compose.js: Add test coverage for mark_rendered_content_disparity(). 2017-06-30 19:57:15 +05:30
Aditya Bansal
7e585acfa5 compose.js: Add coverage for send_message_success() function. 2017-06-30 19:57:15 +05:30
Aditya Bansal
7f4781e17d compose.js: Add test coverage for update_email(). 2017-06-30 19:57:15 +05:30
Aditya Bansal
3d043d0109 compose.js: Add coverage for get_invalid_recipient_emails(). 2017-06-30 19:57:15 +05:30
Aditya Bansal
9437895c9e compose.js: Add coverage for validate_stream_message() function. 2017-06-30 19:57:15 +05:30
Aditya Bansal
28ec32d757 compose.js: Use get_subscriber_count in show_all_everyone_warning(). 2017-06-30 19:57:14 +05:30
Umair Khan
f60d4849b7 Revert "lint: Don't allow handlerbars within translatable text."
This reverts commit 3c7b9cdc94.
2017-06-30 10:12:31 -04:00
Umair Khan
74d83cc47e lint: Disallow handlebars within {{#tr}}{{/tr}}.
This commit adds a new linter which runs from tools/travis/backend.
It runs over the translations.json file and checks if any of the
translatable string contains handlebars in it.

Fixes #5544
2017-06-30 10:12:31 -04:00
Umair Khan
4f33a650af i18n: Use double lowdash instead of handlebars.
We do not allow handlebars within {{#tr}}{{/tr}}.
2017-06-30 10:12:31 -04:00
Steve Howell
6cf4c65d92 node tests: Add 100% coverage for channel.js. 2017-06-30 09:48:04 -04:00
Steve Howell
ef815e9e79 Remove unused channel.abort_all(). 2017-06-30 09:48:04 -04:00
Steve Howell
0b60538570 node tests: Extract test_get_reaction_section(). 2017-06-30 08:05:10 -04:00
Rishi Gupta
2012913cc1 prod_settings_template: Update description of NOREPLY_EMAIL_ADDRESS. 2017-06-29 17:54:33 -07:00
Rishi Gupta
85d38bd17b emails: Remove DEFAULT_FROM_EMAIL from prod_settings_template. 2017-06-29 17:54:33 -07:00
Rishi Gupta
577e201df0 emails: Replace DEFAULT_FROM_EMAIL with ZULIP_ADMINISTRATOR.
We're getting rid of DEFAULT_FROM_EMAIL from prod_settings_template, since
we only really need one of {DEFAULT_FROM_EMAIL, ZULIP_ADMINISTRATOR}.
2017-06-29 17:54:33 -07:00
Rishi Gupta
36cd122905 models: Change default org_type to CORPORATE.
Once we implement org_type-specific features, it'll be easy to change a
corporate realm to a community realm, but hard to go the other way. The main
difference (the main thing that makes migrating from a community realm to a
corporate realm hard) is that you'd have to make everyone sign another terms
of service.
2017-06-29 15:14:58 -07:00
Cory Lynch
4327402d57 docs: Add tip to record GIFs with Chrome Capture. 2017-06-29 13:26:38 -07:00
Harshit Bansal
fc6eedb831 bugdown: Make unicode_emoji_regex global. 2017-06-29 13:26:07 -07:00
Aditya Bansal
1e18863a98 timerender.js: Use stubbed version of i18n from zjsunit. 2017-06-29 15:18:08 -04:00
Aditya Bansal
5eb5b33f21 settings_org.js: Use stubbed version of i18n from zjsunit. 2017-06-29 15:18:08 -04:00
Aditya Bansal
a103949c2b i18n.js: Fix issue of i18n stub not returning 'translated: ' prefix. 2017-06-29 15:18:08 -04:00
Aditya Bansal
4d84be16ca i18n.js: Fix issue with i18n being cleaned up in namespace cleanup. 2017-06-29 15:18:08 -04:00
Rishi Gupta
81220e050b context_processors: Remove zulip_admin from zulip_default_context.
There is no real distinction between zulip_admin and support_email in the
codebase, so fold them into a single variable.
2017-06-29 11:20:32 -07:00
Rishi Gupta
bf996f91ba deactivated.html: Use support_email instead of custom context variable. 2017-06-29 11:20:32 -07:00
Rishi Gupta
78790ce825 send_password_reset_email: Remove spurious send_mail import.
Make grepping for and otherwise understanding our email pathways slightly
easier.
2017-06-29 10:51:12 -07:00
Aditya Bansal
2be5046144 compose.js: Use stream_data.get_subscriber_count in message mentions.
In this commit we basically start using the get_subscriber_count
function from stream data to get subscriber count.
2017-06-29 10:34:47 -04:00
Aditya Bansal
7531a85c4d stream_data: Add get_subscriber_count() function. 2017-06-29 10:34:47 -04:00
Aditya Bansal
cc34e3d382 compose.js: Add coverage for validate_stream_message_address_info(). 2017-06-29 18:02:25 +05:30
Aditya Bansal
7a0387e0b1 compose.js: Add return true for subscribed streams.
This is basically going to fix a regression which was introduced in
89090cd which made code early return in case of subscribed streams.
2017-06-29 18:02:25 +05:30
Umair Khan
12b124ba71 single_message.handlerbars: Use __starred_status__ in tooltip.
We do not allow handlerbars within tranlation tags. To use variables in
translatable strings, enclose variables with double lowdashes.
2017-06-29 07:39:20 -04:00
Umair Khan
d44c62e894 update_starred: Make the status translatable. 2017-06-29 07:39:20 -04:00
Umair Khan
8921496ccc message_list_view: Add starred_status to message objs.
This starred_status property can be used to provide the context in
the single_message.handlebars template to show the proper tooltip.
2017-06-29 07:39:20 -04:00
Umair Khan
3c7b9cdc94 lint: Don't allow handlerbars within translatable text.
Fixes: #5544
2017-06-29 07:39:20 -04:00
Steve Howell
aae3250155 node tests: Add test_with_view_stubs() for reactions.js. 2017-06-29 07:19:52 -04:00
Steve Howell
9b75daaa60 Extract reactions.view.remove_reaction(). 2017-06-29 07:19:52 -04:00
Steve Howell
e2ae4aeb16 Extract reactions.view.update_existing_reaction(). 2017-06-29 07:19:52 -04:00