Skip to content

Commit

Permalink
Added different message for l10n kbforum discussions. [bug 654974]
Browse files Browse the repository at this point in the history
  • Loading branch information
rlr committed May 10, 2011
1 parent d24e44f commit a9747be
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 18 deletions.
2 changes: 1 addition & 1 deletion apps/kbforums/templates/kbforums/confirm_post_delete.html
@@ -1,6 +1,6 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "kbforums/base.html" %}
{% from "kbforums/includes/macros.html" import kbforums_warning %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {t} is the title of the thread. {d} is the name of the document. #}
{% set title = _('Delete Post | {t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
Expand Down
@@ -1,6 +1,6 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "kbforums/base.html" %}
{% from "kbforums/includes/macros.html" import kbforums_warning %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {t} is the title of the thread. {d} is the name of the document. #}
{% set title = _('Delete Thread | {t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
Expand Down
2 changes: 1 addition & 1 deletion apps/kbforums/templates/kbforums/edit_post.html
Expand Up @@ -2,7 +2,7 @@
{% extends "kbforums/base.html" %}
{% from "layout/errorlist.html" import errorlist %}
{% from "includes/common_macros.html" import content_editor %}
{% from "kbforums/includes/macros.html" import kbforums_warning %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {t} is the title of the thread. {d} is the name of the document. #}
{% set title = _('Edit a post | {t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
Expand Down
2 changes: 1 addition & 1 deletion apps/kbforums/templates/kbforums/edit_thread.html
@@ -1,7 +1,7 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "kbforums/base.html" %}
{% from "layout/errorlist.html" import errorlist %}
{% from "kbforums/includes/macros.html" import kbforums_warning %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {t} is the title of the thread. {d} is the name of the document. #}
{% set title = _('Edit thread {t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
Expand Down
33 changes: 22 additions & 11 deletions apps/kbforums/templates/kbforums/includes/macros.html
@@ -1,18 +1,29 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% macro kbforums_warning(document, user) -%}
<section class="warning-box">
<p>
{% if user.is_authenticated() %}
{% trans title=document.title %}
This forum is a discussion about improving the "{{ title }}" article.
{% endtrans %}
{% else %}
{% trans title=document.title, register_url=url('users.register') %}
This forum is a discussion about improving the "{{ title }}" article. If
you'd like to participate, please <a href="{{ register_url }}">register</a>.
{% if document.locale == settings.WIKI_DEFAULT_LANGUAGE %}
<p>
{% if user.is_authenticated() %}
{% trans title=document.title %}
This forum is a discussion about improving the "{{ title }}" article.
{% endtrans %}
{% else %}
{% trans title=document.title, register_url=url('users.register') %}
This forum is a discussion about improving the "{{ title }}" article. If
you'd like to participate, please <a href="{{ register_url }}">register</a>.
{% endtrans %}
{% endif %}
</p>
{% else %}
<p>
{% trans title=document.title,
url=url('wiki.discuss.threads', document.parent.slug, locale='en-US') %}
This forum is a discussion about improving the localization of the
"{{ title }}" article. If you want to improve the article content,
go to the <a href="{{ url }}">English article discussion</a>.
{% endtrans %}
{% endif %}
</p>
</p>
{% endif %}
<p>
{% trans aaq_url=url('questions.new_question') %}
If you need help with Firefox, please <a href="{{ aaq_url }}">ask a question</a>.
Expand Down
2 changes: 1 addition & 1 deletion apps/kbforums/templates/kbforums/new_thread.html
Expand Up @@ -2,7 +2,7 @@
{% extends "kbforums/base.html" %}
{% from "layout/errorlist.html" import errorlist %}
{% from "includes/common_macros.html" import content_editor %}
{% from "kbforums/includes/macros.html" import kbforums_warning %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {d} is the name of the document. #}
{% set title = _('Create a new thread | {d} | Knowledge Base')|f(d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
Expand Down
2 changes: 1 addition & 1 deletion apps/kbforums/templates/kbforums/posts.html
Expand Up @@ -2,7 +2,7 @@
{% extends "kbforums/base.html" %}
{% from "layout/errorlist.html" import errorlist %}
{% from "includes/common_macros.html" import content_editor %}
{% from "kbforums/includes/macros.html" import kbforums_warning %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {t} is the title of the thread. {d} is the name of the document. #}
{% set title = _('{t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
Expand Down
2 changes: 1 addition & 1 deletion apps/kbforums/templates/kbforums/threads.html
@@ -1,6 +1,6 @@
{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "kbforums/base.html" %}
{% from "kbforums/includes/macros.html" import kbforums_warning %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {d} is the name of the document. #}
{% set title = _('{d} Discussion | Knowledge Base')|f(d=document.title) %}
{% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),
Expand Down

0 comments on commit a9747be

Please sign in to comment.