Commit Graph

4518 Commits

Author SHA1 Message Date
Tim Abbott
ef9681caa3 i18n: Revert pieces of recent settings changes.
Apparently, i18n isn't declared/exported at module load time, so we
still need some of these gymnastics.

Sorry for the sloppy merging!
2018-05-30 10:10:46 -07:00
Tim Abbott
3f0a1e7c54 translations: Clean up indentation for initialization code. 2018-05-30 09:14:20 -07:00
Tim Abbott
d9347dea3e i18n: Remove now-unused ensure_i18n function. 2018-05-30 09:13:48 -07:00
Tim Abbott
269b5202d9 gear_menu: Remove now-unnecessary ensure_i18n call. 2018-05-30 09:13:12 -07:00
Tim Abbott
00411e712f settings: Remove now-unnecessary ensure_i18n gymnastics. 2018-05-30 09:12:22 -07:00
Tim Abbott
276b70ffb8 subs: Remove now-unnecssary call to ensure_i18n. 2018-05-30 09:10:43 -07:00
Tim Abbott
c5b4dacd3b info_overlay: Remove unnecessary ensure_i18n call. 2018-05-30 09:09:17 -07:00
Tim Abbott
04b0e225c7 unread_ui: Remove now-unnecessary ensure_i18n call. 2018-05-30 09:07:49 -07:00
Tim Abbott
b88ec552cf settings_notifications: Remove now-unnecessary ensure_i18n. 2018-05-30 09:06:59 -07:00
Tim Abbott
a087b34f12 drafts: Eliminate now-unnecessary ensure_i18n. 2018-05-30 09:06:13 -07:00
Tim Abbott
a1f5fe4f92 settings_ui: Remove now-unnecessary ensure_i18n. 2018-05-30 09:05:46 -07:00
Tim Abbott
41b1dcbfe0 settings_org: Eliminate now-unnecessary ensure_i18n. 2018-05-30 09:03:34 -07:00
Tim Abbott
1e6564308f settings_toggle: Remove now-unnecessary ensure_i18n. 2018-05-30 09:02:29 -07:00
Tim Abbott
f67d0d3f91 admin: Remove now-unnecessary ensure_i18n. 2018-05-30 09:01:56 -07:00
Tim Abbott
7b2fc95c6a settings: Remove ensure_i18n from display settings. 2018-05-30 09:00:41 -07:00
Shubham Dhama
cff40c557b translations: Load translations from page_params.translation_data.
With this commit, we change how we deal with translation for strings.
Previously we used to fetch the translations data after loading which
created a lot of unpleasant race bugs.

So we changed this to use the `translation_data` sent in `page_params`
which is available at load time. The previous fetching can be useful if
we want to change the string to the changed language without reloading
the page but since we ask the user to reload the page after changing
the default language so fetching after loading isn't useful for us and
hence we can add resource only once.

Ultimately, we can remove the i18next plugins too.  We leave the logic
for clearing local storage, patched to fully clear it.

Fixes: #9087.
2018-05-30 08:57:27 -07:00
Robert Hönig
647c63050f botserver: Add outgoing webhook tokens to botserverrc.
The tokens will be used to authorize the server when sending
messages to the Botserver.
2018-05-30 10:00:19 -04:00
Shubham Padia
0ffcb7fccf search: Remove blueslip warnings for invalid emails in 'pm-with' filter.
Fixes #3380.
The blueslip warning mentioned in #3380 were from paths ending at
people.email_list_to_user_ids_string. Some additional blueslip warnings
were raised after using that function.
Although we can put a validation check somewhere in the call stack of
people.email_list_to_user_ids_string, this function itself is used to
validate the operand by the higher order functions, so it wouldn't make
sense to put a validation check before that. Instead, removing the
blueslip warning altogether was chosen.
people.email_list_to_user_ids_string was replaced by
people.reply_to_to_user_ids_string which is a blueslip-free version
of the same. Other blueslip warnings were removed.
2018-05-30 07:49:59 -04:00
Yashashvi Dave
b94986b1e1 jquery-form: Remove use of jquery-form from invite-user form. 2018-05-30 03:14:39 +05:30
Yashashvi Dave
3654d4f92d jquery-form: Remove jquery-form use from get-API-key form in user settings. 2018-05-30 03:14:39 +05:30
Robert Hönig
04d68d2570 code: Rename flaskbotrc to botserverrc. 2018-05-29 10:19:17 +02:00
Steve Howell
0bc272fc86 hotkeys: Fix very recent regression with down key.
In 1f72647a5a I accidentally
flipped a condition that made the down key "recenter" on
the "normal" case, not in the "is-at-end" case.

This commit undoes that regression, which probably only
affected czo for a weekend, and makes the logic a bit
more clear.
2018-05-28 16:49:57 -07:00
Steve Howell
26e1fca7ed Add message_list.is_at_end() helper. 2018-05-28 16:49:57 -07:00
Shubham Padia
88b4a9f2d7 pm_list: Do not expand pm_list for invalid emails in pm-with. 2018-05-28 11:29:54 -07:00
Shubham Padia
d9b0ab2ae7 narrow: Show non-existing user message for invalid emails.
Also adds people.is_valid_bulk_emails_for_compose and refactors
narrow_state.set_compose_defaults to use it.
2018-05-28 10:45:42 -07:00
Shubham Padia
6ea6f5e0af search: Do not open compose box if invalid recipient present in pm-with.
If atleast one of the private_message_recipients is invalid, compose
box will not be opened.
Thanks to Aastha Gupta <aastha.gupta4104@gmail.com> for some preliminary
work on this.
2018-05-28 10:45:42 -07:00
Yashashvi Dave
40029a0753 user profile: Improve format of date type of custom fields in popover.
In user profile popover, date type of custom fields values are
not showing in correct format as "date_joined" value.
Fix this using moment.js to render date type of fields
in correct format.
2018-05-27 23:01:22 -07:00
Yashashvi Dave
a68ff22aed custom fields: Improve date picker popover for date type fields. 2018-05-27 23:01:22 -07:00
Yashashvi Dave
b5cf73ae0c custom fields: Add UI for user type of custom fields. 2018-05-27 23:01:22 -07:00
Yashashvi Dave
e82c879b85 custom fields: Add user type of custom fields.
Fixes #8878
2018-05-27 23:01:21 -07:00
Yashashvi Dave
ba72780678 js/settings_account.js: Add generic func to update custom profile fields. 2018-05-27 22:57:05 -07:00
Steve Howell
1f72647a5a navigate: Use msg_list.prev/next for up/down methods.
We've had rare and hard-to-track-down glitches with our
old implementation for going up and down in the message
list, which was using jQuery selectors.

We now just use MessageListData under the hood to find
our next id.
2018-05-27 22:41:19 -07:00
Steve Howell
a074056127 Add prev/next helpers for MessageList. 2018-05-27 22:41:19 -07:00
Rishi Gupta
d28a4d1f86 stats: Remove hour from on-hover date for Number of users. 2018-05-26 12:08:05 -07:00
Rishi Gupta
2b97a9488f stats: Fix on-hover behavior of number of users.
Fixes regression introduced in fa9d79e.
2018-05-26 12:08:05 -07:00
Tim Abbott
c3a81157de help: Fix ordering of code sections work and scrollbar update.
Conceptually, the scrollbar update should be after we've rendered the
code blocks.
2018-05-26 10:04:46 -07:00
Tim Abbott
b7f9139ffc help: Render all HTML tables with the bootstrap striped theme. 2018-05-26 10:04:46 -07:00
Cynthia Lin
818611ac4e user groups: Sanitize pill_container selector to avoid escaped strings.
Fixes #9325.
2018-05-25 12:02:34 -07:00
Robert Hönig
53891a9bed bots: Don't name section headers in flaskbotrc.
The Botserver uses section headers in the flaskbotrc to
determine which bot to run. Silently setting the section
headers to a bot's username is confusing and makes it
harder for Botserver users to figure out how to get the
Botserver to run the bots they want. This commit empties
all flaskbotrc section headers and thus makes the assignment
of bots explicit and mandatory.
2018-05-25 10:33:40 -07:00
Shubham Padia
5d750a5d44 search: Respect spaces in person name in new suggestions only.
Fixes #6515.
New suggestions for `sender:King ha` will respect spaces and the new
suggestion will be `Sent by King Hamlet <email>` instead of `Sent by King,
search for ha`. But if first term of sender operand is a valid user email,
tokens will be seperated by spaces. e.g `sender:hamlet@zulip.com abc`
will show `Sent by King Hamlet <email>, search for abc`.
2018-05-25 09:03:27 -07:00
Steve Howell
034164945f Fix tracebacks related to direct use of msg_list._items.
We had debug code that was reaching into msg_list._items when
it could use msg_list.all_messages() instead.

When we split out MessageListData, using _items started
breaking this code.
2018-05-25 08:28:56 -07:00
Akash Nimare
683fbf68ce portico: Move carousel forward on clicking inside tour container.
Fixes: #9540.
2018-05-25 18:49:20 +05:30
Tim Abbott
6967b6519d settings: Add a development-only setting for less dense mode.
This should make it easier for us to iterate on a less-dense Zulip.

We create two classes on body, less_dense_mode and more_dense_mode, so
that it's easy as we refactor to separate the two concepts from things
like colors that are independent.
2018-05-24 12:31:37 -07:00
Akash Nimare
dc54260cce desktop: Update app version to v2.3.1. 2018-05-24 12:19:43 -07:00
Steve Howell
1b57e568ff Add "zform" functionality to the web client.
A "zform" knows how to render data that follows our
schema for widget messages with form elements like
buttons and choices.

This code won't be triggered until a subsequent
server-side commit takes widget_content from
API callers such as the trivial chat bot and
creates submessages for us.
2018-05-24 09:30:22 -07:00
Steve Howell
435719c65b Add a schema checking concept to the web app.
This starts the concept of a schema checker, similar to
zerver/lib/validator.py on the server.  We can use this
to validate incoming data.  Our server should filter most
of our incoming data, but it's useful to have client-side
checking to defend against things like upgrade
regressions (i.e. what if we change the name of the field
on the server side without updating all client uses).
2018-05-24 09:30:22 -07:00
Steve Howell
a5dee62b8f transmit.js: Add reply_message(). 2018-05-24 09:30:22 -07:00
Steve Howell
65841790b8 submessages: Add try/catch around main entry point.
We should probably have a try/catch in MessageListView itself
too, for post-processing kind of stuff, but we want to make
this new module defensive in its own right.
2018-05-24 09:30:22 -07:00
Tim Abbott
5a5ca12f6f hotkey: Move ctrl+[ back from cmd+[.
This was incorrectly changed; the goal here is to match what vim does
for this keyboard shortcut.

Fixes #9525.
2018-05-24 08:31:55 -07:00
Joshua Pan
dcee398622 onboarding: Redesign intro_reply hotspot in bottom whitespace.
This is a trial to have the first reply hotspot in the bottom
whitespace (and stick there until "Got it!"  is pressed).

Tweaked by tabbott to clean it up a bit.  Still needs more work on the
visuals.
2018-05-23 14:22:19 -07:00