Commits

Bela Hausmann committed 5f569b5 Merge

merged in default

Comments (0)

Files changed (11)

 7) customize.
 8) Create bug reports and patches! :p
 
+
+NOTES:
+1) If you want repository information in the About page, make sure your web server has write
+   priviliges in the .hg directory of your repo, so that Mercurial can create its lock files.
+   Also, add your web server's user in /etc/mercurial/hgrc using something like:
+
+   [trusted]
+   groups = apache

locale/de/LC_MESSAGES/django.mo

Binary file modified.

locale/de/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: genmap\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-06 18:49+0200\n"
-"PO-Revision-Date: 2010-02-05 15:00+0100\n"
+"POT-Creation-Date: 2010-02-08 22:19+0200\n"
+"PO-Revision-Date: 2010-02-08 21:20+0100\n"
 "Last-Translator: Bela Hausmann <post@belahausmann.name>\n"
 "Language-Team: \n"
 "MIME-Version: 1.0\n"
 
 #: profile/forms.py:27
 msgid "You must place a marker on the map first"
-msgstr ""
+msgstr "Bitte zuerst Punkt auf der Karte auswählen"
 
 #: profile/forms.py:39
 msgid "Filter"
 msgid "If this error persists, contact arcanum AT kill9 DOT org."
 msgstr ""
 
-#: templates/about.html:6
+#: templates/about.html:7
 msgid "on Google Maps"
+msgstr "auf Google Maps"
+
+#: templates/about.html:10
+#, python-format
+msgid ""
+"%(domain)s is a place where %(community)s users can register their location "
+"so that we can visualize our larger community and local communities around "
+"the world on Google Maps."
 msgstr ""
 
-#: templates/about.html:7
+#: templates/about.html:11
 msgid ""
-"Gentoo-users.org is a place where Gentoo users can register their location "
-"so that we can visualize our larger community and local communities on "
-"Google Maps."
-msgstr ""
-
-#: templates/about.html:8
-msgid ""
-"Originally inspired by the djangopeople.net project and the effort by gentoo "
-"developer 'agorf' http://dev.gentoo.org/~agorf/users/."
-msgstr ""
-
-#: templates/about.html:9
-msgid "Created by Konstantinos Metaxas a.k.a 'arcanum' "
+"Originally inspired by the <a href=\"http://djangopeople.net/\" rel="
+"\"external\">Django People</a> project and the effort by gentoo developer <a "
+"href=\"http://dev.gentoo.org/~agorf/users/\" rel=\"external\">agorf</a>."
 msgstr ""
 
 #: templates/about.html:12
-msgid "There are currently"
+msgid "Created by Konstantinos Metaxas a.k.a 'arcanum'."
 msgstr ""
 
-#: templates/about.html:12
-msgid "profiles"
-msgstr "Profile"
+#: templates/about.html:13
+msgid ""
+"Extra coding power by <a href=\"http://gentoo-users.org/user/and3k/\">Bela "
+"Hausmann a.k.a. and3k</a>."
+msgstr ""
+
+#: templates/about.html:14
+#, python-format
+msgid "There are currently %(profile_count)s profiles."
+msgstr ""
+
+#: templates/about.html:15
+msgid ""
+"This website is made using the <a href=\"http://www.djangoproject.com\" rel="
+"\"external\">Django</a> framework and the Django <em>gis</em> extensions."
+msgstr ""
 
 #: templates/about.html:16
 msgid ""
 "Many thanks to the Official BETA tester and general 'Why doesn't this "
-"Work?!' guy "
+"Work?!' guy <a href=\"http://gentoo-users.org/user/homunculus/\">Homunculus</"
+"a>."
 msgstr ""
 
 #: templates/about.html:17
 msgid "Locate %(community)s users near you."
 msgstr "Finde %(community)s User in deiner Nähe."
 
+#: templates/base.html:71 templates/privacy.html:6
+msgid "Privacy statement"
+msgstr ""
+
+#: templates/base.html:73
+msgid "powered by "
+msgstr ""
+
 #: templates/index.html:17
 #, python-format
 msgid "Find %(community)s users near you"
 msgid "I am sorry, but Google Maps is not compatibly with your browser"
 msgstr ""
 
-#: templates/privacy.html:6
-msgid "Privacy statement"
-msgstr ""
-
 #: templates/privacy.html:7
 msgid ""
 "\n"
 #: templates/marks/view.html:51
 #, python-format
 msgid "%(community)s users near %(name)s"
-msgstr "%(community)s User in deiner Nähe von %(name)s"
+msgstr "%(community)s User in der Nähe von %(name)s"
 
 #: templates/marks/view.html:61
 msgid "Km"
 
 #: templates/marks/view_blank.html:19
 msgid "Viewing map"
-msgstr "Zeige Karte"
+msgstr ""
 
 #: templates/marks/view_blank.html:19
 msgid " of users in"

locale/el/LC_MESSAGES/django.mo

Binary file modified.

locale/el/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-06 18:49+0200\n"
+"POT-Creation-Date: 2010-02-08 22:19+0200\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"
 msgid "If this error persists, contact arcanum AT kill9 DOT org."
 msgstr ""
 
-#: templates/about.html:6
+#: templates/about.html:7
 msgid "on Google Maps"
 msgstr ""
 
-#: templates/about.html:7
+#: templates/about.html:10
+#, python-format
 msgid ""
-"Gentoo-users.org is a place where Gentoo users can register their location "
-"so that we can visualize our larger community and local communities on "
-"Google Maps."
+"%(domain)s is a place where %(community)s users can register their location "
+"so that we can visualize our larger community and local communities around "
+"the world on Google Maps."
 msgstr ""
 
-#: templates/about.html:8
+#: templates/about.html:11
 msgid ""
-"Originally inspired by the djangopeople.net project and the effort by gentoo "
-"developer 'agorf' http://dev.gentoo.org/~agorf/users/."
-msgstr ""
-
-#: templates/about.html:9
-msgid "Created by Konstantinos Metaxas a.k.a 'arcanum' "
+"Originally inspired by the <a href=\"http://djangopeople.net/\" rel="
+"\"external\">Django People</a> project and the effort by gentoo developer <a "
+"href=\"http://dev.gentoo.org/~agorf/users/\" rel=\"external\">agorf</a>."
 msgstr ""
 
 #: templates/about.html:12
-msgid "There are currently"
+msgid "Created by Konstantinos Metaxas a.k.a 'arcanum'."
 msgstr ""
 
-#: templates/about.html:12
-msgid "profiles"
+#: templates/about.html:13
+msgid ""
+"Extra coding power by <a href=\"http://gentoo-users.org/user/and3k/\">Bela "
+"Hausmann a.k.a. and3k</a>."
+msgstr ""
+
+#: templates/about.html:14
+#, python-format
+msgid "There are currently %(profile_count)s profiles."
+msgstr ""
+
+#: templates/about.html:15
+msgid ""
+"This website is made using the <a href=\"http://www.djangoproject.com\" rel="
+"\"external\">Django</a> framework and the Django <em>gis</em> extensions."
 msgstr ""
 
 #: templates/about.html:16
 msgid ""
 "Many thanks to the Official BETA tester and general 'Why doesn't this "
-"Work?!' guy "
+"Work?!' guy <a href=\"http://gentoo-users.org/user/homunculus/\">Homunculus</"
+"a>."
 msgstr ""
 
 #: templates/about.html:17
 msgid "Locate %(community)s users near you."
 msgstr ""
 
+#: templates/base.html:71 templates/privacy.html:6
+msgid "Privacy statement"
+msgstr ""
+
+#: templates/base.html:73
+msgid "powered by "
+msgstr ""
+
 #: templates/index.html:17
 #, python-format
 msgid "Find %(community)s users near you"
 msgid "I am sorry, but Google Maps is not compatibly with your browser"
 msgstr ""
 
-#: templates/privacy.html:6
-msgid "Privacy statement"
-msgstr ""
-
 #: templates/privacy.html:7
 msgid ""
 "\n"

locale/en/LC_MESSAGES/django.mo

Binary file modified.

locale/en/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-06 18:49+0200\n"
+"POT-Creation-Date: 2010-02-08 22:19+0200\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"
 msgid "If this error persists, contact arcanum AT kill9 DOT org."
 msgstr ""
 
-#: templates/about.html:6
+#: templates/about.html:7
 msgid "on Google Maps"
 msgstr ""
 
-#: templates/about.html:7
+#: templates/about.html:10
+#, python-format
 msgid ""
-"Gentoo-users.org is a place where Gentoo users can register their location "
-"so that we can visualize our larger community and local communities on "
-"Google Maps."
+"%(domain)s is a place where %(community)s users can register their location "
+"so that we can visualize our larger community and local communities around "
+"the world on Google Maps."
 msgstr ""
 
-#: templates/about.html:8
+#: templates/about.html:11
 msgid ""
-"Originally inspired by the djangopeople.net project and the effort by gentoo "
-"developer 'agorf' http://dev.gentoo.org/~agorf/users/."
-msgstr ""
-
-#: templates/about.html:9
-msgid "Created by Konstantinos Metaxas a.k.a 'arcanum' "
+"Originally inspired by the <a href=\"http://djangopeople.net/\" rel="
+"\"external\">Django People</a> project and the effort by gentoo developer <a "
+"href=\"http://dev.gentoo.org/~agorf/users/\" rel=\"external\">agorf</a>."
 msgstr ""
 
 #: templates/about.html:12
-msgid "There are currently"
+msgid "Created by Konstantinos Metaxas a.k.a 'arcanum'."
 msgstr ""
 
-#: templates/about.html:12
-msgid "profiles"
+#: templates/about.html:13
+msgid ""
+"Extra coding power by <a href=\"http://gentoo-users.org/user/and3k/\">Bela "
+"Hausmann a.k.a. and3k</a>."
+msgstr ""
+
+#: templates/about.html:14
+#, python-format
+msgid "There are currently %(profile_count)s profiles."
+msgstr ""
+
+#: templates/about.html:15
+msgid ""
+"This website is made using the <a href=\"http://www.djangoproject.com\" rel="
+"\"external\">Django</a> framework and the Django <em>gis</em> extensions."
 msgstr ""
 
 #: templates/about.html:16
 msgid ""
 "Many thanks to the Official BETA tester and general 'Why doesn't this "
-"Work?!' guy "
+"Work?!' guy <a href=\"http://gentoo-users.org/user/homunculus/\">Homunculus</"
+"a>."
 msgstr ""
 
 #: templates/about.html:17
 msgid "Locate %(community)s users near you."
 msgstr ""
 
+#: templates/base.html:71 templates/privacy.html:6
+msgid "Privacy statement"
+msgstr ""
+
+#: templates/base.html:73
+msgid "powered by "
+msgstr ""
+
 #: templates/index.html:17
 #, python-format
 msgid "Find %(community)s users near you"
 msgid "I am sorry, but Google Maps is not compatibly with your browser"
 msgstr ""
 
-#: templates/privacy.html:6
-msgid "Privacy statement"
-msgstr ""
-
 #: templates/privacy.html:7
 msgid ""
 "\n"

profile/templatetags/marktag.py

 from django import template
 from django.conf import settings
 from genmap.profile.models import Profile
+
+if settings.GRAVATAR:
+    from gravatar.templatetags.gravatar_tags import gravatar_for_user
+
+
 register = template.Library()
 
 @register.inclusion_tag('marks/ttags/latestmarks.html')
         if large: src = mark.avatar.extra_thumbnails['large']
         else: src = mark.avatar.thumbnail
     elif settings.GRAVATAR:
-        from gravatar.templatetags.gravatar_tags import gravatar_for_user
         src = gravatar_for_user(mark.user, size)
     else:
         src = settings.DEFAULT_AVATAR
 # -*- coding: utf-8
+from subprocess import Popen, PIPE
 from django.utils.translation import ugettext as _
 from django.utils.simplejson.encoder import JSONEncoder
 from django.shortcuts import render_to_response,get_object_or_404
     View the about page
     """
     profile_count = Profile.objects.count()
+    
+    revision = dict()
+    try:
+        from mercurial import ui, hg, commands
+        ui = ui.ui()
+        PROJECT_ROOT = getattr(settings,'PROJECT_ROOT','.')
+        repo = hg.repository(ui, PROJECT_ROOT)
+        ui.pushbuffer()
+        commands.identify(ui,repo,id=True,num=True)
+        revision.update(dict(zip(('i','n'),ui.popbuffer().split())))
+    except ImportError:
+        # Hmm, If we get an ImportError here i doubt that the 'hg' command will
+        # work. It uses the same Python API.
+        revision['i'] = Popen(['hg', 'identify', '-i'], stdout = PIPE).communicate()[0].strip()
+        revision['n'] = Popen(['hg', 'identify', '-n'], stdout = PIPE).communicate()[0].strip()
 
     return render_to_response('about.html',
             {
+                'revision': revision,
                 'profile_count':profile_count,
                 },
         context_instance=RequestContext(request))

templates/about.html

-{% extends "base.html"%}
-{%load i18n%}
+{% extends "base.html" %}
 
+{% load i18n %}
 
 {% block content %}
-<h1>Gentoo users - {% trans "on Google Maps"%}</h1>
-<p>{% trans "Gentoo-users.org is a place where Gentoo users can register their location so that we can visualize our larger community and local communities on Google Maps."%}</p>
-<p>{%trans "Originally inspired by the djangopeople.net project and the effort by gentoo developer 'agorf' http://dev.gentoo.org/~agorf/users/."%}</p>
-<p> {%trans "Created by Konstantinos Metaxas a.k.a 'arcanum' "%}</p>
 
-<br/>
-<p>{%trans "There are currently"%} {{profile_count}} {%trans "profiles"%}</p>
-<p>This website is made using the <a href="http://www.djangoproject.com">Django</a> framework and the Django <em>gis</em> extensions.
-</p>
+<h1>{{ this_site.name }} &ndash; {% trans "on Google Maps" %}</h1>
 
-<p>{%trans "Many thanks to the Official BETA tester and general 'Why doesn't this Work?!' guy "%} <a href="{%url view-profile "homunculus"%}">Homunculus</a>
-<p>{% trans "If you need to contact us, email us at "%}<a href="mailto:admin@gentoo-users.org">admin@gentoo-users.org</a> </p>
+<ul>
+    <li>{% blocktrans with this_site.name as name and this_site.domain as domain and community.name as community %}{{ domain }} is a place where {{ community }} users can register their location so that we can visualize our larger community and local communities around the world on Google Maps.{% endblocktrans %}</li>
+    <li>{% blocktrans %}Originally inspired by the <a href="http://djangopeople.net/" rel="external">Django People</a> project and the effort by gentoo developer <a href="http://dev.gentoo.org/~agorf/users/" rel="external">agorf</a>.{% endblocktrans %}</li>
+    <li>{% trans "Created by Konstantinos Metaxas a.k.a 'arcanum'." %}</li>
+    <li>{% blocktrans %}Extra coding power by <a href="http://gentoo-users.org/user/and3k/">Bela Hausmann a.k.a. and3k</a>.{% endblocktrans %}</li>
+    <li>{% blocktrans %}There are currently {{profile_count}} profiles.{% endblocktrans %}</li>
+    <li>{% blocktrans %}This website is made using the <a href="http://www.djangoproject.com" rel="external">Django</a> framework and the Django <em>gis</em> extensions.{% endblocktrans %}</li>
+    <li>{% blocktrans %}Many thanks to the Official BETA tester and general 'Why doesn't this Work?!' guy <a href="http://gentoo-users.org/user/homunculus/">Homunculus</a>.{% endblocktrans %}</li>
+    <li>{% trans "If you need to contact us, email us at " %}<a href="mailto:admin@gentoo-users.org">admin@gentoo-users.org</a>.</li>
+    <li>{% trans "Powered by " %} <a href="http://bitbucket.org/arcanum/genmap/">genmap</a> (<code>r{{ revision.n }}:{{ revision.i }}</code>)</li>
+</ul>
 
-
-
-{%endblock %}
-
+{% endblock %}

templates/base.html

 				{%endblock %}
 			</div>
 			{%endblock twocolumns%}
-			<div id="footer">
 
-				<span id="design-by">Design by <a href="#">What design?</a></span>
-				Copyright &copy; <a href="http://kill9.eu">Arcanum</a> ||
-				<a href="{%url privacy%}">Privacy statement</a>
-			</div>
+            {% with "||" as spacer %}
+            <div id="footer">
+                <span id="design-by">Design by <a href="#">What design?</a></span>
+                Copyright &copy; <a href="http://kill9.eu">Arcanum</a>
+                {{ spacer }}
+                <a href="{% url privacy %}">{% trans "Privacy statement" %}</a>
+                {{ spacer }}
+                {% trans "powered by " %} <a href="http://bitbucket.org/arcanum/genmap/">genmap</a>
+            </div>
+            {% endwith %}
 		</div>
 
 		{%block endjsblock %}