-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap user-facing strings in gettext; add icon_emoji
- Loading branch information
Showing
11 changed files
with
214 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ include \ | |
tests/requirements.txt | ||
|
||
recursive-include emojiwatch/static * | ||
recursive-include emojiwatch/templates * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- encoding: utf-8 -*- | ||
# ====================================================================== | ||
""" | ||
Copyright and other protections apply. Please see the accompanying | ||
:doc:`LICENSE <LICENSE>` and :doc:`CREDITS <CREDITS>` file(s) for rights | ||
and restrictions governing use of this software. All rights not | ||
expressly waived or licensed are reserved. If those files are missing or | ||
appear to be modified from their originals, then please contact the | ||
author before viewing or using this software in any capacity. | ||
""" | ||
# ====================================================================== | ||
|
||
from __future__ import absolute_import, division, print_function | ||
|
||
TYPE_CHECKING = False # from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
import typing # noqa: F401 # pylint: disable=import-error,unused-import,useless-suppression | ||
|
||
from builtins import * # noqa: F401,F403 # pylint: disable=redefined-builtin,unused-wildcard-import,useless-suppression,wildcard-import | ||
from future.builtins.disabled import * # noqa: F401,F403 # pylint: disable=no-name-in-module,redefined-builtin,unused-wildcard-import,useless-suppression,wildcard-import | ||
from future.standard_library import install_aliases | ||
install_aliases() | ||
|
||
# ---- Imports --------------------------------------------------------- | ||
|
||
from gettext import gettext | ||
|
||
import django.apps as d_apps | ||
|
||
from . import ( | ||
LOGGER, | ||
SLACK_AUTH_TOKEN, | ||
SLACK_VERIFICATION_TOKEN, | ||
) | ||
|
||
# ---- Classes --------------------------------------------------------- | ||
|
||
# ====================================================================== | ||
class EmojiwatchConfig(d_apps.AppConfig): | ||
|
||
# ---- Data -------------------------------------------------------- | ||
|
||
name = 'emojiwatch' | ||
verbose_name = gettext('Emojiwatch') | ||
|
||
# ---- Overrides --------------------------------------------------- | ||
|
||
def ready(self): | ||
# type: (...) -> None | ||
super().ready() # type: ignore # py2 | ||
|
||
if not SLACK_AUTH_TOKEN: | ||
LOGGER.critical("EMOJIWATCH['slack_auth_token'] setting is missing") | ||
|
||
if not SLACK_VERIFICATION_TOKEN: | ||
LOGGER.critical("EMOJIWATCH['slack_verification_token'] setting is missing") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% extends "admin/change_form.html" %} | ||
{% load i18n %} | ||
{% block after_field_sets %}<p> | ||
{% trans 'A watcher for receiving <a alt="emoji_changed event API documentation" href="https://api.slack.com/events/emoji_changed"><code>emoji_changed</code></a> events for a given team and posting updates to a given channel via <a alt="chat.postMessage API documentation" href="https://api.slack.com/methods/chat.postMessage"><code>chat.postMessage</code></a>.' %} | ||
</p>{% endblock %} |
Oops, something went wrong.