From 39f0ffdedd1c9b883f1db947568bcc621fb44e59 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 27 Dec 2016 20:07:10 -0800 Subject: [PATCH] Move static/third/gemoji to static/generated/emoji. Fixes #1153. --- .gitignore | 2 +- docs/THIRDPARTY | 3 +-- frontend_tests/node_tests/echo.js | 10 ++++---- frontend_tests/node_tests/templates.js | 4 ++-- static/generated/README.md | 1 + static/js/emoji.js | 6 ++--- static/js/tutorial.js | 8 +++---- templates/zerver/emails/followup/day1.html | 2 +- templates/zerver/help/add-emoji.md | 2 +- templates/zerver/help/index.md | 6 ++--- templates/zerver/index.html | 2 +- templates/zerver/markdown_help.html | 4 ++-- tools/build-release-tarball | 2 +- .../deprecated/iframe-bot/show-last-messages | 2 +- tools/lint-all | 2 +- tools/setup/emoji/build_emoji | 4 ++-- zerver/fixtures/bugdown-data.json | 24 +++++++++---------- zerver/lib/bugdown/__init__.py | 6 ++--- zerver/lib/notifications.py | 6 ++--- zerver/tests/test_bugdown.py | 4 ++-- 20 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 static/generated/README.md diff --git a/.gitignore b/.gitignore index 1671ae366d..b165149853 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ coverage/ .vagrant /zproject/dev-secrets.conf static/js/bundle.js -static/third/gemoji +static/generated/emoji static/locale/language_options.json /node_modules npm-debug.log diff --git a/docs/THIRDPARTY b/docs/THIRDPARTY index 0ebc72ff73..39d163e09a 100644 --- a/docs/THIRDPARTY +++ b/docs/THIRDPARTY @@ -115,10 +115,9 @@ Copyright: 2013 Nijiko Yonskai License: Apache-2.0 Comment: The software has been modified. -Files: static/third/gemoji/images/emoji/unicode/* tools/setup/emoji/*.ttf +Files: static/generated/emoji/images/emoji/unicode/* tools/setup/emoji/*.ttf Copyright: Google, Inc. License: Apache-2.0 -Comment: These are actually Noto Emoji, not gemoji. Files: static/third/html5-formdata/formdata.js Copyright: 2010 François de Metz diff --git a/frontend_tests/node_tests/echo.js b/frontend_tests/node_tests/echo.js index b8c9e8a70b..a96a01ce60 100644 --- a/frontend_tests/node_tests/echo.js +++ b/frontend_tests/node_tests/echo.js @@ -9,8 +9,8 @@ global.stub_out_jquery(); set_global('page_params', { people_list: [], realm_emoji: { - burrito: {display_url: '/static/third/gemoji/images/emoji/burrito.png', - source_url: '/static/third/gemoji/images/emoji/burrito.png'}, + burrito: {display_url: '/static/generated/emoji/images/emoji/burrito.png', + source_url: '/static/generated/emoji/images/emoji/burrito.png'}, }, realm_filters: [ [ @@ -180,11 +180,11 @@ var bugdown_data = JSON.parse(fs.readFileSync(path.join(__dirname, '../../zerver {input: 'And this is a #**wrong** stream link', expected: '

And this is a #**wrong** stream link

'}, {input: 'mmm...:burrito:s', - expected: '

mmm...:burrito:s

'}, + expected: '

mmm...:burrito:s

'}, {input: 'This is an :poop: message', - expected: '

This is an :poop: message

'}, + expected: '

This is an :poop: message

'}, {input: "\ud83d\udca9", - expected: '

\ud83d\udca9

'}, + expected: '

\ud83d\udca9

'}, {input: 'This is a realm filter #1234 with text after it', expected: '

This is a realm filter #1234 with text after it

'}, {input: 'This is a realm filter with ZGROUP_123:45 groups', diff --git a/frontend_tests/node_tests/templates.js b/frontend_tests/node_tests/templates.js index 39665994ea..d259b729db 100644 --- a/frontend_tests/node_tests/templates.js +++ b/frontend_tests/node_tests/templates.js @@ -1,6 +1,6 @@ set_global('page_params', {realm_emoji: { - burrito: {display_url: '/static/third/gemoji/images/emoji/burrito.png', - source_url: '/static/third/gemoji/images/emoji/burrito.png'}, + burrito: {display_url: '/static/generated/emoji/images/emoji/burrito.png', + source_url: '/static/generated/emoji/images/emoji/burrito.png'}, }}); add_dependencies({ diff --git a/static/generated/README.md b/static/generated/README.md new file mode 100644 index 0000000000..f2aad14654 --- /dev/null +++ b/static/generated/README.md @@ -0,0 +1 @@ +This directory is for generated static assets such as emoji. diff --git a/static/js/emoji.js b/static/js/emoji.js index 38b05686bd..daf053f248 100644 --- a/static/js/emoji.js +++ b/static/js/emoji.js @@ -17,11 +17,11 @@ var unicode_emoji_names = ["1f198", "1f3ed", "0034", "1f341", "1f3d7", "26f9", " emoji_names.push("zulip"); _.each(emoji_names, function (value) { - default_emojis.push({emoji_name: value, emoji_url: "/static/third/gemoji/images/emoji/" + value + ".png"}); + default_emojis.push({emoji_name: value, emoji_url: "/static/generated/emoji/images/emoji/" + value + ".png"}); }); _.each(unicode_emoji_names, function (value) { - default_unicode_emojis.push({emoji_name: value, emoji_url: "/static/third/gemoji/images/emoji/unicode/" + value + ".png"}); + default_unicode_emojis.push({emoji_name: value, emoji_url: "/static/generated/emoji/images/emoji/unicode/" + value + ".png"}); }); exports.update_emojis = function update_emojis(realm_emojis) { @@ -49,7 +49,7 @@ exports.initialize = function initialize() { // Load the sprite image in the background so that the browser // can cache it for later use. var sprite = new Image(); - sprite.src = '/static/third/gemoji/sprite.png'; + sprite.src = '/static/generated/emoji/sprite.png'; }; exports.update_emojis(page_params.realm_emoji); diff --git a/static/js/tutorial.js b/static/js/tutorial.js index c6e5bbb148..156a56916f 100644 --- a/static/js/tutorial.js +++ b/static/js/tutorial.js @@ -47,7 +47,7 @@ var fake_messages = [ }, { id: 3, - content: "

Looks good to me! :+1:

", + content: "

Looks good to me! :+1:

", is_stream: true, sender_full_name: "Jeff Arnold", sender_email: "jeff@zulip.com", @@ -75,7 +75,7 @@ var fake_messages = [ }, { id: 5, - content: "

Yay, Twitter integration. :heart_eyes:

", + content: "

Yay, Twitter integration. :heart_eyes:

", is_stream: true, sender_full_name: "Leo Franchi", sender_email: "leo@zulip.com", @@ -117,7 +117,7 @@ var fake_messages = [ }, { id: 8, - content: "

:clock1130: Reminder: engineering meeting in 1 hour. :clock1130:

", + content: "

:clock1130: Reminder: engineering meeting in 1 hour. :clock1130:

", is_stream: true, sender_full_name: "Reminder Bot", sender_email: "reminder-bot@zulip.com", @@ -173,7 +173,7 @@ var fake_messages = [ }, { id: 12, - content: "

No problem, less work for me. :smile:

", + content: "

No problem, less work for me. :smile:

", is_stream: true, sender_full_name: "Abbie Patel", sender_email: "abbie@zulip.com", diff --git a/templates/zerver/emails/followup/day1.html b/templates/zerver/emails/followup/day1.html index 3affe72862..6d9436530b 100644 --- a/templates/zerver/emails/followup/day1.html +++ b/templates/zerver/emails/followup/day1.html @@ -30,7 +30,7 @@
  • Are you a keyboard power user? Learn about keyboard shortcuts in the Keyboard Shortcuts tab under the gear icon. (Or press '?')
  • -
  • Emoji. Because
    :ramen:
    means .
  • +
  • Emoji. Because
    :ramen:
    means .
  • {% if verbose_support_offers %} diff --git a/templates/zerver/help/add-emoji.md b/templates/zerver/help/add-emoji.md index e8279fdfde..050f907be8 100644 --- a/templates/zerver/help/add-emoji.md +++ b/templates/zerver/help/add-emoji.md @@ -20,7 +20,7 @@ Zulip fully supports Unicode. To use Unicode in your message: ### Using emoji codes 1. Start by composing a [new message or reply](/help/#posting-and-replying) -2. Type in the emoji code. For example `:smile:` produces the following icon:smile. +2. Type in the emoji code. For example `:smile:` produces the following icon:smile. **Note**: If you are unsure of the code for any particular emoji visit [Emoji Cheat Sheet](http://www.webpagefx.com/tools/emoji-cheat-sheet/) for a complete list. Furthermore, after typing `:` and any two letters an autocomplete menu will appear displaying five emoji codes. These emoji contain the letters you typed and are sorted alphabetically by code. You can also cycle through these suggestions by using the `↑` and `↓` arrow keys. diff --git a/templates/zerver/help/index.md b/templates/zerver/help/index.md index 9eeba1de78..62030ede66 100644 --- a/templates/zerver/help/index.md +++ b/templates/zerver/help/index.md @@ -468,9 +468,9 @@ pane shows you the email address to use for any particular stream. * Zulip also lets you enter emoji by name, using the format `:name:`. So sending `:octopus: :film_projector: :revolving_hearts:` will produce - octopus - film_projector - revolving_hearts + octopus + film_projector + revolving_hearts can find emoji that are accessible this way by typing a colon and two or more letters of the alphabet — a pop-up menu will appear showing the first five emoji-names containing the letters you diff --git a/templates/zerver/index.html b/templates/zerver/index.html index e65fee893d..4a67840a7d 100644 --- a/templates/zerver/index.html +++ b/templates/zerver/index.html @@ -14,7 +14,7 @@ var page_params = {{ page_params }}; {% block customhead %} - +