rht
a311678190
zerver/management: Use python 3 syntax for typing.
2017-10-26 15:24:56 -07:00
derAnfaenger
1792dcbd09
tests: Call real consume method of queue processors.
...
This switches to more real tests for a first batch of
queue_json_publish() calls that don't cause trouble when
used with call_consume_tests=True.
2017-10-26 14:58:03 -07:00
Vishnu Ks
25cb6af32c
mangement: Create command for creating default stream groups.
2017-10-26 11:38:48 -07:00
Umair Khan
19ccff060a
i18n: Extract language options from tracked locales.
...
Now we use 'git ls-files' to get the list of locales that we actually
track. Previously we were using os.listdir to get the contents of the
static/locale directory. This could also return locales which were
present in the directory but are not supported by us, e.g. zh_CN.
2017-10-23 22:58:44 -07:00
Umair Khan
2db1cba9cc
i18n: Use language code instead of locale.
...
We have been assigning locale to language code. Mostly code and locale
are same but for languages like zh-Hans, locale is zh_Hans and code is
zh-hans.
After this commit, compilemessages command should be run.
2017-10-20 11:21:26 -07:00
Umair Khan
df13ac570a
i18n: Add localized name in language_name_map.json.
2017-10-20 11:20:22 -07:00
Umair Khan
3769972fc2
i18n: Clean up code to create language_options.json.
...
Previously we were using regexes to extract the language from our
locale files. Now we use LANG_INFO data structure provided by Django
to do the same and fallback to PO files only when language code is not
present in the Django data structure.
2017-10-20 11:20:22 -07:00
Tim Abbott
03d72a1cd6
send_webhook_fixture_message: Print useful error messages.
...
Previously, if this failed, it didn't tell you why.
2017-10-20 09:03:05 -07:00
derAnfaenger
3264e4f24a
Remove superfluous queue_json_publish imports.
2017-10-19 13:57:54 -07:00
Tim Abbott
3983ebce9a
test_fixtures: Move test_db_status state under UUID_VAR_PATH.
...
This should mean that maintaining two Zulip development environments
using the same Git checkout no longer has caching problems keeping
track of the migration status.
2017-10-17 21:15:58 -07:00
Tim Abbott
b7c3b4df0c
migration_status: Switch to passing the path in Python.
...
This is an important prerequisite to changing these paths used in
provisioning.
2017-10-17 21:15:58 -07:00
Tim Abbott
15c0380a33
export: Fix exporting with an output file at a relative path.
...
Fixes #7051 .
2017-10-17 20:47:29 -07:00
Tim Abbott
66a3f514d4
zilencer: Remove long-obsolete Deployment model.
...
This was a precursor to RemoteZulipServer, which is no longer used for
anything, and was cluttering the codebase.
2017-10-11 23:48:01 -07:00
Tim Abbott
49274a060c
send_webhook_fixture_message: Fix to work with subdomains.
...
We apparently failued to update this tool when we switched the
development environment to require a subdomain.
2017-10-08 20:14:14 -07:00
rht
fbd24669a4
Cleanup: Remove shebang and executable flag from these files.
2017-10-08 15:38:15 -07:00
derAnfaenger
747c283180
lint: Replace `pk` with `id` where they are equivalent.
2017-10-06 12:52:12 -07:00
Tim Abbott
0f2e4a55c0
soft deactivation: Shorten management command name.
...
This command is really for soft deactivation; there's just an undo
feature.
2017-10-06 08:48:43 -07:00
Tim Abbott
ca59b28fc1
import: Fix positional argument parsing.
2017-10-06 08:45:22 -07:00
Tim Abbott
bfedb82097
import: Fix argparse usage message breakage.
2017-10-06 08:41:01 -07:00
Umair Khan
326a6f6b4f
i18next: Don't allow empty string as valid translation.
...
Previously we used to mark a key as unstranlated if its value was equal
to it in translations.json. This had an issue because it didn't allow
otherwise valid cases where key was equal to the value.
This commit solves the problem by disallowing an empty string as a valid
translation and then using the empty string as the value for all the
unstranslated keys.
Fixes #5261
2017-10-05 22:44:34 -07:00
Umair Khan
b464fd7643
makemessages: Change type of translation_strings to List.
...
In the code this variable is only used as a list, however, we
create it as dictionary which uses more memory.
2017-10-05 22:44:34 -07:00
Tim Abbott
13bb546ddd
subdomains: Hardcode can_add_realm_domains=True.
...
It was already always True if REALMS_HAVE_SUBDOMAINS, and now that's
the only supported configuration.
2017-10-02 16:32:10 -07:00
derAnfaenger
d1afab7199
Replace deprecated Logging.warn calls with Logging.warning.
2017-10-02 11:11:42 +02:00
rht
6dd94becb3
zerver/management: Remove unused optparse import.
2017-09-30 09:22:08 -07:00
rht
f22daeba1a
Cleanup rabbitmq queues when doing dev db rebuild.
...
Modified by tabbott to cleanup the argument handling in the modified
purge_queue management command.
Fixes #1335 .
2017-09-28 18:18:54 -07:00
rht
32650c8fdc
zerver/management: Remove print_function.
2017-09-27 18:05:45 -07:00
rht
0fa3c1d876
zerver/management: Remove `import six`.
2017-09-27 17:06:16 -07:00
rht
e239e97351
zerver/management: Remove absolute_import.
2017-09-27 10:00:39 -07:00
neiljp (Neil Pilgrim)
ab4cbf81f0
mypy: Add assertions of get_realm results when parser requires realm.
2017-09-26 13:49:01 -07:00
Greg Price
7737326cf0
mypy: Add an Optional in fix_unreads command.
2017-09-26 13:49:01 -07:00
Greg Price
c10aca1bbf
soft deactivation: Simplify logic slightly in management command.
...
The `get_realm` method works properly regardless of whether the
'realm_id' option was set, so checking for that option first is
redundant.
2017-09-26 13:49:01 -07:00
neiljp (Neil Pilgrim)
acf7e2a9ee
mypy: Set conditional to be against result of get_realm, not input.
...
[Tweaked by greg to use explicit `is not None`.]
2017-09-26 13:49:01 -07:00
Vishnu Ks
f3b4de822b
command: Create multiuse user invite generation command.
2017-09-22 19:48:46 -07:00
Tim Abbott
8badd10a6c
send_test_email: Remind users to restart the server after updates.
2017-09-22 13:32:22 -07:00
Umair Khan
1f93c06b76
i18n: Optimize get_language_list().
...
compilemessages command now does all the heavy lifting by creating a
language_name_map.json file under locale directory. This file is used
by get_language_list to retrieve the require information.
Fixes : #6486
2017-09-14 02:28:58 -07:00
Steve Howell
69203c1c81
fix_unreads: Remove commit() call in fix().
...
The commit() call in fix() breaks migrations and tests (unless you
mock) due to outer transactions.
We now explicitly call commit() from the management command.
2017-09-07 07:06:03 -07:00
Steve Howell
8cc8e87daf
fix_unreads: Use logging instead of print.
2017-09-07 07:06:03 -07:00
Steve Howell
a2fe4178be
Extract zerver/lib/fix_unreads.py.
...
This is a pure code move.
2017-09-07 07:06:03 -07:00
Umair Khan
f7d8db792c
makemessages: Allow whitespaces after comma in i18n.
...
We allow such patterns:
```
i18n.t('Test __variable__',
{variable: "script"})
```
2017-09-06 07:01:43 -07:00
Steve Howell
4ac6bc46c7
Add MutedTopic model.
...
This commit completely switches us over to using a
dedicated model called MutedTopic to track which topics
a user has muted.
This includes the necessary migrations to create the
table and populate it from legacy data in UserProfile.
A subsequent commit will actually remove the old field
in UserProfile.
2017-09-02 09:19:51 -07:00
Steve Howell
828459a24b
Extract build_topic_mute_checker into topic_mutes.py.
...
We had two duplicate versions of this function, and one
of them was broken with respect to case insensitivity.
2017-08-29 16:53:38 -04:00
Yago González
659bff1ffb
i18n: Fix URLs misparsing in translation tags.
...
The double forward slash (//) after the protocol in URLs was being
mistakenly considered the beginning of an inline JS comment, causing
internationalization strings being cut unexpectedly.
Now the check for inline JS comments is only run in .js files.
2017-08-28 13:54:17 -07:00
Aditya Bansal
d9c9bfe7f6
logger: Add new create_logger abstraction to simplify logging.
...
This deduplicates a ton of Python logger-creation code to use a single
standard implementation, so we can avoid copy-paste problems.
2017-08-27 18:31:53 -07:00
Vishnu Ks
8fc8ac0799
management: Override CommandError to mention --entire-server argument.
2017-08-27 12:34:23 -07:00
Aditya Bansal
b232563e12
soft-deactivation: Add cron job for weekly soft deactivating users.
2017-08-27 11:33:06 -07:00
Aditya Bansal
9d7e23c100
softdeactivation/management: Make specifying realm an optional arg.
2017-08-27 11:33:06 -07:00
Preston Hansen
e8a608f733
management: Move enqueue_digest_email handler to digest.
2017-08-27 10:13:11 -07:00
Preston Hansen
9a4b17cf9b
management: Move queue_digest_recipient to digest.
2017-08-27 10:13:11 -07:00
Preston Hansen
2aabf4fc67
management: Move should_process_digest to digest.
2017-08-27 10:13:11 -07:00
Preston Hansen
25a40806df
management: Move inactive_since to digest.
2017-08-27 10:13:11 -07:00