Skip to content

Commit

Permalink
enable i18n issue mozillahispano#8
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoduncan21 committed May 28, 2014
1 parent ee4219e commit 8b94923
Show file tree
Hide file tree
Showing 12 changed files with 310 additions and 18 deletions.
Binary file added locale/es/LC_MESSAGES/django.mo
Binary file not shown.
258 changes: 258 additions & 0 deletions locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-05-27 20:10-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: mozbuzz/buzz/templates/buzz/delete_mention.html:5
#: mozbuzz/buzz/templates/buzz/delete_mention.html:19
msgid "Are you sure?"
msgstr ""

#: mozbuzz/buzz/templates/buzz/delete_mention.html:8
msgid "Are you sure you want to delete the mention "
msgstr ""

#: mozbuzz/buzz/templates/buzz/delete_mention.html:8
msgid "? All of the following related items will be deleted:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/followup.html:7
#: mozbuzz/buzz/templates/buzz/mention.html:47
msgid "Submit"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:8
msgid "Search by keyword"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:10
msgid "Mentions"
msgstr "Menciones"

#: mozbuzz/buzz/templates/buzz/index.html:18
#: mozbuzz/buzz/templates/buzz/mention_view.html:13
msgid "Original page"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:22
msgid "Audience:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:26
msgid "Author"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:37
msgid "feedback"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:40
msgid "Updated"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:45
#: mozbuzz/buzz/templates/buzz/mention_view.html:46
msgid "Relevant audience"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:57
#: mozbuzz/buzz/templates/buzz/mention_view.html:37
msgid "Remarks:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:69
#: mozbuzz/buzz/templates/buzz/index.html:77
#: mozbuzz/buzz/templates/buzz/mention_view.html:58
#: mozbuzz/buzz/templates/buzz/mention_view.html:66
msgid "Add followup"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:75
#: mozbuzz/buzz/templates/buzz/mention_view.html:64
msgid "Followups"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:75
#: mozbuzz/buzz/templates/buzz/mention_view.html:64
msgid "show"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:81
#: mozbuzz/buzz/templates/buzz/mention_view.html:70
msgid "Edit"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:84
#: mozbuzz/buzz/templates/buzz/queue.html:10
msgid "Delete"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:89
msgid "No mentions found."
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:98
msgid "Feedback type"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:106
msgid "Country"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:114
msgid "Product"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:122
msgid "Type"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:130
msgid "Origin"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:138
msgid "Author expertise"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:146
msgid "Update rate"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:153
msgid "Hold down shift to select multiple options"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:158
msgid "Audience"
msgstr ""

#: mozbuzz/buzz/templates/buzz/index.html:164
msgid "\"Update results\""
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention.html:25
msgid "Guess Information"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention.html:26
msgid "Don't guess"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention.html:30
msgid "The following possible duplicates were found:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention.html:41
msgid "Unknown"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention_view.html:17
msgid "Estimate audience:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention_view.html:18
msgid "persons."
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention_view.html:21
msgid "Author type:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention_view.html:25
msgid "Country:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention_view.html:29
msgid "Product:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention_view.html:33
msgid "Feedback:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/mention_view.html:41
msgid "Updated:"
msgstr ""

#: mozbuzz/buzz/templates/buzz/queue.html:9 mozbuzz/templates/base.html:22
msgid "File report"
msgstr ""

#: mozbuzz/templates/base.html:21
msgid "Overview"
msgstr ""

#: mozbuzz/templates/base.html:23
msgid "Queue"
msgstr ""

#: mozbuzz/templates/base.html:54
#, python-format
msgid ""
"\n"
" Welcome back %(username)s! Let's buzz!\n"
" "
msgstr ""

#: mozbuzz/templates/base.html:61
msgid "Change Password"
msgstr ""

#: mozbuzz/templates/login.html:5
msgid "There isn't an account with that email, or Persona verification failled"
msgstr ""

#: mozbuzz/templates/login.html:14
msgid ""
"\n"
" \tYou need to have a Mozbuzz account to use this feature. If you "
"have a Mozbuzz account, log-in in the form beside. If you don't have a "
"Mozbuzz account and you think you should, email <a href=\"mailto:"
"tecnico@mozilla-hispano.org\">tecnico@mozilla-hispano.org</a>.\n"
" \t"
msgstr ""

#: mozbuzz/templates/logout.html:5
msgid "You have successfully logged out."
msgstr ""

#: mozbuzz/templates/logout.html:5
msgid "Login again"
msgstr ""

#: mozbuzz/templates/password_change.html:7
msgid "Change password"
msgstr ""

#: mozbuzz/templates/password_change.html:14
msgid ""
"\n"
" \tIn this form you can change your password. If you don't remember "
"your current password, email <a href=\"mailto:tecnico@mozilla-hispano.org"
"\">tecnico@mozilla-hispano.org</a>.\n"
" "
msgstr ""

#: mozbuzz/templates/password_change_done.html:5
msgid "You have successfully changed your password."
msgstr ""

#: mozbuzz/templates/password_change_done.html:5
msgid "Go to the home page"
msgstr ""
2 changes: 1 addition & 1 deletion mozbuzz/buzz/templates/buzz/followup.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<form method="post">
{% csrf_token %}
{{ form.as_ul }}
<input type="submit" value="Submit" />
<input type="submit" value="{% trans "Submit" %}" />
</form>
{% endblock %}
4 changes: 2 additions & 2 deletions mozbuzz/buzz/templates/buzz/mention.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>
{% endif %}
<div id="duplicates" class="errorlist hidden">
The following possible duplicates were found:
{% trans "The following possible duplicates were found:" %}
<ul id="duplicates-list"></ul>
</div>
<div id="mention_form_otherfields_cnt" {% if is_new %}style="display: none"{% endif %}>
Expand All @@ -44,7 +44,7 @@
</div>
{% endif %}
{% endfor %}
<input type="submit" value="Submit" />
<input type="submit" value="{% trans "Submit" %}" />
</div>
</form>
{% endblock %}
Expand Down
11 changes: 6 additions & 5 deletions mozbuzz/buzz/templates/buzz/mention_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% endif%}
<li>
<span>{%trans "Estimate audience:"%}</span>
{{ mention.estimated_audience }} persons.
{{ mention.estimated_audience }} {% trans "persons." %}
</li>
<li>
<span>{%trans "Author type:"%}</span>
Expand Down Expand Up @@ -54,19 +54,20 @@
<p>{{ followup.remarks|markdown }}</p>
</div>
{% endfor %}
<a class="add-followup-inline" href="{% url "followup_new" mention.pk %}">Add followup</a>
<a class="add-followup-inline" href="{% url "followup_new" mention.pk %}">
{% trans "Add followup" %}</a>
</div>
<ul class="meta">
<li>Added by {{ mention.creation_user }} on {{ mention.creation_date }}</li>
<li>
{% if mention.followups %}
{{mention.followups|length}} Followups (<a href="#" class="followups-show">show</a>)
{{mention.followups|length}} {% trans "Followups" %} (<a href="#" class="followups-show">{% trans "show" %}</a>)
{% else %}
<a href="{% url "followup_new" mention.pk %}">Add followup</a>
<a href="{% url "followup_new" mention.pk %}">{% trans "Add followup" %}</a>
{% endif %}
</li>
{% if user.is_authenticated %}
<li><a href="{% url "edit" mention.id %}">Edit</a></li>
<li><a href="{% url "edit" mention.id %}">{% trans "Edit" %}</a></li>
{% endif %}
</ul>
</li>
Expand Down
4 changes: 2 additions & 2 deletions mozbuzz/buzz/templates/buzz/queue.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<a class="mention-title" href="{{post.link}}">{{ post.title }}</a> (Via {{post.feed.name}})
<div class="feed_content markdown">{{post.description|safe}}</div>
<ul class="meta">
<li><a href="{% url "create" %}?url={{ post.link|urlencode:"" }}&rsspost={{ post.pk }}">File report</a></li>
<li><a href="#" onclick="delete_entry({{post.pk}}); return false;">Delete</a></li>
<li><a href="{% url "create" %}?url={{ post.link|urlencode:"" }}&rsspost={{ post.pk }}">{% trans "File report" %}</a></li>
<li><a href="#" onclick="delete_entry({{post.pk}}); return false;">{% trans "Delete" %}</a></li>
</ul>
</li>
{% endfor %}
Expand Down
9 changes: 9 additions & 0 deletions mozbuzz/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
)

ROOT_URLCONF = 'mozbuzz.urls'
Expand Down Expand Up @@ -193,3 +194,11 @@

# Path to redirect to on unsuccessful login attempt.
LOGIN_REDIRECT_URL_FAILURE = '/' + URL_PREFIX + 'accounts/login/?invalid=1'

# Includes automatically the tag in the all templates
from django.template import add_to_builtins
add_to_builtins('django.templatetags.i18n')

LOCALE_PATHS = (
os.path.join(PROJECT_DIR, '../locale'),
)
29 changes: 24 additions & 5 deletions mozbuzz/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,23 @@ <h1>
<a href="{% url "index" %}"><strong>Moz</strong>Buzz</a>
</h1>
<ul>
<li><a class="{% if view_name = "index" %}navactive{% endif %}" href="{% url "index" %}"><span>Overview</span></a></li>
<li><a class="{% if view_name = "mention" %}navactive{% endif %}" href="{% url "create" %}"><span>File report</span></a></li>
<li><a class="{% if view_name = "queue" %}navactive{% endif %}" href="{% url "queue" %}"><span>Queue <span id="queue_count">{{queue_count}}</span></span></a></li>
<li><a class="{% if view_name = "index" %}navactive{% endif %}" href="{% url "index" %}"><span>{% trans "Overview" %}</span></a></li>
<li><a class="{% if view_name = "mention" %}navactive{% endif %}" href="{% url "create" %}"><span>{% trans "File report" %}</span></a></li>
<li><a class="{% if view_name = "queue" %}navactive{% endif %}" href="{% url "queue" %}"><span>{% trans "Queue" %} <span id="queue_count">{{queue_count}}</span></span></a></li>
</ul>
<form action="{% url 'set_language' %}" method="post" style="display: inline;">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<select name="language">
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<input type="submit" value="Go" />
</form>
</div>
</div>
{% endblock %}
Expand All @@ -38,10 +51,16 @@ <h1>
<div id="user_box" class="col right">
{% if user.is_authenticated %}
<div class="block">
Welcome back {{user.username}}! Let's buzz!
{% blocktrans with username=user.username%}
Welcome back {{ username }}! Let's buzz!
{% endblocktrans %}
<ul class="login-actions">
<li>{% browserid_logout text='Logout' %}</li>
<li><a href="{% url "django.contrib.auth.views.password_change" %}">Change Password</a></li>
<li>
<a href="{% url "django.contrib.auth.views.password_change" %}">
{% trans "Change Password" %}
</a>
</li>
</ul>
</div>
{% else %}
Expand Down
Loading

0 comments on commit 8b94923

Please sign in to comment.