Merge remote branch 'upstream/master' into dev/mount_storage
Conflicts: mediagoblin/storage.py
This commit is contained in:
commit
ff94b4ce38
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,7 +10,8 @@ mediagoblin.egg-info
|
|||||||
*.pyo
|
*.pyo
|
||||||
docs/_build/
|
docs/_build/
|
||||||
user_dev/
|
user_dev/
|
||||||
mediagoblin_user.ini
|
paste_local.ini
|
||||||
|
mediagoblin_local.ini
|
||||||
server-log.txt
|
server-log.txt
|
||||||
*~
|
*~
|
||||||
*.swp
|
*.swp
|
||||||
|
8
.tx/config
Normal file
8
.tx/config
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[mediagoblin.mediagoblin]
|
||||||
|
file_filter = mediagoblin/i18n/<lang>/LC_MESSAGES/mediagoblin.po
|
||||||
|
source_file = mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po
|
||||||
|
source_lang = en
|
||||||
|
|
||||||
|
[main]
|
||||||
|
host = https://www.transifex.net
|
||||||
|
|
BIN
mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo
Normal file
BIN
mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo
Normal file
Binary file not shown.
25
mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po
Normal file
25
mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.po
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Translations template for PROJECT.
|
||||||
|
# Copyright (C) 2011 ORGANIZATION
|
||||||
|
# This file is distributed under the same license as the PROJECT project.
|
||||||
|
#
|
||||||
|
# <cwebber@dustycloud.org>, 2011.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: GNU MediaGoblin\n"
|
||||||
|
"Report-Msgid-Bugs-To: http://bugs.foocorp.net/projects/mediagoblin/issues\n"
|
||||||
|
"POT-Creation-Date: 2011-08-06 23:01-0500\n"
|
||||||
|
"PO-Revision-Date: 2011-08-07 14:06+0000\n"
|
||||||
|
"Last-Translator: cwebber <cwebber@dustycloud.org>\n"
|
||||||
|
"Language-Team: German (http://www.transifex.net/projects/p/mediagoblin/team/de/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 0.9.6\n"
|
||||||
|
"Language: de\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/root.html:21
|
||||||
|
msgid "Welcome to GNU MediaGoblin!"
|
||||||
|
msgstr "Willkommen bei GNU MediaGoblin!"
|
||||||
|
|
||||||
|
|
197
mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po
Normal file
197
mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
# Translations template for PROJECT.
|
||||||
|
# Copyright (C) 2011 ORGANIZATION
|
||||||
|
# This file is distributed under the same license as the PROJECT project.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PROJECT VERSION\n"
|
||||||
|
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||||
|
"POT-Creation-Date: 2011-08-08 10:20-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"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: Babel 0.9.6\n"
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/base.html:22
|
||||||
|
msgid "GNU MediaGoblin"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/base.html:45
|
||||||
|
msgid "Mediagoblin logo"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/base.html:51
|
||||||
|
msgid "Submit media"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/base.html:62
|
||||||
|
msgid "verify your email!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/base.html:72
|
||||||
|
msgid "Login"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/base.html:88
|
||||||
|
msgid ""
|
||||||
|
"Powered by <a href=\"http://mediagoblin.org\">MediaGoblin</a>, a <a "
|
||||||
|
"href=\"http://gnu.org/\">GNU project</a>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/root.html:21
|
||||||
|
msgid "Welcome to GNU MediaGoblin!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/root.html:26
|
||||||
|
msgid "Submit an item"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/root.html:31
|
||||||
|
#, python-format
|
||||||
|
msgid "If you have an account, you can <a href=\"%(login_url)s\">Login</a>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/root.html:37
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"If you don't have an account, please <a "
|
||||||
|
"href=\"%(register_url)s\">Register</a>."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/login.html:26
|
||||||
|
msgid "Log in"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/login.html:29
|
||||||
|
msgid "Login failed!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/login.html:34
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/register.html:30
|
||||||
|
#: mediagoblin/templates/mediagoblin/edit/edit_profile.html:35
|
||||||
|
#: mediagoblin/templates/mediagoblin/submit/start.html:32
|
||||||
|
msgid "Submit"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/login.html:42
|
||||||
|
msgid "Don't have an account yet?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/login.html:45
|
||||||
|
msgid "Create one here!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/register.html:27
|
||||||
|
msgid "Create an account!"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/resent_verification_email.html:22
|
||||||
|
msgid "Resent your verification email."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/auth/verification_email.txt:19
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Hi %(username)s,\n"
|
||||||
|
"\n"
|
||||||
|
"to activate your GNU MediaGoblin account, open the following URL in\n"
|
||||||
|
"your web browser:\n"
|
||||||
|
"\n"
|
||||||
|
"%(verification_url)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/edit/edit.html:29
|
||||||
|
#, python-format
|
||||||
|
msgid "Editing %(media_title)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/edit/edit.html:36
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/edit/edit.html:37
|
||||||
|
msgid "Save changes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/edit/edit_profile.html:29
|
||||||
|
#, python-format
|
||||||
|
msgid "Editing %(username)s's profile"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/listings/tag.html:29
|
||||||
|
msgid "Media tagged with:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/listings/tag.html:40
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/gallery.html:46
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:101
|
||||||
|
msgid "atom feed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/submit/start.html:26
|
||||||
|
msgid "Submit yer media"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/gallery.html:30
|
||||||
|
#, python-format
|
||||||
|
msgid "<a href=\"%(user_url)s\">%(username)s</a>'s media"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/gallery.html:51
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:30
|
||||||
|
msgid "Sorry, no such user found."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:37
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:57
|
||||||
|
msgid "Verification needed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:40
|
||||||
|
msgid "Almost done! Your account still needs to be verified."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:45
|
||||||
|
msgid "An email should arrive in a few moments with instructions on how to do so."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:49
|
||||||
|
msgid "In case it doesn't:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:52
|
||||||
|
msgid "Resend verification email"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:60
|
||||||
|
msgid ""
|
||||||
|
"Someone has registered an account with this username, but it still has to"
|
||||||
|
" be verified."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:66
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"If you are that person but you've lost your verification email, you can "
|
||||||
|
"<a href=\"%(login_url)s\">log in</a> and resend it."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:76
|
||||||
|
#, python-format
|
||||||
|
msgid "%(username)s's profile"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:84
|
||||||
|
msgid "Edit profile"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: mediagoblin/templates/mediagoblin/user_pages/user.html:95
|
||||||
|
#, python-format
|
||||||
|
msgid "View all of %(username)s's media"
|
||||||
|
msgstr ""
|
||||||
|
|
@ -19,6 +19,7 @@ from mediagoblin.db.util import ObjectId
|
|||||||
from celery.task import task
|
from celery.task import task
|
||||||
|
|
||||||
from mediagoblin import mg_globals as mgg
|
from mediagoblin import mg_globals as mgg
|
||||||
|
from contextlib import contextmanager
|
||||||
|
|
||||||
|
|
||||||
THUMB_SIZE = 180, 180
|
THUMB_SIZE = 180, 180
|
||||||
@ -31,6 +32,12 @@ def create_pub_filepath(entry, filename):
|
|||||||
unicode(entry['_id']),
|
unicode(entry['_id']),
|
||||||
filename])
|
filename])
|
||||||
|
|
||||||
|
@contextmanager
|
||||||
|
def closing(callback):
|
||||||
|
try:
|
||||||
|
yield callback
|
||||||
|
finally:
|
||||||
|
pass
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def process_media_initial(media_id):
|
def process_media_initial(media_id):
|
||||||
@ -53,7 +60,7 @@ def process_media_initial(media_id):
|
|||||||
thumb_filepath = create_pub_filepath(entry, 'thumbnail.jpg')
|
thumb_filepath = create_pub_filepath(entry, 'thumbnail.jpg')
|
||||||
|
|
||||||
thumb_file = mgg.public_store.get_file(thumb_filepath, 'w')
|
thumb_file = mgg.public_store.get_file(thumb_filepath, 'w')
|
||||||
with thumb_file:
|
with closing(thumb_file):
|
||||||
thumb.save(thumb_file, "JPEG", quality=90)
|
thumb.save(thumb_file, "JPEG", quality=90)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -73,7 +80,7 @@ def process_media_initial(media_id):
|
|||||||
medium_filepath = create_pub_filepath(entry, 'medium.jpg')
|
medium_filepath = create_pub_filepath(entry, 'medium.jpg')
|
||||||
|
|
||||||
medium_file = mgg.public_store.get_file(medium_filepath, 'w')
|
medium_file = mgg.public_store.get_file(medium_filepath, 'w')
|
||||||
with medium_file:
|
with closing(medium_file):
|
||||||
medium.save(medium_file, "JPEG", quality=90)
|
medium.save(medium_file, "JPEG", quality=90)
|
||||||
medium_processed = True
|
medium_processed = True
|
||||||
|
|
||||||
@ -84,7 +91,7 @@ def process_media_initial(media_id):
|
|||||||
with queued_file:
|
with queued_file:
|
||||||
original_filepath = create_pub_filepath(entry, queued_filepath[-1])
|
original_filepath = create_pub_filepath(entry, queued_filepath[-1])
|
||||||
|
|
||||||
with mgg.public_store.get_file(original_filepath, 'wb') as original_file:
|
with closing(mgg.public_store.get_file(original_filepath, 'wb')) as original_file:
|
||||||
original_file.write(queued_file.read())
|
original_file.write(queued_file.read())
|
||||||
|
|
||||||
mgg.queue_store.delete_file(queued_filepath)
|
mgg.queue_store.delete_file(queued_filepath)
|
||||||
|
@ -19,6 +19,7 @@ import re
|
|||||||
import shutil
|
import shutil
|
||||||
import urlparse
|
import urlparse
|
||||||
import uuid
|
import uuid
|
||||||
|
import cloudfiles
|
||||||
|
|
||||||
from werkzeug.utils import secure_filename
|
from werkzeug.utils import secure_filename
|
||||||
|
|
||||||
@ -28,11 +29,21 @@ from mediagoblin import util
|
|||||||
# Errors
|
# Errors
|
||||||
########
|
########
|
||||||
|
|
||||||
class Error(Exception): pass
|
|
||||||
class InvalidFilepath(Error): pass
|
|
||||||
class NoWebServing(Error): pass
|
|
||||||
|
|
||||||
class NotImplementedError(Error): pass
|
class Error(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidFilepath(Error):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class NoWebServing(Error):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class NotImplementedError(Error):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
###############################################
|
###############################################
|
||||||
@ -216,6 +227,65 @@ class BasicFileStorage(StorageInterface):
|
|||||||
return self._resolve_filepath(filepath)
|
return self._resolve_filepath(filepath)
|
||||||
|
|
||||||
|
|
||||||
|
class CloudFilesStorage(StorageInterface):
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
self.param_container = kwargs.get('cloudfiles_container')
|
||||||
|
self.param_user = kwargs.get('cloudfiles_user')
|
||||||
|
self.param_api_key = kwargs.get('cloudfiles_api_key')
|
||||||
|
self.param_host = kwargs.get('cloudfiles_host')
|
||||||
|
self.param_use_servicenet = kwargs.get('cloudfiles_use_servicenet')
|
||||||
|
|
||||||
|
if not self.param_host:
|
||||||
|
print('No CloudFiles host URL specified, '
|
||||||
|
'defaulting to Rackspace US')
|
||||||
|
|
||||||
|
self.connection = cloudfiles.get_connection(
|
||||||
|
username=self.param_user,
|
||||||
|
api_key=self.param_api_key,
|
||||||
|
servicenet=True if self.param_use_servicenet == 'true' or \
|
||||||
|
self.param_use_servicenet == True else False)
|
||||||
|
|
||||||
|
if not self.param_container == \
|
||||||
|
self.connection.get_container(self.param_container):
|
||||||
|
self.container = self.connection.create_container(
|
||||||
|
self.param_container)
|
||||||
|
self.container.make_public(
|
||||||
|
ttl=60 * 60 * 2)
|
||||||
|
else:
|
||||||
|
self.container = self.connection.get_container(
|
||||||
|
self.param_container)
|
||||||
|
|
||||||
|
def _resolve_filepath(self, filepath):
|
||||||
|
return '/'.join(
|
||||||
|
clean_listy_filepath(filepath))
|
||||||
|
|
||||||
|
def file_exists(self, filepath):
|
||||||
|
try:
|
||||||
|
object = self.container.get_object(
|
||||||
|
self._resolve_filepath(filepath))
|
||||||
|
return True
|
||||||
|
except cloudfiles.errors.NoSuchObject:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def get_file(self, filepath, mode='r'):
|
||||||
|
try:
|
||||||
|
obj = self.container.get_object(
|
||||||
|
self._resolve_filepath(filepath))
|
||||||
|
except cloudfiles.errors.NoSuchObject:
|
||||||
|
obj = self.container.create_object(
|
||||||
|
self._resolve_filepath(filepath))
|
||||||
|
|
||||||
|
return obj
|
||||||
|
|
||||||
|
def delete_file(self, filepath):
|
||||||
|
# TODO: Also delete unused directories if empty (safely, with
|
||||||
|
# checks to avoid race conditions).
|
||||||
|
self.container.delete_object(filepath)
|
||||||
|
|
||||||
|
def file_url(self, filepath):
|
||||||
|
return self.get_file(filepath).public_uri()
|
||||||
|
|
||||||
|
|
||||||
class MountStorage(StorageInterface):
|
class MountStorage(StorageInterface):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.mounttab = {}
|
self.mounttab = {}
|
||||||
@ -391,7 +461,7 @@ def storage_system_from_config(paste_config, storage_prefix):
|
|||||||
for key, value in paste_config.iteritems()
|
for key, value in paste_config.iteritems()
|
||||||
if prefix_re.match(key)])
|
if prefix_re.match(key)])
|
||||||
|
|
||||||
if config_params.has_key('storage_class'):
|
if 'storage_class' in config_params:
|
||||||
storage_class = config_params['storage_class']
|
storage_class = config_params['storage_class']
|
||||||
config_params.pop('storage_class')
|
config_params.pop('storage_class')
|
||||||
else:
|
else:
|
||||||
@ -399,5 +469,3 @@ def storage_system_from_config(paste_config, storage_prefix):
|
|||||||
|
|
||||||
storage_class = util.import_component(storage_class)
|
storage_class = util.import_component(storage_class)
|
||||||
return storage_class(**config_params)
|
return storage_class(**config_params)
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,20 +23,27 @@
|
|||||||
<form action="{{ request.urlgen('mediagoblin.auth.login') }}"
|
<form action="{{ request.urlgen('mediagoblin.auth.login') }}"
|
||||||
method="POST" enctype="multipart/form-data">
|
method="POST" enctype="multipart/form-data">
|
||||||
<div class="grid_6 prefix_1 suffix_1 form_box">
|
<div class="grid_6 prefix_1 suffix_1 form_box">
|
||||||
<h1>Log in</h1>
|
<h1>{% trans %}Log in{% endtrans %}</h1>
|
||||||
{% if login_failed %}
|
{% if login_failed %}
|
||||||
<div class="form_field_error">Login failed!</div>
|
<div class="form_field_error">
|
||||||
|
{% trans %}Login failed!{% endtrans %}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ wtforms_util.render_divs(login_form) }}
|
{{ wtforms_util.render_divs(login_form) }}
|
||||||
<div class="form_submit_buttons">
|
<div class="form_submit_buttons">
|
||||||
<input type="submit" value="submit" class="button"/>
|
<input type="submit" value="{% trans %}Submit{% endtrans %}" class="button"/>
|
||||||
</div>
|
</div>
|
||||||
{% if next %}
|
{% if next %}
|
||||||
<input type="hidden" name="next" value="{{ next }}" class="button"
|
<input type="hidden" name="next" value="{{ next }}" class="button"
|
||||||
style="display: none;"/>
|
style="display: none;"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if allow_registration %}
|
{% if allow_registration %}
|
||||||
<p>Don't have an account yet?<br /><a href="{{ request.urlgen('mediagoblin.auth.register') }}">Create one here!</a></p>
|
<p>
|
||||||
|
{% trans %}Don't have an account yet?{% endtrans %}
|
||||||
|
<br />
|
||||||
|
<a href="{{ request.urlgen('mediagoblin.auth.register') }}">
|
||||||
|
{%- trans %}Create one here!{% endtrans %}</a>
|
||||||
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -24,10 +24,11 @@
|
|||||||
<form action="{{ request.urlgen('mediagoblin.auth.register') }}"
|
<form action="{{ request.urlgen('mediagoblin.auth.register') }}"
|
||||||
method="POST" enctype="multipart/form-data">
|
method="POST" enctype="multipart/form-data">
|
||||||
<div class="grid_6 prefix_1 suffix_1 form_box">
|
<div class="grid_6 prefix_1 suffix_1 form_box">
|
||||||
<h1>Create an account!</h1>
|
<h1>{% trans %}Create an account!{% endtrans %}</h1>
|
||||||
{{ wtforms_util.render_divs(register_form) }}
|
{{ wtforms_util.render_divs(register_form) }}
|
||||||
<div class="form_submit_buttons">
|
<div class="form_submit_buttons">
|
||||||
<input type="submit" value="submit" class="button" />
|
<input type="submit" value="{% trans %}Submit{% endtrans %}"
|
||||||
|
class="button" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -19,6 +19,6 @@
|
|||||||
|
|
||||||
{% block mediagoblin_content %}
|
{% block mediagoblin_content %}
|
||||||
<p>
|
<p>
|
||||||
Resent your verification email.
|
{% trans %}Resent your verification email.{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -14,9 +14,13 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#}
|
-#}
|
||||||
|
|
||||||
|
{% trans username=username, verification_url=verification_url|safe -%}
|
||||||
Hi {{ username }},
|
Hi {{ username }},
|
||||||
|
|
||||||
to activate your GNU MediaGoblin account, open the following URL in your web browser
|
to activate your GNU MediaGoblin account, open the following URL in
|
||||||
|
your web browser:
|
||||||
|
|
||||||
{{ verification_url|safe }}
|
{{ verification_url }}
|
||||||
|
{%- endtrans %}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>{% block title %}GNU MediaGoblin{% endblock title %}</title>
|
<title>{% block title %}{% trans %}GNU MediaGoblin{% endtrans %}{% endblock title %}</title>
|
||||||
<link rel="stylesheet" type="text/css"
|
<link rel="stylesheet" type="text/css"
|
||||||
href="{{ request.staticdirect('/css/extlib/reset.css') }}"/>
|
href="{{ request.staticdirect('/css/extlib/reset.css') }}"/>
|
||||||
<link rel="stylesheet" type="text/css"
|
<link rel="stylesheet" type="text/css"
|
||||||
@ -42,13 +42,13 @@
|
|||||||
<a class="mediagoblin_logo"
|
<a class="mediagoblin_logo"
|
||||||
href="{{ request.urlgen('index') }}">
|
href="{{ request.urlgen('index') }}">
|
||||||
<img src="{{ request.staticdirect('/images/logo.png') }}"
|
<img src="{{ request.staticdirect('/images/logo.png') }}"
|
||||||
alt="Mediagoblin logo" />
|
alt="{% trans %}Mediagoblin logo{% endtrans %}" />
|
||||||
</a>
|
</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% if request.user and request.user['status'] == 'active' %}
|
{% if request.user and request.user['status'] == 'active' %}
|
||||||
<a class="header_submit"
|
<a class="header_submit"
|
||||||
href="{{ request.urlgen('mediagoblin.submit.start') }}">
|
href="{{ request.urlgen('mediagoblin.submit.start') }}">
|
||||||
Submit media
|
{% trans %}Submit media{% endtrans %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block mediagoblin_header_title %}{% endblock %}
|
{% block mediagoblin_header_title %}{% endblock %}
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
||||||
user=request.user['username']) }}"
|
user=request.user['username']) }}"
|
||||||
class="header_submit">
|
class="header_submit">
|
||||||
verify your email!</a>
|
{% trans %}verify your email!{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
||||||
@ -69,7 +69,7 @@
|
|||||||
(<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>)
|
(<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>)
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">
|
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">
|
||||||
Login</a>
|
{% trans %}Login{% endtrans %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -85,7 +85,9 @@
|
|||||||
{% block mediagoblin_footer %}
|
{% block mediagoblin_footer %}
|
||||||
<div class="container_16">
|
<div class="container_16">
|
||||||
<div class="grid_16 mediagoblin_footer">
|
<div class="grid_16 mediagoblin_footer">
|
||||||
|
{% trans -%}
|
||||||
Powered by <a href="http://mediagoblin.org">MediaGoblin</a>, a <a href="http://gnu.org/">GNU project</a>
|
Powered by <a href="http://mediagoblin.org">MediaGoblin</a>, a <a href="http://gnu.org/">GNU project</a>
|
||||||
|
{%- endtrans %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -26,15 +26,15 @@
|
|||||||
media= media._id) }}"
|
media= media._id) }}"
|
||||||
method="POST" enctype="multipart/form-data">
|
method="POST" enctype="multipart/form-data">
|
||||||
<div class="grid_8 prefix_1 suffix_1 edit_box form_box">
|
<div class="grid_8 prefix_1 suffix_1 edit_box form_box">
|
||||||
<h1>Editing {{ media.title }}</h1>
|
<h1>{% trans media_title=media.title %}Editing {{ media_title }}{% endtrans %}</h1>
|
||||||
<div style="text-align: center;" >
|
<div style="text-align: center;" >
|
||||||
<img src="{{ request.app.public_store.file_url(
|
<img src="{{ request.app.public_store.file_url(
|
||||||
media['media_files']['thumb']) }}" />
|
media['media_files']['thumb']) }}" />
|
||||||
</div>
|
</div>
|
||||||
{{ wtforms_util.render_divs(form) }}
|
{{ wtforms_util.render_divs(form) }}
|
||||||
<div class="form_submit_buttons">
|
<div class="form_submit_buttons">
|
||||||
<a href="{{ media.url_for_self(request.urlgen) }}">Cancel</a>
|
<a href="{{ media.url_for_self(request.urlgen) }}">{% trans %}Cancel{% endtrans %}</a>
|
||||||
<input type="submit" value="Save changes" class="button" />
|
<input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -25,10 +25,14 @@
|
|||||||
user['username'] }}"
|
user['username'] }}"
|
||||||
method="POST" enctype="multipart/form-data">
|
method="POST" enctype="multipart/form-data">
|
||||||
<div class="grid_8 prefix_1 suffix_1 edit_box form_box">
|
<div class="grid_8 prefix_1 suffix_1 edit_box form_box">
|
||||||
<h1>Editing {{ user['username'] }}'s profile</h1>
|
<h1>
|
||||||
|
{%- trans username=user['username'] -%}
|
||||||
|
Editing {{ username }}'s profile
|
||||||
|
{%- endtrans %}
|
||||||
|
</h1>
|
||||||
{{ wtforms_util.render_divs(form) }}
|
{{ wtforms_util.render_divs(form) }}
|
||||||
<div class="form_submit_buttons">
|
<div class="form_submit_buttons">
|
||||||
<input type="submit" value="submit" class="button" />
|
<input type="submit" value="{% trans %}Submit{% endtrans %}" class="button" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
{% block mediagoblin_content -%}
|
{% block mediagoblin_content -%}
|
||||||
<h1>
|
<h1>
|
||||||
Media tagged with: {{ tag_name }}
|
{% trans %}Media tagged with:{% endtrans %} {{ tag_name }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="container_16 media_gallery">
|
<div class="container_16 media_gallery">
|
||||||
@ -36,6 +36,8 @@
|
|||||||
<div class="grid_16">
|
<div class="grid_16">
|
||||||
<a href="{{ request.urlgen(
|
<a href="{{ request.urlgen(
|
||||||
'mediagoblin.listings.tag_atom_feed',
|
'mediagoblin.listings.tag_atom_feed',
|
||||||
tag=tag_slug) }}">atom feed</a>
|
tag=tag_slug) }}">
|
||||||
|
{%- trans %}atom feed{% endtrans -%}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -22,17 +22,21 @@
|
|||||||
|
|
||||||
{% if request.user %}
|
{% if request.user %}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a>
|
<a href="{{ request.urlgen('mediagoblin.submit.start') }}">
|
||||||
|
{%- trans %}Submit an item{% endtrans -%}
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
If you have an account, you can
|
{% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
|
||||||
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">Login</a>.
|
If you have an account, you can <a href="{{ login_url }}">Login</a>.
|
||||||
|
{%- endtrans %}
|
||||||
</p>
|
</p>
|
||||||
{% if allow_registration %}
|
{% if allow_registration %}
|
||||||
<p>
|
<p>
|
||||||
If you don't have an account, please
|
{% trans register_url=request.urlgen('mediagoblin.auth.register') -%}
|
||||||
<a href="{{ request.urlgen('mediagoblin.auth.register') }}">Register</a>.
|
If you don't have an account, please <a href="{{ register_url }}">Register</a>.
|
||||||
|
{%- endtrans %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -23,13 +23,13 @@
|
|||||||
<form action="{{ request.urlgen('mediagoblin.submit.start') }}"
|
<form action="{{ request.urlgen('mediagoblin.submit.start') }}"
|
||||||
method="POST" enctype="multipart/form-data">
|
method="POST" enctype="multipart/form-data">
|
||||||
<div class="grid_8 prefix_1 suffix_1 form_box">
|
<div class="grid_8 prefix_1 suffix_1 form_box">
|
||||||
<h1>Submit yer media</h1>
|
<h1>{% trans %}Submit yer media{% endtrans %}</h1>
|
||||||
{{ wtforms_util.render_field_div(submit_form.file) }}
|
{{ wtforms_util.render_field_div(submit_form.file) }}
|
||||||
{{ wtforms_util.render_field_div(submit_form.title) }}
|
{{ wtforms_util.render_field_div(submit_form.title) }}
|
||||||
{{ wtforms_util.render_textarea_div(submit_form.description) }}
|
{{ wtforms_util.render_textarea_div(submit_form.description) }}
|
||||||
{{ wtforms_util.render_field_div(submit_form.tags) }}
|
{{ wtforms_util.render_field_div(submit_form.tags) }}
|
||||||
<div class="form_submit_buttons">
|
<div class="form_submit_buttons">
|
||||||
<input type="submit" value="Submit" class="button" />
|
<input type="submit" value="{% trans %}Submit{% endtrans %}" class="button" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -27,21 +27,27 @@
|
|||||||
{% block mediagoblin_content -%}
|
{% block mediagoblin_content -%}
|
||||||
{% if user %}
|
{% if user %}
|
||||||
<h1>
|
<h1>
|
||||||
<a href="{{ request.urlgen(
|
{%- trans username=user.username,
|
||||||
|
user_url=request.urlgen(
|
||||||
'mediagoblin.user_pages.user_home',
|
'mediagoblin.user_pages.user_home',
|
||||||
user=user.username) }}">{{ user.username }}</a>'s media</h1>
|
user=user.username) -%}
|
||||||
|
<a href="{{ user_url }}">{{ username }}</a>'s media
|
||||||
|
{%- endtrans %}
|
||||||
|
</h1>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="container_16 media_gallery">
|
<div class="container_16 media_gallery">
|
||||||
{% include "mediagoblin/utils/object_gallery.html" %}
|
{% include "mediagoblin/utils/object_gallery.html" %}
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_16">
|
<div class="grid_16">
|
||||||
<a href={{ request.urlgen(
|
<a href="{{ request.urlgen(
|
||||||
'mediagoblin.user_pages.atom_feed',
|
'mediagoblin.user_pages.atom_feed',
|
||||||
user=user.username) }}>atom feed</a>
|
user=user.username) }}">
|
||||||
|
{%- trans %}atom feed{% endtrans -%}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{# This *should* not occur as the view makes sure we pass in a user. #}
|
{# This *should* not occur as the view makes sure we pass in a user. #}
|
||||||
<p>Sorry, no such user found.<p/>
|
<p>{% trans %}Sorry, no such user found.{% endtrans %}<p/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -38,24 +38,26 @@
|
|||||||
{% endautoescape %}
|
{% endautoescape %}
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
— uploaded on
|
{% trans date="%4d-%02d-%02d"|format(
|
||||||
{{ "%4d-%02d-%02d"|format(media.created.year,
|
media.created.year,
|
||||||
media.created.month, media.created.day) }}
|
media.created.month, media.created.day),
|
||||||
by
|
user_url=request.urlgen(
|
||||||
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
'mediagoblin.user_pages.user_home',
|
||||||
user= media.uploader().username) }}">
|
user=media.uploader().username),
|
||||||
{{- media.uploader().username }}</a>
|
username=media.uploader().username -%}
|
||||||
|
— uploaded on {{ date }} by <a href="{{ user_url }}">{{ username }}</a>
|
||||||
|
{%- endtrans %}
|
||||||
</p>
|
</p>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<h3>Comments</h3>
|
<h3>{% trans %}Comments{% endtrans %}</h3>
|
||||||
{% if request.user %}
|
{% if request.user %}
|
||||||
<form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment',
|
<form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment',
|
||||||
user= media.uploader().username,
|
user= media.uploader().username,
|
||||||
media=media._id) }}" method="POST">
|
media=media._id) }}" method="POST">
|
||||||
{{ wtforms_util.render_field_div(comment_form.comment_content) }}
|
{{ wtforms_util.render_field_div(comment_form.comment_content) }}
|
||||||
<div class="form_submit_buttons">
|
<div class="form_submit_buttons">
|
||||||
<input type="submit" value="Post comment!" class="button" />
|
<input type="submit" value="{% trans %}Post comment!{% endtrans %}" class="button" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -77,7 +79,7 @@
|
|||||||
<div class="comment_author">—
|
<div class="comment_author">—
|
||||||
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
|
||||||
user = comment_author['username']) }}">
|
user = comment_author['username']) }}">
|
||||||
{{ comment_author['username'] }}</a> at
|
{{ comment_author['username'] }}</a> {% trans %}at{% endtrans %}
|
||||||
<!--</div>
|
<!--</div>
|
||||||
<div class="comment_datetime">-->
|
<div class="comment_datetime">-->
|
||||||
<a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
|
<a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
|
||||||
@ -103,11 +105,9 @@
|
|||||||
|
|
||||||
<div class="grid_5 omega">
|
<div class="grid_5 omega">
|
||||||
{% include "mediagoblin/utils/prev_next.html" %}
|
{% include "mediagoblin/utils/prev_next.html" %}
|
||||||
<h3>Sidebar content here!</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{% if media['uploader'] == request.user['_id'] or
|
{% if media['uploader'] == request.user['_id'] or
|
||||||
request.user['is_admin'] %}
|
request.user['is_admin'] %}
|
||||||
|
<h3>Temporary button holder</h3>
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ request.urlgen('mediagoblin.edit.edit_media',
|
<a href="{{ request.urlgen('mediagoblin.edit.edit_media',
|
||||||
user= media.uploader().username,
|
user= media.uploader().username,
|
||||||
@ -117,16 +117,15 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<img src="{{ request.staticdirect('/images/icon_delete.png') }}"
|
<img src="{{ request.staticdirect('/images/icon_delete.png') }}"
|
||||||
class="media_icon" />delete
|
class="media_icon" />{% trans %}delete{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
|
||||||
|
|
||||||
{% if media.tags %}
|
{% if media.tags %}
|
||||||
{% include "mediagoblin/utils/tags.html" %}
|
{% include "mediagoblin/utils/tags.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>Sorry, no such media found.<p/>
|
<p>{% trans %}Sorry, no such media found.{% endtrans %}<p/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -27,53 +27,62 @@
|
|||||||
{% block mediagoblin_content -%}
|
{% block mediagoblin_content -%}
|
||||||
{# If no user... #}
|
{# If no user... #}
|
||||||
{% if not user %}
|
{% if not user %}
|
||||||
<p>Sorry, no such user found.<p/>
|
<p>{% trans %}Sorry, no such user found.{% endtrans %}<p/>
|
||||||
|
|
||||||
{# User exists, but needs verification #}
|
{# User exists, but needs verification #}
|
||||||
{% elif user.status == "needs_email_verification" %}
|
{% elif user.status == "needs_email_verification" %}
|
||||||
{% if user == request.user %}
|
{% if user == request.user %}
|
||||||
{# this should only be visible when you are this user #}
|
{# this should only be visible when you are this user #}
|
||||||
<div class="grid_6 prefix_1 suffix_1 form_box">
|
<div class="grid_6 prefix_1 suffix_1 form_box">
|
||||||
<h1>Verification needed</h1>
|
<h1>{% trans %}Verification needed{% endtrans %}</h1>
|
||||||
|
|
||||||
<p>Almost done! Your account still needs to be verified.</p>
|
|
||||||
<p>
|
<p>
|
||||||
An email should arrive in a few moments with instructions
|
{% trans -%}
|
||||||
on how to do so.
|
Almost done! Your account still needs to be verified.
|
||||||
|
{%- endtrans %}
|
||||||
</p>
|
</p>
|
||||||
<p>In case it doesn't:</p>
|
<p>
|
||||||
|
{% trans -%}
|
||||||
|
An email should arrive in a few moments with instructions on how to do so.
|
||||||
|
{%- endtrans %}
|
||||||
|
</p>
|
||||||
|
<p>{% trans %}In case it doesn't:{% endtrans %}</p>
|
||||||
|
|
||||||
<a href="{{ request.urlgen('mediagoblin.auth.resend_verification') }}"
|
<a href="{{ request.urlgen('mediagoblin.auth.resend_verification') }}"
|
||||||
class="button">Resend verification email</a>
|
class="button">{% trans %}Resend verification email{% endtrans %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{# if the user is not you, but still needs to verify their email #}
|
{# if the user is not you, but still needs to verify their email #}
|
||||||
<div class="grid_6 prefix_1 suffix_1 form_box">
|
<div class="grid_6 prefix_1 suffix_1 form_box">
|
||||||
<h1>Verification needed</h1>
|
<h1>{% trans %}Verification needed{% endtrans %}</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Someone has registered an account with this username, but it
|
{% trans -%}
|
||||||
still has to be verified.
|
Someone has registered an account with this username, but it still has to be verified.
|
||||||
|
{%- endtrans %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you are that person but you've lost your verification
|
{% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
|
||||||
email, you can
|
If you are that person but you've lost your verification email, you can <a href="{{ login_url }}">log in</a> and resend it.
|
||||||
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">log in</a>
|
{%- endtrans %}
|
||||||
and resend it.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Active(?) (or at least verified at some point) user, horray! #}
|
{# Active(?) (or at least verified at some point) user, horray! #}
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>{{ user.username }}'s profile</h1>
|
<h1>
|
||||||
|
{%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
|
||||||
|
</h1>
|
||||||
|
|
||||||
<div class="grid_6 alpha">
|
<div class="grid_6 alpha">
|
||||||
{% include "mediagoblin/utils/profile.html" %}
|
{% include "mediagoblin/utils/profile.html" %}
|
||||||
{% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
|
{% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
|
||||||
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
|
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
|
||||||
user.username }}">Edit profile</a>
|
user.username }}">
|
||||||
|
{%- trans %}Edit profile{% endtrans -%}
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -81,10 +90,16 @@
|
|||||||
{% set pagination_base_url = user_gallery_url %}
|
{% set pagination_base_url = user_gallery_url %}
|
||||||
{% include "mediagoblin/utils/object_gallery.html" %}
|
{% include "mediagoblin/utils/object_gallery.html" %}
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<p><a href="{{ user_gallery_url }}">View all of {{ user.username }}'s media</a></p>
|
<p>
|
||||||
<a href={{ request.urlgen(
|
<a href="{{ user_gallery_url }}">
|
||||||
'mediagoblin.user_pages.atom_feed',
|
{% trans username=user.username -%}
|
||||||
user=user.username) }}>atom feed</a>
|
View all of {{ username }}'s media{% endtrans -%}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<a href="{{ request.urlgen( 'mediagoblin.user_pages.atom_feed',
|
||||||
|
user=user.username) }}">
|
||||||
|
{%- trans %}atom feed{% endtrans -%}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
{% block tags_content -%}
|
{% block tags_content -%}
|
||||||
<h4>Tags</h4>
|
<h3>Tags</h3>
|
||||||
<ul class="mediaentry_tags">
|
<ul class="mediaentry_tags">
|
||||||
{% for tag in media.tags %}
|
{% for tag in media.tags %}
|
||||||
<li class="tag">
|
<li class="tag">
|
||||||
|
@ -300,7 +300,7 @@ def send_email(from_addr, to_addrs, subject, message_body):
|
|||||||
|
|
||||||
|
|
||||||
TRANSLATIONS_PATH = pkg_resources.resource_filename(
|
TRANSLATIONS_PATH = pkg_resources.resource_filename(
|
||||||
'mediagoblin', 'translations')
|
'mediagoblin', 'i18n')
|
||||||
|
|
||||||
|
|
||||||
def locale_to_lower_upper(locale):
|
def locale_to_lower_upper(locale):
|
||||||
|
2
setup.py
2
setup.py
@ -44,6 +44,7 @@ setup(
|
|||||||
'webtest',
|
'webtest',
|
||||||
'ConfigObj',
|
'ConfigObj',
|
||||||
'Markdown',
|
'Markdown',
|
||||||
|
'python-cloudfiles',
|
||||||
## For now we're expecting that users will install this from
|
## For now we're expecting that users will install this from
|
||||||
## their package managers.
|
## their package managers.
|
||||||
# 'lxml',
|
# 'lxml',
|
||||||
@ -52,6 +53,7 @@ setup(
|
|||||||
entry_points = """\
|
entry_points = """\
|
||||||
[console_scripts]
|
[console_scripts]
|
||||||
gmg = mediagoblin.gmg_commands:main_cli
|
gmg = mediagoblin.gmg_commands:main_cli
|
||||||
|
pybabel = mediagoblin.babel.messages.frontend:main
|
||||||
|
|
||||||
[paste.app_factory]
|
[paste.app_factory]
|
||||||
app = mediagoblin.app:paste_app_factory
|
app = mediagoblin.app:paste_app_factory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user