damned-lies r1138 - in branches/djamnedlies: . languages people stats templates templates/languages templates/teams
- From: claudep svn gnome org
- To: svn-commits-list gnome org
- Subject: damned-lies r1138 - in branches/djamnedlies: . languages people stats templates templates/languages templates/teams
- Date: Fri, 7 Nov 2008 17:29:49 +0000 (UTC)
Author: claudep
Date: Fri Nov 7 17:29:48 2008
New Revision: 1138
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1138&view=rev
Log:
2008-11-07 Claude Paroz <claude 2xlibre net>
* people/models.py: Set default ordering for people.
* languages/urls.py:
* languages/views.py:
* stats/models.py:
* stats/views.py:
* templates/languages/language_release.html:
* templates/release.html:
* templates/release_list.html:
* templates/stats_show.html:
* templates/teams/team_detail.html:
* urls.py: Use (slug) release.name instead of id in release URLs.
Modified:
branches/djamnedlies/ChangeLog
branches/djamnedlies/languages/urls.py
branches/djamnedlies/languages/views.py
branches/djamnedlies/people/models.py
branches/djamnedlies/stats/models.py
branches/djamnedlies/stats/views.py
branches/djamnedlies/templates/languages/language_release.html
branches/djamnedlies/templates/release.html
branches/djamnedlies/templates/release_list.html
branches/djamnedlies/templates/stats_show.html
branches/djamnedlies/templates/teams/team_detail.html
branches/djamnedlies/urls.py
Modified: branches/djamnedlies/languages/urls.py
==============================================================================
--- branches/djamnedlies/languages/urls.py (original)
+++ branches/djamnedlies/languages/urls.py Fri Nov 7 17:29:48 2008
@@ -2,5 +2,5 @@
urlpatterns = patterns('',
url(r'^$', 'languages.views.languages', name='languages'),
- url(r'(?P<locale>\w+)/(?P<release_id>\d+)/$', 'languages.views.language_release', name='language_release'),
+ url(r'(?P<locale>\w+)/(?P<release_name>[\w-]+)/$', 'languages.views.language_release', name='language_release'),
)
Modified: branches/djamnedlies/languages/views.py
==============================================================================
--- branches/djamnedlies/languages/views.py (original)
+++ branches/djamnedlies/languages/views.py Fri Nov 7 17:29:48 2008
@@ -31,9 +31,9 @@
}
return render_to_response('languages/language_list.html', context)
-def language_release(request, locale, release_id):
+def language_release(request, locale, release_name):
language = Language.objects.get(locale=Language.unslug_locale(locale))
- release = Release.objects.get(pk=release_id)
+ release = Release.objects.get(name=release_name)
stats = release.get_lang_stats(language)
context = {
'pageSection': "languages",
Modified: branches/djamnedlies/people/models.py
==============================================================================
--- branches/djamnedlies/people/models.py (original)
+++ branches/djamnedlies/people/models.py Fri Nov 7 17:29:48 2008
@@ -24,6 +24,7 @@
class Meta:
db_table = 'person'
+ ordering = ('username',)
def save(self):
if not self.password or self.password == "!":
Modified: branches/djamnedlies/stats/models.py
==============================================================================
--- branches/djamnedlies/stats/models.py (original)
+++ branches/djamnedlies/stats/models.py Fri Nov 7 17:29:48 2008
@@ -461,7 +461,7 @@
ordering = ('status', '-name')
def __unicode__(self):
- return self.name
+ return self.description
def total_strings(self):
""" Returns the total number of strings in the release as a tuple (doc_total, ui_total) """
@@ -515,7 +515,7 @@
GROUP BY domain.dtype"""
cursor = connection.cursor()
cursor.execute(query, (lang.id, self.id))
- stats = {'id': self.id, 'name': _(self.name),
+ stats = {'id': self.id, 'name': self.name, 'description': _(self.description),
'uitrans': 0, 'uifuzzy': 0, 'uitotal': total_ui,
'doctrans': 0, 'docfuzzy': 0, 'doctotal': total_doc,
'uitransperc': 0, 'uifuzzyperc': 0, 'uiuntransperc': 0,
Modified: branches/djamnedlies/stats/views.py
==============================================================================
--- branches/djamnedlies/stats/views.py (original)
+++ branches/djamnedlies/stats/views.py Fri Nov 7 17:29:48 2008
@@ -65,8 +65,8 @@
}
return render_to_response('release_list.html', context)
-def release(request, release_id):
- rel = Release.objects.get(id=release_id)
+def release(request, release_name):
+ rel = Release.objects.get(name=release_name)
context = {
'pageSection': "releases",
'release': rel
Modified: branches/djamnedlies/templates/languages/language_release.html
==============================================================================
--- branches/djamnedlies/templates/languages/language_release.html (original)
+++ branches/djamnedlies/templates/languages/language_release.html Fri Nov 7 17:29:48 2008
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
-{% block title %} {% trans release.name %} - {% trans language.name %}{% endblock %}
+{% block title %} {% trans release.description %} - {% trans language.name %}{% endblock %}
{% block content %}
<div class="mainpage">
@@ -50,7 +50,7 @@
{% endif %}
{% endwith %}
-<h2>{% trans release.name %}</h2>
+<h2>{% trans release.description %}</h2>
<p id="hide">
<a href="#" onclick="return showHideCompleted();">{% trans "Hide completed modules" %}</a>
Modified: branches/djamnedlies/templates/release.html
==============================================================================
--- branches/djamnedlies/templates/release.html (original)
+++ branches/djamnedlies/templates/release.html Fri Nov 7 17:29:48 2008
@@ -1,13 +1,13 @@
{% extends "base.html" %}
{% load i18n %}
-{% block title %} {% trans release.name %} {% endblock %}
+{% block title %} {% trans release.description %} {% endblock %}
{% block content %}
<div class="mainpage">
-<h1>{% blocktrans with release.name as name %}{{ name }} Release{% endblocktrans %}</h1>
+<h1>{% blocktrans with release.description as name %}{{ name }} Release{% endblocktrans %}</h1>
{% ifequal release.status "external" %}
<p><i>{% trans "The modules of this release are not part of the GNOME SVN repository. Please check each module's web page to see where to send translations." %}</i></p>
@@ -19,7 +19,7 @@
{% for lstats in release.get_global_stats %}
<tr>
<td class="leftcell" style="font-size:120%;">
- <a href="{% url language_release locale=lstats.lang_locale release_id=release.id %}">{% trans lstats.lang_name %}</a>
+ <a href="{% url language_release locale=lstats.lang_locale release_name=release.name %}">{% trans lstats.lang_name %}</a>
</td>
{% ifnotequal lstats.doc_trans|add:lstats.doc_fuzzy "0" %}
Modified: branches/djamnedlies/templates/release_list.html
==============================================================================
--- branches/djamnedlies/templates/release_list.html (original)
+++ branches/djamnedlies/templates/release_list.html Fri Nov 7 17:29:48 2008
@@ -17,7 +17,7 @@
<ul class="foot">
{% endifchanged %}
<li style="font-size: 120%;">
- <a href="{% url stats.views.release rel.id %}">{% trans rel.name %}</a>
+ <a href="{% url stats.views.release rel.name %}">{% trans rel.description %}</a>
</li>
{% endfor %}
Modified: branches/djamnedlies/templates/stats_show.html
==============================================================================
--- branches/djamnedlies/templates/stats_show.html (original)
+++ branches/djamnedlies/templates/stats_show.html Fri Nov 7 17:29:48 2008
@@ -40,7 +40,7 @@
</td>
<td>{{ line.get_translationstat|safe }}</td>
{% if stat1.fig_count %}
- <td><a href="{{ webroot }}/module/{{ module.name }}/{{ stat1.domain.name }}/{{ branch.name }}/{{ line.language.locale}}/images">
+ <td><a href="{{ webroot }}module/{{ module.name }}/{{ stat1.domain.name }}/{{ branch.name }}/{{ line.language.locale}}/images">
<img src="/media/img/figure.png" alt="{% trans "Display document figures" %}"></a></td>
{% endif %}
<td style="width: 108px; text-align: center;"><div class="graph">
Modified: branches/djamnedlies/templates/teams/team_detail.html
==============================================================================
--- branches/djamnedlies/templates/teams/team_detail.html (original)
+++ branches/djamnedlies/templates/teams/team_detail.html Fri Nov 7 17:29:48 2008
@@ -52,7 +52,7 @@
{% for stat in lang.get_release_stats %}
<tr>
<td class="leftcell" style="font-size:120%;">
- <a href="{% url language_release lang.locale,stat.id %}">{{ stat.name }}</a>
+ <a href="{% url language_release lang.locale,stat.name %}">{{ stat.description }}</a>
</td>
{% if stat.doctotal %}
Modified: branches/djamnedlies/urls.py
==============================================================================
--- branches/djamnedlies/urls.py (original)
+++ branches/djamnedlies/urls.py Fri Nov 7 17:29:48 2008
@@ -1,5 +1,6 @@
from django.conf.urls.defaults import *
from django.conf import settings
+from stats.conf import settings as stats_settings
from django.contrib import admin
admin.autodiscover()
@@ -18,11 +19,13 @@
(r'^module/(?P<module_name>[\w\-\+]+)$', 'module'),
(r'^module/(?P<module_name>[\w\-\+]+)/(?P<potbase>\w+)/(?P<branch_name>[\w-]+)/(?P<langcode>\w+)/images/$', 'docimages'),
url(r'^releases/$', 'releases', name='releases'),
- (r'^releases/(?P<release_id>\d+)$', 'release'),
+ (r'^releases/(?P<release_name>[\w-]+)$', 'release'),
)
if settings.STATIC_SERVE:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
+ (r'^POT/(?P<path>.*)$', 'django.views.static.serve',
+ {'document_root': stats_settings.POTDIR}),
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]