mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 05:53:43 +00:00
Remove product_name setting and return to harcoding 'Zulip'.
This removes some confusion in grep for frontend strings with Zulip in them and also cleans up the code in some places. Fixes #1602.
This commit is contained in:
committed by
Tim Abbott
parent
60296c022c
commit
c17e574211
@@ -17,7 +17,7 @@ i18n.init({
|
||||
fr: {
|
||||
translation: {
|
||||
"Quote and reply": "French",
|
||||
"You'll receive notifications when a message arrives and __page_params.product_name__ isn't in focus or the message is offscreen.": "Some French text with __page_params.product_name__",
|
||||
"You'll receive notifications when a message arrives and Zulip isn't in focus or the message is offscreen.": "Some French text with Zulip",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -53,7 +53,6 @@ global.$ = require('jquery')(window);
|
||||
var args = {
|
||||
page_params: {
|
||||
fullname: "John Doe",
|
||||
product_name: "Zulip",
|
||||
password_auth_enabled: false,
|
||||
avatar_url: "http://example.com",
|
||||
left_side_userlist: false,
|
||||
|
||||
@@ -148,7 +148,7 @@ exports.redraw_title = function () {
|
||||
var new_title = (new_message_count ? ("(" + new_message_count + ") ") : "")
|
||||
+ narrow.narrow_title + " - "
|
||||
+ page_params.realm_name + " - "
|
||||
+ page_params.product_name;
|
||||
+ "Zulip";
|
||||
|
||||
if (document.title === new_title) {
|
||||
return;
|
||||
|
||||
@@ -366,8 +366,8 @@ function finale(skip) {
|
||||
|
||||
if (stream_data.in_home_view(page_params.notifications_stream)) {
|
||||
send_delayed_stream_message(page_params.notifications_stream, "welcome", "Practice sending sending some messages here, or starting a new topic.", 15);
|
||||
send_delayed_stream_message(page_params.notifications_stream, page_params.product_name + " tips", "Here's a message on a new topic: `" + page_params.product_name + " tips`.\n\nAs you settle into " + page_params.product_name + ", customize your account and notifications on your [Settings page](#settings).", 30);
|
||||
send_delayed_stream_message(page_params.notifications_stream, page_params.product_name + " tips", "You might also enjoy:\n\n* Our lightweight !modal_link(#markdown-help, message formatting) (including emoji! :thumbsup:)\n* !modal_link(#keyboard-shortcuts, Keyboard shortcuts)\n* [Desktop and mobile apps](/apps)", 40);
|
||||
send_delayed_stream_message(page_params.notifications_stream, "Zulip tips", "Here's a message on a new topic: `Zulip tips`.\n\nAs you settle into Zulip, customize your account and notifications on your [Settings page](#settings).", 30);
|
||||
send_delayed_stream_message(page_params.notifications_stream, "Zulip tips", "You might also enjoy:\n\n* Our lightweight !modal_link(#markdown-help, message formatting) (including emoji! :thumbsup:)\n* !modal_link(#keyboard-shortcuts, Keyboard shortcuts)\n* [Desktop and mobile apps](/apps)", 40);
|
||||
}
|
||||
|
||||
if (work_stream !== undefined) {
|
||||
@@ -486,7 +486,7 @@ function welcome() {
|
||||
var spotlight_message = rows.first_visible();
|
||||
var bar = rows.get_message_recipient_header(spotlight_message);
|
||||
box_first_message();
|
||||
create_and_show_popover(bar, maybe_tweak_placement("left"), "Welcome to " + page_params.product_name,
|
||||
create_and_show_popover(bar, maybe_tweak_placement("left"), "Welcome to Zulip",
|
||||
"tutorial_message");
|
||||
|
||||
var my_popover = $("#tutorial-message").closest(".popover");
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{{! Explanation of the stream email address }}
|
||||
<div>
|
||||
|
||||
<p>{{#tr this}}You can send emails to __page_params.product_name__! Just copy and use this address as an email recipient, and:{{/tr}}</p>
|
||||
<p>{{#tr this}}You can send emails to Zulip! Just copy and use this address as an email recipient, and:{{/tr}}</p>
|
||||
|
||||
<img class="subscription-email-hint-image" src="/static/images/integrations/zulip_mail.png" />
|
||||
|
||||
<ul>
|
||||
<li>{{t "The email will be forwarded to this stream" }}</li>
|
||||
<li>{{#tr this}}The email subject will become the __page_params.product_name__ topic{{/tr}}</li>
|
||||
<li>{{#tr this}}The email body will become the __page_params.product_name__ message{{/tr}}</li>
|
||||
<li>{{#tr this}}The email subject will become the Zulip topic{{/tr}}</li>
|
||||
<li>{{#tr this}}The email body will become the Zulip message{{/tr}}</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<form class="notification-settings-form">
|
||||
<div class="notification-reminder w-70 padded-container center-block">{{#tr this }}You'll receive notifications when a message arrives and __page_params.product_name__ isn't in focus or the message is offscreen.{{/tr}}</div>
|
||||
<div class="notification-reminder w-70 padded-container center-block">{{#tr this }}You'll receive notifications when a message arrives and Zulip isn't in focus or the message is offscreen.{{/tr}}</div>
|
||||
<div class="alert" id="notify-settings-status"></div>
|
||||
|
||||
<h4>{{t "Stream messages" }}</h4>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{! Contents of the "tutorial message" onboarding popup }}
|
||||
|
||||
<div class="tutorial-popover popover-{{placement}}" id="tutorial-message">
|
||||
{{#tr this}}<p>Messages in __page_params.product_name__ go to a <b>stream</b> and have a <b>topic</b>.</p>{{/tr}}
|
||||
{{#tr this}}<p>Messages in Zulip go to a <b>stream</b> and have a <b>topic</b>.</p>{{/tr}}
|
||||
|
||||
<div class="tutorial-done-button">
|
||||
<center>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta charset="UTF-8">
|
||||
{% block title %}
|
||||
{% if user_profile and user_profile.realm.name %}
|
||||
<title>{{user_profile.realm.name}} - {{product_name}}</title>
|
||||
<title>{{user_profile.realm.name}} - Zulip</title>
|
||||
{% else %}
|
||||
<title>Zulip</title>
|
||||
{% endif %}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div id="loading_more_messages_indicator"></div>
|
||||
<div id="page_loading_indicator"></div>
|
||||
<div id="first_run_message" class="empty_feed_notice">
|
||||
<h4>{% trans %}Welcome to {{product_name}}.{% endtrans %}</h4>
|
||||
<h4>{% trans %}Welcome to Zulip.{% endtrans %}</h4>
|
||||
{% trans %}
|
||||
<p>See, the thing about it is... there aren't any messages
|
||||
here for you right now. I'm sure someone will eventually send
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
aria-labelledby="invite-user-label" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="invite-user-label">{% trans %}Invite users to {{product_name}}{% endtrans %}</h3>
|
||||
<h3 id="invite-user-label">{% trans %}Invite users to Zulip{% endtrans %}</h3>
|
||||
</div>
|
||||
<form id="invite_user_form" class="form-horizontal"
|
||||
action="/json/invite_users" method="POST">{{ csrf_input }}
|
||||
|
||||
@@ -62,19 +62,19 @@
|
||||
<tr>
|
||||
<td class="preserve_spaces">```
|
||||
def zulip():
|
||||
print "{{product_name}}"
|
||||
print "Zulip"
|
||||
```</td>
|
||||
<td><pre>def zulip():
|
||||
print "{{product_name}}"</pre></td>
|
||||
print "Zulip"</pre></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="preserve_spaces">``` .py
|
||||
def zulip():
|
||||
print "{{product_name}}"
|
||||
print "Zulip"
|
||||
```</td>
|
||||
<td>
|
||||
<div class="codehilite"><pre><span class="k">def</span> <span class="nf">zulip</span><span class="p">():</span>
|
||||
<span class="k">print</span> <span class="s">"{{product_name}}"</span></pre></div>
|
||||
<span class="k">print</span> <span class="s">"Zulip"</span></pre></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if show_invites %}
|
||||
<li title="{% trans %}Invite more users to {{product_name}}.{% endtrans %}}">
|
||||
<li title="{% trans %}Invite more users to Zulip.{% endtrans %}}">
|
||||
<a href="#invite-user" role="button" data-toggle="modal">
|
||||
<i class="icon-vector-plus-sign"></i> {{ _('Invite users') }}
|
||||
</a>
|
||||
@@ -118,7 +118,7 @@
|
||||
<li class="divider"></li>
|
||||
{% endif %}
|
||||
{% if show_webathena %}
|
||||
<li title="{% trans %}Grant {{product_name}} the Kerberos tickets needed to run your Zephyr mirror via Webathena{% endtrans %}" id="webathena_login_menu">
|
||||
<li title="{% trans %}Grant Zulip the Kerberos tickets needed to run your Zephyr mirror via Webathena{% endtrans %}" id="webathena_login_menu">
|
||||
<a href="#webathena" class="webathena_login">
|
||||
<i class="icon-vector-bolt"></i>{{ _('Link with Webathena') }}
|
||||
</a>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div class="right-sidebar" id="right-sidebar">
|
||||
<div class="alert-box">
|
||||
<div class="alert alert_sidebar alert-error home-error-bar" id="connection-error">
|
||||
{% trans %}<strong>Unable to connect to {{ product_name }}.</strong> Updates may be delayed.{% endtrans %}
|
||||
{% trans %}<strong>Unable to connect to Zulip.</strong> Updates may be delayed.{% endtrans %}
|
||||
<br /><br /> {{ _('Retrying soon...') }} <br /><br /> <a class="restart_get_updates_button">{{ _('Try now.') }}</a>
|
||||
</div>
|
||||
<div class="alert alert_sidebar alert-error home-error-bar" id="get_old_messages_error">
|
||||
{% trans %}<strong>Unable to connect to {{ product_name }}.</strong> Could not fetch messages.{% endtrans %}
|
||||
{% trans %}<strong>Unable to connect to Zulip.</strong> Could not fetch messages.{% endtrans %}
|
||||
<br /><br /> {{ _('Retrying soon...') }} <br /><br />
|
||||
</div>
|
||||
<div class="alert alert_sidebar alert-error home-error-bar" id="zephyr-mirror-error">
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="modal hide" id="tutorial-finale" tabindex="-1" role="dialog"
|
||||
aria-labelledby="tutorial-finale-label" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<h3 id="tutorial-finale-label">{% trans %}Welcome to {{ product_name }}{% endtrans %}</h3>
|
||||
<h3 id="tutorial-finale-label">{% trans %}Welcome to Zulip{% endtrans %}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{% trans %}Streams, topics, and narrowing make {{ product_name }} conversations
|
||||
<p>{% trans %}Streams, topics, and narrowing make Zulip conversations
|
||||
efficient and productive.{% endtrans %}</p>
|
||||
|
||||
<p>{% trans %}That's all there is to it, so let's get started!{% endtrans %}</p>
|
||||
|
||||
@@ -2150,11 +2150,10 @@ def do_create_realm(string_id, name, restricted_to_domain=None,
|
||||
realm.save(update_fields=['notifications_stream'])
|
||||
|
||||
# Include a welcome message in this notifications stream
|
||||
product_name = "Zulip"
|
||||
content = """Hello, and welcome to %s!
|
||||
content = """Hello, and welcome to Zulip!
|
||||
|
||||
This is a message on stream `%s` with the topic `welcome`. We'll use this stream for
|
||||
system-generated notifications.""" % (product_name, notifications_stream.name,)
|
||||
system-generated notifications.""" % (notifications_stream.name,)
|
||||
msg = internal_prep_message(realm, settings.WELCOME_BOT, 'stream',
|
||||
notifications_stream.name, "welcome",
|
||||
content)
|
||||
|
||||
@@ -92,7 +92,6 @@ class HomeTest(ZulipTestCase):
|
||||
"people_list",
|
||||
"pm_content_in_desktop_notifications",
|
||||
"poll_timeout",
|
||||
"product_name",
|
||||
"prompt_for_invites",
|
||||
"realm_add_emoji_by_admins_only",
|
||||
"realm_allow_message_editing",
|
||||
|
||||
@@ -158,7 +158,6 @@ class TemplateTestCase(ZulipTestCase):
|
||||
shallow_tested=True,
|
||||
user_profile=user_profile,
|
||||
user=user_profile,
|
||||
product_name='testing',
|
||||
form=DummyForm(
|
||||
full_name=get_form_value('John Doe'),
|
||||
terms=get_form_value(True),
|
||||
|
||||
@@ -335,8 +335,6 @@ def home_real(request):
|
||||
if user_profile.realm.invite_by_admins_only and not user_profile.is_realm_admin:
|
||||
show_invites = False
|
||||
|
||||
product_name = "Zulip"
|
||||
page_params['product_name'] = product_name
|
||||
request._log_data['extra'] = "[%s]" % (register_ret["queue_id"],)
|
||||
response = render_to_response('zerver/index.html',
|
||||
{'user_profile': user_profile,
|
||||
@@ -351,7 +349,6 @@ def home_real(request):
|
||||
'show_webathena': user_profile.realm.webathena_enabled,
|
||||
'enable_feedback': settings.ENABLE_FEEDBACK,
|
||||
'embedded': narrow_stream is not None,
|
||||
'product_name': product_name
|
||||
},
|
||||
request=request)
|
||||
patch_cache_control(response, no_cache=True, no_store=True, must_revalidate=True)
|
||||
|
||||
Reference in New Issue
Block a user