--- a/src/cm/converters/__init__.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/converters/__init__.py Tue Feb 09 22:20:08 2010 +0100
@@ -1,6 +1,6 @@
from pandoc_converters import pandoc_convert
import chardet
-from cm.utils.string import to_unicode
+from cm.utils.string_utils import to_unicode
import re
# TODO: move that in text_base: save images
--- a/src/cm/converters/pandoc_converters.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/converters/pandoc_converters.py Tue Feb 09 22:20:08 2010 +0100
@@ -10,7 +10,7 @@
from tempfile import mkstemp
import StringIO
import tidy
-from cm.utils.string import to_unicode
+from cm.utils.string_utils import to_unicode
PANDOC_BIN = "pandoc"
PANDOC_OPTIONS = "--sanitize-html "
--- a/src/cm/diff.py Fri Feb 05 18:43:58 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-import difflib, string
-from django.utils.translation import ugettext as _
-
-def isatag(x): return x.startswith("<") and x.endswith(">")
-
-def text_diff(a, b):
- res = []
- a, b = createlist(a), createlist(b)
- s = difflib.SequenceMatcher(isatag, a, b)
- for e in s.get_opcodes():
- if e[0] == "replace":
- res.append('<del class="diff modified">'+''.join(a[e[1]:e[2]]) + '</del><ins class="diff modified">'+''.join(b[e[3]:e[4]])+"</ins>")
- elif e[0] == "delete":
- res.append('<del class="diff">'+ ''.join(a[e[1]:e[2]]) + "</del>")
- elif e[0] == "insert":
- res.append('<ins class="diff">'+''.join(b[e[3]:e[4]]) + "</ins>")
- elif e[0] == "equal":
- res.append(''.join(b[e[3]:e[4]]))
- else:
- raise "error parsing %s" %(e[0])
- return ''.join(res)
-
-COLORS = [
-'#FF0000',
-'#EE0000',
-'#DD0000',
-'#CC0000',
-'#BB0000',
-'#AA0000',
-'#990000',
-'#880000',
-'#770000',
-]
-
-from colorsys import hls_to_rgb, hsv_to_rgb
-
-def generatePastelColors(n):
- s = .4
- v = .99
- return ['#'+''.join((hex(int(r*255))[2:],hex(int(g*255))[2:],hex(int(b*255))[2:])) for r,g,b in [hsv_to_rgb(h/200.,s,v) for h in range(1,100,100/n)]]
-
-
-DEFAULT_COLOR = '#D9D9D9'
-def get_colors(authors, last_white = False):
- """
- returns a dict for authors's colors (with last one white if 'last_white')
- """
- authors = set(authors)
- #new_colors = list(tuple(COLORS))
- new_colors = generatePastelColors(len(set(authors)))
- res = []
- if None in authors or '' in authors:
- res = [(_(u'unknown'),DEFAULT_COLOR) ]
- res.extend([(author,new_colors.pop()) for author in authors if author])
- #if authors[-1]:
- # res[authors[-1]] = '#FFFFFF'
- return res
-
-
-def text_history(versions, authors):
- res = versions[0]
- colors = get_colors(authors)
- for ind in range(len(versions)-1):
- author = authors[ind]
- color = colors.get(author,DEFAULT_COLOR)
- v_2 = versions[ind + 1]
- res = text_diff_add(v_2, res, color)
- return res,colors.items()
-
-from cm.utils.html import surrond_text_node
-
-def text_diff_add(a,b, color):
- res = []
- a, b = createlist(a), createlist(b)
- s = difflib.SequenceMatcher(isatag, a, b)
- for e in s.get_opcodes():
- if e[0] == "replace":
- html_chunk = ''.join(b[e[3]:e[4]])
- new_html_chunk = surrond_text_node(html_chunk,'<span style="background: %s;">' %color,'</span>')
- res.append(new_html_chunk)
- #res.append('<font style="background: %s;" class="diff modified">' %color+''.join(b[e[3]:e[4]])+"</font>")
- elif e[0] == "delete":
- pass
- elif e[0] == "insert":
- html_chunk = ''.join(b[e[3]:e[4]])
- new_html_chunk = surrond_text_node(html_chunk,'<span style="background: %s;">' %color,'</span>')
- res.append(new_html_chunk)
- #res.append('<font style="background: %s;" class="diff">' %color+''.join(b[e[3]:e[4]]) + "</font>")
- elif e[0] == "equal":
- res.append(''.join(b[e[3]:e[4]]))
- else:
- raise "error parsing %s" %(e[0])
- return ''.join(res)
-
-def createlist(x, b=0):
- mode = 'char'
- cur = ''
- out = []
- for c in x:
- if mode == 'tag':
- if c == '>':
- if b: cur += ']'
- else: cur += c
- out.append(cur); cur = ''; mode = 'char'
- else: cur += c
- elif mode == 'char':
- if c == '<':
- out.append(cur)
- if b: cur = '['
- else: cur = c
- mode = 'tag'
- elif c in string.whitespace: out.append(cur+c); cur = ''
- else: cur += c
- out.append(cur)
- return filter(lambda x: x is not '', out)
--- a/src/cm/ext/diff.py Fri Feb 05 18:43:58 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2004-2009 Edgewall Software
-# Copyright (C) 2004-2006 Christopher Lenz <cmlenz@gmx.de>
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://trac.edgewall.org/wiki/TracLicense.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://trac.edgewall.org/log/.
-#
-# Author: Christopher Lenz <cmlenz@gmx.de>
-
-from trac.util.html import escape, Markup
-from trac.util.text import expandtabs
-
-from difflib import SequenceMatcher
-import re
-
-__all__ = ['get_diff_options', 'hdf_diff', 'diff_blocks', 'unified_diff']
-
-
-def _get_change_extent(str1, str2):
- """
- Determines the extent of differences between two strings. Returns a tuple
- containing the offset at which the changes start, and the negative offset
- at which the changes end. If the two strings have neither a common prefix
- nor a common suffix, (0, 0) is returned.
- """
- start = 0
- limit = min(len(str1), len(str2))
- while start < limit and str1[start] == str2[start]:
- start += 1
- end = -1
- limit = limit - start
- while -end <= limit and str1[end] == str2[end]:
- end -= 1
- return (start, end + 1)
-
-def _get_opcodes(fromlines, tolines, ignore_blank_lines=False,
- ignore_case=False, ignore_space_changes=False):
- """
- Generator built on top of SequenceMatcher.get_opcodes().
-
- This function detects line changes that should be ignored and emits them
- as tagged as 'equal', possibly joined with the preceding and/or following
- 'equal' block.
- """
-
- def is_ignorable(tag, fromlines, tolines):
- if tag == 'delete' and ignore_blank_lines:
- if ''.join(fromlines) == '':
- return True
- elif tag == 'insert' and ignore_blank_lines:
- if ''.join(tolines) == '':
- return True
- elif tag == 'replace' and (ignore_case or ignore_space_changes):
- if len(fromlines) != len(tolines):
- return False
- def f(str):
- if ignore_case:
- str = str.lower()
- if ignore_space_changes:
- str = ' '.join(str.split())
- return str
- for i in range(len(fromlines)):
- if f(fromlines[i]) != f(tolines[i]):
- return False
- return True
-
- matcher = SequenceMatcher(None, fromlines, tolines)
- previous = None
- for tag, i1, i2, j1, j2 in matcher.get_opcodes():
- if tag == 'equal':
- if previous:
- previous = (tag, previous[1], i2, previous[3], j2)
- else:
- previous = (tag, i1, i2, j1, j2)
- else:
- if is_ignorable(tag, fromlines[i1:i2], tolines[j1:j2]):
- if previous:
- previous = 'equal', previous[1], i2, previous[3], j2
- else:
- previous = 'equal', i1, i2, j1, j2
- continue
- if previous:
- yield previous
- yield tag, i1, i2, j1, j2
- previous = None
-
- if previous:
- yield previous
-
-def _group_opcodes(opcodes, n=3):
- """
- Python 2.2 doesn't have SequenceMatcher.get_grouped_opcodes(), so let's
- provide equivalent here. The opcodes parameter can be any iterable or
- sequence.
-
- This function can also be used to generate full-context diffs by passing
- None for the parameter n.
- """
- # Full context produces all the opcodes
- if n is None:
- yield list(opcodes)
- return
-
- # Otherwise we leave at most n lines with the tag 'equal' before and after
- # every change
- nn = n + n
- group = []
- for idx, (tag, i1, i2, j1, j2) in enumerate(opcodes):
- if idx == 0 and tag == 'equal': # Fixup leading unchanged block
- i1, j1 = max(i1, i2 - n), max(j1, j2 - n)
- elif tag == 'equal' and i2 - i1 > nn:
- group.append((tag, i1, min(i2, i1 + n), j1, min(j2, j1 + n)))
- yield group
- group = []
- i1, j1 = max(i1, i2 - n), max(j1, j2 - n)
- group.append((tag, i1, i2, j1 ,j2))
-
- if group and not (len(group) == 1 and group[0][0] == 'equal'):
- if group[-1][0] == 'equal': # Fixup trailing unchanged block
- tag, i1, i2, j1, j2 = group[-1]
- group[-1] = tag, i1, min(i2, i1 + n), j1, min(j2, j1 + n)
- yield group
-
-def hdf_diff(*args, **kwargs):
- return diff_blocks(*args, **kwargs)
-
-def diff_blocks(fromlines, tolines, context=None, tabwidth=8,
- ignore_blank_lines=0, ignore_case=0, ignore_space_changes=0):
- """Return an array that is adequate for adding to the data dictionary
-
- See the diff_div.html template.
- """
-
- type_map = {'replace': 'mod', 'delete': 'rem', 'insert': 'add',
- 'equal': 'unmod'}
-
- space_re = re.compile(' ( +)|^ ')
- def htmlify(match):
- div, mod = divmod(len(match.group(0)), 2)
- return div * ' ' + mod * ' '
-
- def markup_intraline_changes(opcodes):
- for tag, i1, i2, j1, j2 in opcodes:
- if tag == 'replace' and i2 - i1 == j2 - j1:
- for i in range(i2 - i1):
- fromline, toline = fromlines[i1 + i], tolines[j1 + i]
- (start, end) = _get_change_extent(fromline, toline)
- if start != 0 or end != 0:
- last = end+len(fromline)
- fromlines[i1+i] = fromline[:start] + '\0' + fromline[start:last] + \
- '\1' + fromline[last:]
- last = end+len(toline)
- tolines[j1+i] = toline[:start] + '\0' + toline[start:last] + \
- '\1' + toline[last:]
- yield tag, i1, i2, j1, j2
-
- changes = []
- opcodes = _get_opcodes(fromlines, tolines, ignore_blank_lines, ignore_case,
- ignore_space_changes)
- for group in _group_opcodes(opcodes, context):
- blocks = []
- last_tag = None
- for tag, i1, i2, j1, j2 in markup_intraline_changes(group):
- if tag != last_tag:
- blocks.append({'type': type_map[tag],
- 'base': {'offset': i1, 'lines': []},
- 'changed': {'offset': j1, 'lines': []}})
- if tag == 'equal':
- for line in fromlines[i1:i2]:
- line = line.expandtabs(tabwidth)
- line = space_re.sub(htmlify, escape(line, quotes=False))
- blocks[-1]['base']['lines'].append(Markup(unicode(line)))
- for line in tolines[j1:j2]:
- line = line.expandtabs(tabwidth)
- line = space_re.sub(htmlify, escape(line, quotes=False))
- blocks[-1]['changed']['lines'].append(Markup(unicode(line)))
- else:
- if tag in ('replace', 'delete'):
- for line in fromlines[i1:i2]:
- line = expandtabs(line, tabwidth, '\0\1')
- line = escape(line, quotes=False)
- line = '<del>'.join([space_re.sub(htmlify, seg)
- for seg in line.split('\0')])
- line = line.replace('\1', '</del>')
- blocks[-1]['base']['lines'].append(
- Markup(unicode(line)))
- if tag in ('replace', 'insert'):
- for line in tolines[j1:j2]:
- line = expandtabs(line, tabwidth, '\0\1')
- line = escape(line, quotes=False)
- line = '<ins>'.join([space_re.sub(htmlify, seg)
- for seg in line.split('\0')])
- line = line.replace('\1', '</ins>')
- blocks[-1]['changed']['lines'].append(
- Markup(unicode(line)))
- changes.append(blocks)
- return changes
-
-def unified_diff(fromlines, tolines, context=None, ignore_blank_lines=0,
- ignore_case=0, ignore_space_changes=0):
- opcodes = _get_opcodes(fromlines, tolines, ignore_blank_lines, ignore_case,
- ignore_space_changes)
- for group in _group_opcodes(opcodes, context):
- i1, i2, j1, j2 = group[0][1], group[-1][2], group[0][3], group[-1][4]
- if i1 == 0 and i2 == 0:
- i1, i2 = -1, -1 # support for 'A'dd changes
- yield '@@ -%d,%d +%d,%d @@' % (i1 + 1, i2 - i1, j1 + 1, j2 - j1)
- for tag, i1, i2, j1, j2 in group:
- if tag == 'equal':
- for line in fromlines[i1:i2]:
- yield ' ' + line
- else:
- if tag in ('replace', 'delete'):
- for line in fromlines[i1:i2]:
- yield '-' + line
- if tag in ('replace', 'insert'):
- for line in tolines[j1:j2]:
- yield '+' + line
-
-def get_diff_options(req):
- options_data = {}
- data = {'options': options_data}
-
- def get_bool_option(name, default=0):
- pref = int(req.session.get('diff_' + name, default))
- arg = int(req.args.has_key(name))
- if req.args.has_key('update') and arg != pref:
- req.session['diff_' + name] = arg
- else:
- arg = pref
- return arg
-
- pref = req.session.get('diff_style', 'inline')
- style = req.args.get('style', pref)
- if req.args.has_key('update') and style != pref:
- req.session['diff_style'] = style
- data['style'] = style
-
- pref = int(req.session.get('diff_contextlines', 2))
- try:
- arg = int(req.args.get('contextlines', pref))
- except ValueError:
- arg = -1
- if req.args.has_key('update') and arg != pref:
- req.session['diff_contextlines'] = arg
- options = ['-U%d' % arg]
- options_data['contextlines'] = arg
-
- arg = get_bool_option('ignoreblanklines')
- if arg:
- options.append('-B')
- options_data['ignoreblanklines'] = arg
-
- arg = get_bool_option('ignorecase')
- if arg:
- options.append('-i')
- options_data['ignorecase'] = arg
-
- arg = get_bool_option('ignorewhitespace')
- if arg:
- options.append('-b')
- options_data['ignorewhitespace'] = arg
-
- return (style, options, data)
Binary file src/cm/locale/en/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/en/LC_MESSAGES/django.po Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/locale/en/LC_MESSAGES/django.po Tue Feb 09 22:20:08 2010 +0100
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-02 16:41+0100\n"
+"POT-Creation-Date: 2010-02-05 15:11+0100\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"
@@ -21,39 +21,39 @@
"A selection is required. Select in the text the part your comment applies to."
msgstr ""
-#: client.py:133
+#: client.py:134
msgid "name is required"
msgstr ""
-#: client.py:136
+#: client.py:137
msgid "email is required"
msgstr ""
-#: client.py:138
+#: client.py:139
msgid "invalid email"
msgstr ""
-#: client.py:140
+#: client.py:141
msgid "title is required"
msgstr ""
-#: client.py:142
+#: client.py:143
msgid "content is required"
msgstr ""
-#: client.py:157
+#: client.py:158
msgid "comment removed"
msgstr ""
-#: client.py:208 client.py:273
+#: client.py:209 client.py:274
msgid "comment saved"
msgstr ""
-#: client.py:275
+#: client.py:276
msgid "comment saved, it is being held for moderation"
msgstr ""
-#: client.py:336
+#: client.py:337
msgid "Tags input must be no longer than 250 characters."
msgstr ""
@@ -61,7 +61,8 @@
msgid "unknown"
msgstr ""
-#: models.py:175 views/create.py:30 views/create.py:45 views/texts.py:617
+#: models.py:175 templates/site/text_history.html:79 views/create.py:30
+#: views/create.py:45 views/texts.py:612
msgid "Title"
msgstr ""
@@ -69,11 +70,11 @@
msgid "Format"
msgstr ""
-#: models.py:177 views/texts.py:708
+#: models.py:177 views/texts.py:703
msgid "Content"
msgstr ""
-#: models.py:178 models.py:599
+#: models.py:178 models.py:615
msgid "Tags"
msgstr ""
@@ -85,121 +86,116 @@
msgid "Moderation a posteriori?"
msgstr ""
-#: models.py:285
+#: models.py:300
msgid "Format:"
msgstr ""
-#: models.py:361
-#, python-format
-msgid "%(workspace_name)s's workspace"
-msgstr ""
-
-#: models.py:502
+#: models.py:518
msgid "name"
msgstr ""
-#: models.py:503
+#: models.py:519
msgid "description"
msgstr ""
-#: models.py:593
+#: models.py:609
msgid "Allow contact"
msgstr ""
-#: models.py:593
+#: models.py:609
msgid "Allow email messages from other users"
msgstr ""
-#: models.py:594
+#: models.py:610
msgid "Preferred language"
msgstr ""
-#: models.py:597
+#: models.py:613
msgid "Suspended access"
msgstr ""
-#: models.py:621
+#: models.py:637
msgid "suspended"
msgstr ""
-#: models.py:623
+#: models.py:639
msgid "waiting approval"
msgstr ""
-#: models.py:629
+#: models.py:645
msgid "pending"
msgstr ""
-#: models.py:644
+#: models.py:660
msgid "Invitation"
msgstr ""
-#: models.py:712
+#: models.py:728
#, python-format
msgid "Text %(link_to_text)s edited"
msgstr ""
-#: models.py:713
+#: models.py:729
#, python-format
msgid "Text %(link_to_text)s edited (new version created)"
msgstr ""
-#: models.py:714
+#: models.py:730
#, python-format
msgid "Text %(link_to_text)s added"
msgstr ""
-#: models.py:715
+#: models.py:731
#, python-format
msgid "Text %(link_to_text)s removed"
msgstr ""
-#: models.py:716
+#: models.py:732
#, python-format
msgid "Comment %(link_to_comment)s added on text %(link_to_text)s"
msgstr ""
-#: models.py:717
+#: models.py:733
#, python-format
msgid "Comment %(link_to_comment)s removed from text %(link_to_text)s"
msgstr ""
-#: models.py:718
+#: models.py:734
#, python-format
msgid "User %(username)s added"
msgstr ""
-#: models.py:719
+#: models.py:735
#, python-format
msgid "User %(username)s access to workspace enabled"
msgstr ""
-#: models.py:720
+#: models.py:736
#, python-format
msgid "User %(username)s access to workspace refused"
msgstr ""
-#: models.py:721
+#: models.py:737
#, python-format
msgid "User %(username)s access to workspace suspended"
msgstr ""
-#: models.py:722
+#: models.py:738
#, python-format
msgid "User %(username)s access to workspace activated"
msgstr ""
-#: models.py:723
+#: models.py:739
#, python-format
msgid "User %(username)s has activated his account"
msgstr ""
-#: models.py:778 models.py:786
+#: models.py:794 models.py:802
#, python-format
msgid "by \"%(username)s\""
msgstr ""
-#: models.py:780
+#: models.py:796
#, python-format
msgid "%(time_since)s ago"
msgstr ""
@@ -547,7 +543,7 @@
msgid "texts"
msgstr ""
-#: templates/site/dashboard.html:264 templates/site/text_list.html:139
+#: templates/site/dashboard.html:264
msgid "comments"
msgstr ""
@@ -779,50 +775,89 @@
msgid "Subscribe to all text notifications"
msgstr ""
-#: templates/site/text_history.html:38
-msgid "Versions:"
+#: templates/site/text_history.html:56
+#: templates/site/text_history_compare.html:28
+#: templates/site/text_history_version.html:28
+msgid "Version list"
msgstr ""
-#: templates/site/text_history.html:46
-#, python-format
-msgid "version #%(v1number)s"
+#: templates/site/text_history.html:59
+msgid "Compare last two versions"
+msgstr ""
+
+#: templates/site/text_history.html:61
+#: templates/site/text_history_compare.html:36
+#: templates/site/text_history_version.html:40
+msgid "Most recent version"
msgstr ""
-#: templates/site/text_history.html:46
-#, python-format
-msgid "by %(v1name)s"
+#: templates/site/text_history.html:67
+msgid "Compare selected versions"
+msgstr ""
+
+#: templates/site/text_history.html:77
+msgid "Version"
msgstr ""
-#: templates/site/text_history.html:46
-#, python-format
-msgid "created %(v1created)s"
+#: templates/site/text_history.html:78
+msgid "Selection"
+msgstr ""
+
+#: templates/site/text_history.html:80 templates/site/text_list.html:137
+msgid "Author"
+msgstr ""
+
+#: templates/site/text_history.html:81
+msgid "Created"
+msgstr ""
+
+#: templates/site/text_history.html:82 templates/site/text_list.html:139
+msgid "# comments"
msgstr ""
-#: templates/site/text_history.html:54
-#, python-format
-msgid "differences between version #%(v1number)s and #%(v2number)s"
+#: templates/site/text_history.html:102 templates/site/text_list.html:159
+msgid "View"
msgstr ""
-#: templates/site/text_history.html:66
-#, python-format
-msgid "Revert to version #%(v1_nid)s"
+#: templates/site/text_history.html:103
+#: templates/site/text_history_version.html:33
+msgid "Compare with previous version"
+msgstr ""
+
+#: templates/site/text_history.html:104
+msgid "Revert to this version"
+msgstr ""
+
+#: templates/site/text_history.html:105 templates/site/text_list.html:80
+#: templates/site/text_list.html.py:161
+msgid "Delete"
msgstr ""
-#: templates/site/text_history.html:70
+#: templates/site/text_history.html:111
+msgid "Are you sure you want to delete this version?"
+msgstr ""
+
+#: templates/site/text_history_compare.html:30
+#: templates/site/text_history_compare.html:34
+#: templates/site/text_history_version.html:30
#, python-format
-msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
+msgid "Version %(version_number)s"
msgstr ""
-#: templates/site/text_history.html:73 templates/site/text_history.html:85
-#: templates/site/text_history.html:91
+#: templates/site/text_history_compare.html:32
#, python-format
-msgid "Version #%(version_number)s created on %(date)s"
+msgid ""
+"Comparison between version #%(version_1_number)s and #%(version_2_number)s"
msgstr ""
-#: templates/site/text_history.html:101
+#: templates/site/text_history_compare.html:43
msgid "No differences"
msgstr ""
+#: templates/site/text_history_version.html:37
+msgid "Compare with next version"
+msgstr ""
+
#: templates/site/text_list.html:12
msgid "Texts"
msgstr ""
@@ -847,10 +882,6 @@
msgid "Bulk Actions"
msgstr ""
-#: templates/site/text_list.html:80 templates/site/text_list.html.py:161
-msgid "Delete"
-msgstr ""
-
#: templates/site/text_list.html:83 templates/site/user_list.html:81
msgid "Apply"
msgstr ""
@@ -863,10 +894,6 @@
msgid "Text"
msgstr ""
-#: templates/site/text_list.html:137
-msgid "Author"
-msgstr ""
-
#: templates/site/text_list.html:138
msgid "Modified"
msgstr ""
@@ -886,10 +913,6 @@
msgid "Filter by tag: %(tag_name)s"
msgstr ""
-#: templates/site/text_list.html:159
-msgid "View"
-msgstr ""
-
#: templates/site/text_list.html:160 templates/site/macros/text_tabs.html:12
#: templates/site/macros/user_actions.html:19
msgid "Edit"
@@ -1369,49 +1392,54 @@
msgid "Text %(text_title)s deleted"
msgstr ""
-#: views/texts.py:621
+#: views/texts.py:221
+#, python-format
+msgid "Text version %(text_version_title)s deleted"
+msgstr ""
+
+#: views/texts.py:616
msgid "Note (optional)"
msgstr ""
-#: views/texts.py:624
+#: views/texts.py:619
msgid "Add a note to explain the modifications made to the text"
msgstr ""
-#: views/texts.py:634
+#: views/texts.py:629
msgid "New version (optional)"
msgstr ""
-#: views/texts.py:637
+#: views/texts.py:632
msgid "Create a new version of this text (recommended)"
msgstr ""
-#: views/texts.py:640
+#: views/texts.py:635
msgid "Keep comments (optional)"
msgstr ""
-#: views/texts.py:643
+#: views/texts.py:638
msgid "Keep comments (if not affected by the edit)"
msgstr ""
-#: views/texts.py:706
+#: views/texts.py:701
msgid "Name (optional)"
msgstr ""
-#: views/texts.py:707
+#: views/texts.py:702
msgid "Email (optional)"
msgstr ""
-#: views/texts.py:757
+#: views/texts.py:752
#, python-format
-msgid "A new version (copied from version %(version_id)s) has been created"
+msgid "A new version (copied from version %(version_title)s) has been created"
msgstr ""
-#: views/texts.py:865 views/user.py:79 views/user.py:99
+#: views/texts.py:860 views/user.py:79 views/user.py:99
#, python-format
msgid "%(count)i user(s) role modified"
msgstr ""
-#: views/texts.py:923
+#: views/texts.py:918
msgid "Text settings updated"
msgstr ""
Binary file src/cm/locale/es/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/es/LC_MESSAGES/django.po Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/locale/es/LC_MESSAGES/django.po Tue Feb 09 22:20:08 2010 +0100
@@ -5,7 +5,7 @@
msgstr ""
"Project-Id-Version: COMT\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-02 16:41+0100\n"
+"POT-Creation-Date: 2010-02-05 15:10+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Alejandro Martin Ortin <alejandromartinortin@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,39 +19,39 @@
msgstr ""
"Se necesita una selección. Seleccione el texto cuya parte desee comentar."
-#: client.py:133
+#: client.py:134
msgid "name is required"
msgstr "el nombre es obligatorio"
-#: client.py:136
+#: client.py:137
msgid "email is required"
msgstr "el email es obligatorio"
-#: client.py:138
+#: client.py:139
msgid "invalid email"
msgstr "dirección de correo electrónico no válida"
-#: client.py:140
+#: client.py:141
msgid "title is required"
msgstr "el tÃtulo es obligatorio"
-#: client.py:142
+#: client.py:143
msgid "content is required"
msgstr "el contenido es obligatorio"
-#: client.py:157
+#: client.py:158
msgid "comment removed"
msgstr "comentario borrado"
-#: client.py:208 client.py:273
+#: client.py:209 client.py:274
msgid "comment saved"
msgstr "comentario guardado"
-#: client.py:275
+#: client.py:276
msgid "comment saved, it is being held for moderation"
msgstr "comentario guardado, se reserva para moderación"
-#: client.py:336
+#: client.py:337
msgid "Tags input must be no longer than 250 characters."
msgstr "El contenido de las etiquetas no debe exceder los 250 caracteres"
@@ -59,7 +59,8 @@
msgid "unknown"
msgstr "desconocido"
-#: models.py:175 views/create.py:30 views/create.py:45 views/texts.py:617
+#: models.py:175 templates/site/text_history.html:79 views/create.py:30
+#: views/create.py:45 views/texts.py:612
msgid "Title"
msgstr "TÃtulo"
@@ -67,11 +68,11 @@
msgid "Format"
msgstr "Formato"
-#: models.py:177 views/texts.py:708
+#: models.py:177 views/texts.py:703
msgid "Content"
msgstr "Contenido"
-#: models.py:178 models.py:599
+#: models.py:178 models.py:615
msgid "Tags"
msgstr "Etiquetas"
@@ -83,121 +84,116 @@
msgid "Moderation a posteriori?"
msgstr "¿Moderar a posteriori?"
-#: models.py:285
+#: models.py:300
msgid "Format:"
msgstr "Formato:"
-#: models.py:361
-#, python-format
-msgid "%(workspace_name)s's workspace"
-msgstr "espacio de trabajo %(workspace_name)s"
-
-#: models.py:502
+#: models.py:518
msgid "name"
msgstr "nombre"
-#: models.py:503
+#: models.py:519
msgid "description"
msgstr "descripción"
-#: models.py:593
+#: models.py:609
msgid "Allow contact"
msgstr "Permitir contacto"
-#: models.py:593
+#: models.py:609
msgid "Allow email messages from other users"
msgstr "Permitir correos electrónicos de otros usuarios"
-#: models.py:594
+#: models.py:610
msgid "Preferred language"
msgstr "Idioma preferido"
-#: models.py:597
+#: models.py:613
msgid "Suspended access"
msgstr "Acceso anulado"
-#: models.py:621
+#: models.py:637
msgid "suspended"
msgstr "anulado"
-#: models.py:623
+#: models.py:639
msgid "waiting approval"
msgstr "esperando aprobación"
-#: models.py:629
+#: models.py:645
msgid "pending"
msgstr "pendiente"
-#: models.py:644
+#: models.py:660
msgid "Invitation"
msgstr "Invitación"
-#: models.py:712
+#: models.py:728
#, python-format
msgid "Text %(link_to_text)s edited"
msgstr "Texto %(link_to_text)s editado "
-#: models.py:713
+#: models.py:729
#, python-format
msgid "Text %(link_to_text)s edited (new version created)"
msgstr "Texto %(link_to_text)s editado (se ha creado una nueva versión)"
-#: models.py:714
+#: models.py:730
#, python-format
msgid "Text %(link_to_text)s added"
msgstr "Texto %(link_to_text)s añadido"
-#: models.py:715
+#: models.py:731
#, python-format
msgid "Text %(link_to_text)s removed"
msgstr "Texto %(link_to_text)s eliminado"
-#: models.py:716
+#: models.py:732
#, python-format
msgid "Comment %(link_to_comment)s added on text %(link_to_text)s"
msgstr "Comentario %(link_to_comment)s añadido al texto %(link_to_text)s"
-#: models.py:717
+#: models.py:733
#, python-format
msgid "Comment %(link_to_comment)s removed from text %(link_to_text)s"
msgstr "Comentario %(link_to_comment)s eliminado del texto %(link_to_text)s"
-#: models.py:718
+#: models.py:734
#, python-format
msgid "User %(username)s added"
msgstr "Usuario %(username)s añadido"
-#: models.py:719
+#: models.py:735
#, python-format
msgid "User %(username)s access to workspace enabled"
msgstr "Permitido acceso de Usuario %(username)s a espacio de trabajo"
-#: models.py:720
+#: models.py:736
#, python-format
msgid "User %(username)s access to workspace refused"
msgstr "Denegado el acceso del Usuario %(username)s al espacio de trabajo"
-#: models.py:721
+#: models.py:737
#, python-format
msgid "User %(username)s access to workspace suspended"
msgstr "Anulado el acceso del Usuario %(username)s al espacio de trabajo"
-#: models.py:722
+#: models.py:738
#, python-format
msgid "User %(username)s access to workspace activated"
msgstr "Activado el acceso del Usuario %(username)s al espacio de trabajo"
-#: models.py:723
+#: models.py:739
#, python-format
msgid "User %(username)s has activated his account"
msgstr "El usuario %(username)s ha activado su cuenta"
-#: models.py:778 models.py:786
+#: models.py:794 models.py:802
#, python-format
msgid "by \"%(username)s\""
msgstr "por \"%(username)s\""
-#: models.py:780
+#: models.py:796
#, python-format
msgid "%(time_since)s ago"
msgstr "hace %(time_since)s"
@@ -550,7 +546,7 @@
msgid "texts"
msgstr "textos"
-#: templates/site/dashboard.html:264 templates/site/text_list.html:139
+#: templates/site/dashboard.html:264
msgid "comments"
msgstr "comentarios"
@@ -796,52 +792,96 @@
msgid "Subscribe to all text notifications"
msgstr "Suscribirse a todas las notificaciones del texto"
-#: templates/site/text_history.html:38
-msgid "Versions:"
-msgstr "Versiones:"
+#: templates/site/text_history.html:56
+#: templates/site/text_history_compare.html:28
+#: templates/site/text_history_version.html:28
+#, fuzzy
+msgid "Version list"
+msgstr "Versiones"
+
+#: templates/site/text_history.html:59
+msgid "Compare last two versions"
+msgstr ""
+
+#: templates/site/text_history.html:61
+#: templates/site/text_history_compare.html:36
+#: templates/site/text_history_version.html:40
+msgid "Most recent version"
+msgstr ""
-#: templates/site/text_history.html:46
-#, python-format
-msgid "version #%(v1number)s"
-msgstr "versión #%(v1number)s"
+#: templates/site/text_history.html:67
+msgid "Compare selected versions"
+msgstr ""
+
+#: templates/site/text_history.html:77
+#, fuzzy
+msgid "Version"
+msgstr "Versiones"
+
+#: templates/site/text_history.html:78
+#, fuzzy
+msgid "Selection"
+msgstr "Acciones"
+
+#: templates/site/text_history.html:80 templates/site/text_list.html:137
+msgid "Author"
+msgstr "Autor"
+
+#: templates/site/text_history.html:81
+msgid "Created"
+msgstr ""
-#: templates/site/text_history.html:46
-#, python-format
-msgid "by %(v1name)s"
-msgstr "por %(v1name)s"
+#: templates/site/text_history.html:82 templates/site/text_list.html:139
+#, fuzzy
+msgid "# comments"
+msgstr "comentarios"
+
+#: templates/site/text_history.html:102 templates/site/text_list.html:159
+msgid "View"
+msgstr "Visualizar"
+
+#: templates/site/text_history.html:103
+#: templates/site/text_history_version.html:33
+msgid "Compare with previous version"
+msgstr ""
+
+#: templates/site/text_history.html:104
+#, fuzzy
+msgid "Revert to this version"
+msgstr "Volver a la versión #%(v1_nid)s:"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "created %(v1created)s"
-msgstr "creado %(v1created)s"
+#: templates/site/text_history.html:105 templates/site/text_list.html:80
+#: templates/site/text_list.html.py:161
+msgid "Delete"
+msgstr "Borrar"
+
+#: templates/site/text_history.html:111
+#, fuzzy
+msgid "Are you sure you want to delete this version?"
+msgstr "¿Está seguro/a de que desea borrar este texto?"
-#: templates/site/text_history.html:54
-#, python-format
-msgid "differences between version #%(v1number)s and #%(v2number)s"
+#: templates/site/text_history_compare.html:30
+#: templates/site/text_history_compare.html:34
+#: templates/site/text_history_version.html:30
+#, fuzzy, python-format
+msgid "Version %(version_number)s"
+msgstr "version %(title)s / #%(version_number)s"
+
+#: templates/site/text_history_compare.html:32
+#, fuzzy, python-format
+msgid ""
+"Comparison between version #%(version_1_number)s and #%(version_2_number)s"
msgstr "diferencias entre las versiones #%(v1number)s y #%(v2number)s"
-#: templates/site/text_history.html:66
-#, fuzzy, python-format
-msgid "Revert to version #%(v1_nid)s"
-msgstr "Volver a la versión #%(v1_nid)s:"
-
-#: templates/site/text_history.html:70
-#, python-format
-msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
-msgstr "Diferencias entre las versiones #%(v1_nid)s y #%(v2_nid)s"
-
-#: templates/site/text_history.html:73 templates/site/text_history.html:85
-#: templates/site/text_history.html:91
-#, fuzzy, python-format
-msgid "Version #%(version_number)s created on %(date)s"
-msgstr ""
-"La versión #%(version_number)s, titulada \"%(title)s\", y creada en %(date)s:"
-
-#: templates/site/text_history.html:101
+#: templates/site/text_history_compare.html:43
#, fuzzy
msgid "No differences"
msgstr "Preferencias"
+#: templates/site/text_history_version.html:37
+msgid "Compare with next version"
+msgstr ""
+
#: templates/site/text_list.html:12
msgid "Texts"
msgstr "Textos"
@@ -867,10 +907,6 @@
msgid "Bulk Actions"
msgstr "Acciones masivas"
-#: templates/site/text_list.html:80 templates/site/text_list.html.py:161
-msgid "Delete"
-msgstr "Borrar"
-
#: templates/site/text_list.html:83 templates/site/user_list.html:81
msgid "Apply"
msgstr "Aplicar"
@@ -883,10 +919,6 @@
msgid "Text"
msgstr "Texto"
-#: templates/site/text_list.html:137
-msgid "Author"
-msgstr "Autor"
-
#: templates/site/text_list.html:138
msgid "Modified"
msgstr "Modificado"
@@ -907,10 +939,6 @@
msgid "Filter by tag: %(tag_name)s"
msgstr ""
-#: templates/site/text_list.html:159
-msgid "View"
-msgstr "Visualizar"
-
#: templates/site/text_list.html:160 templates/site/macros/text_tabs.html:12
#: templates/site/macros/user_actions.html:19
#, fuzzy
@@ -1427,49 +1455,54 @@
msgid "Text %(text_title)s deleted"
msgstr "El texto %(text_title)s ha sido borrado"
-#: views/texts.py:621
+#: views/texts.py:221
+#, fuzzy, python-format
+msgid "Text version %(text_version_title)s deleted"
+msgstr "El texto %(text_title)s ha sido borrado"
+
+#: views/texts.py:616
msgid "Note (optional)"
msgstr "Nota (opcional)"
-#: views/texts.py:624
+#: views/texts.py:619
msgid "Add a note to explain the modifications made to the text"
msgstr "Añadir una nota para explicar las modificaciones realizadas al texto"
-#: views/texts.py:634
+#: views/texts.py:629
msgid "New version (optional)"
msgstr "Nueva versión (opcional)"
-#: views/texts.py:637
+#: views/texts.py:632
msgid "Create a new version of this text (recommended)"
msgstr "Crear una nueva versión de este texto (recomendado)"
-#: views/texts.py:640
+#: views/texts.py:635
msgid "Keep comments (optional)"
msgstr "mantener los comentarios (opcional)"
-#: views/texts.py:643
+#: views/texts.py:638
msgid "Keep comments (if not affected by the edit)"
msgstr "mantener los comentarios (si no son afectados por la edición)"
-#: views/texts.py:706
+#: views/texts.py:701
msgid "Name (optional)"
msgstr "Nombre (opcional)"
-#: views/texts.py:707
+#: views/texts.py:702
msgid "Email (optional)"
msgstr "Email (opcional)"
-#: views/texts.py:757
-#, python-format
-msgid "A new version (copied from version %(version_id)s) has been created"
+#: views/texts.py:752
+#, fuzzy, python-format
+msgid "A new version (copied from version %(version_title)s) has been created"
msgstr "Se ha creado una nueva versión (copiada de la versión %(version_id)s)"
-#: views/texts.py:865 views/user.py:79 views/user.py:99
+#: views/texts.py:860 views/user.py:79 views/user.py:99
#, python-format
msgid "%(count)i user(s) role modified"
msgstr "Perfil del/de los usuario(s) %(count)i modificado(s)"
-#: views/texts.py:923
+#: views/texts.py:918
msgid "Text settings updated"
msgstr "Ajustes del texto actualizados"
@@ -1636,6 +1669,30 @@
"Se ha registrado. Por favor, compruebe que ha recibido el mensaje de "
"confirmación en su correo electrónico."
+#~ msgid "%(workspace_name)s's workspace"
+#~ msgstr "espacio de trabajo %(workspace_name)s"
+
+#~ msgid "Versions:"
+#~ msgstr "Versiones:"
+
+#~ msgid "version #%(v1number)s"
+#~ msgstr "versión #%(v1number)s"
+
+#~ msgid "by %(v1name)s"
+#~ msgstr "por %(v1name)s"
+
+#~ msgid "created %(v1created)s"
+#~ msgstr "creado %(v1created)s"
+
+#~ msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
+#~ msgstr "Diferencias entre las versiones #%(v1_nid)s y #%(v2_nid)s"
+
+#, fuzzy
+#~ msgid "Version #%(version_number)s created on %(date)s"
+#~ msgstr ""
+#~ "La versión #%(version_number)s, titulada \"%(title)s\", y creada en %"
+#~ "(date)s:"
+
#~ msgid "You've been invited to join the workspace %(workspace_name)s."
#~ msgstr ""
#~ "Se le ha invitado a unirse al espacio de trabajo %(workspace_name)s."
@@ -1701,9 +1758,6 @@
#~ msgid "Actions:"
#~ msgstr "Acciones:"
-#~ msgid "%(title)s / version #%(version_number)s"
-#~ msgstr "version %(title)s / #%(version_number)s"
-
#~ msgid "created %(date)s"
#~ msgstr "creado en %(date)s"
Binary file src/cm/locale/fr/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/fr/LC_MESSAGES/django.po Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/locale/fr/LC_MESSAGES/django.po Tue Feb 09 22:20:08 2010 +0100
@@ -7,8 +7,8 @@
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-02 16:42+0100\n"
-"PO-Revision-Date: 2010-01-26 17:28+0100\n"
+"POT-Creation-Date: 2010-02-05 15:11+0100\n"
+"PO-Revision-Date: 2010-02-05 15:14+0100\n"
"Last-Translator: dev <dev@sopinspace.com>\n"
"Language-Team: <en@li.org>\n"
"MIME-Version: 1.0\n"
@@ -18,45 +18,43 @@
"X-Generator: KBabel 1.11.4\n"
#: client.py:25
-msgid ""
-"A selection is required. Select in the text the part your comment applies to."
-msgstr ""
-"Une portée est obligatoire. Sélectionner dans le texte la partie sur "
-"laquelle porte votre commentaire."
+msgid "A selection is required. Select in the text the part your comment applies to."
+msgstr "Une portée est obligatoire. Sélectionner dans le texte la partie sur laquelle porte votre commentaire."
-#: client.py:133
+#: client.py:134
msgid "name is required"
msgstr "le nom est obligatoire"
-#: client.py:136
+#: client.py:137
msgid "email is required"
msgstr "l'email est obligatoire"
-#: client.py:138
+#: client.py:139
msgid "invalid email"
msgstr "l'email est invalide"
-#: client.py:140
+#: client.py:141
msgid "title is required"
msgstr "le titre est obligatoire"
-#: client.py:142
+#: client.py:143
msgid "content is required"
msgstr "le texte est obligatoire"
-#: client.py:157
+#: client.py:158
msgid "comment removed"
msgstr "commentaire supprimé"
-#: client.py:208 client.py:273
+#: client.py:209
+#: client.py:274
msgid "comment saved"
msgstr "commentaire sauvé"
-#: client.py:275
+#: client.py:276
msgid "comment saved, it is being held for moderation"
msgstr "commentaire sauvé, en attente de modération"
-#: client.py:336
+#: client.py:337
msgid "Tags input must be no longer than 250 characters."
msgstr "La longueur des tags est limitée à 250 caractères."
@@ -64,7 +62,11 @@
msgid "unknown"
msgstr "inconnu"
-#: models.py:175 views/create.py:30 views/create.py:45 views/texts.py:617
+#: models.py:175
+#: templates/site/text_history.html:79
+#: views/create.py:30
+#: views/create.py:45
+#: views/texts.py:612
msgid "Title"
msgstr "Titre"
@@ -72,15 +74,18 @@
msgid "Format"
msgstr "Format"
-#: models.py:177 views/texts.py:708
+#: models.py:177
+#: views/texts.py:703
msgid "Content"
msgstr "Texte"
-#: models.py:178 models.py:599
+#: models.py:178
+#: models.py:615
msgid "Tags"
msgstr "Tags"
-#: models.py:180 views/user.py:223
+#: models.py:180
+#: views/user.py:223
msgid "Note"
msgstr "Note"
@@ -88,122 +93,117 @@
msgid "Moderation a posteriori?"
msgstr "Modération a posteriori ?"
-#: models.py:285
+#: models.py:300
msgid "Format:"
msgstr "Format :"
-#: models.py:361
-#, python-format
-msgid "%(workspace_name)s's workspace"
-msgstr "espace de travail : %(workspace_name)s"
-
-#: models.py:502
+#: models.py:518
msgid "name"
msgstr "nom"
-#: models.py:503
+#: models.py:519
msgid "description"
msgstr "description"
-#: models.py:593
+#: models.py:609
msgid "Allow contact"
msgstr "Autorise à être contacté"
-#: models.py:593
+#: models.py:609
msgid "Allow email messages from other users"
-msgstr ""
-"Autoriser les participants de l'espace de travail à vous envoyer un email"
+msgstr "Autoriser les participants de l'espace de travail à vous envoyer un email"
-#: models.py:594
+#: models.py:610
msgid "Preferred language"
msgstr "Langage de préférence"
-#: models.py:597
+#: models.py:613
msgid "Suspended access"
msgstr "Accès désactivé"
-#: models.py:621
+#: models.py:637
msgid "suspended"
msgstr "désactivé"
-#: models.py:623
+#: models.py:639
msgid "waiting approval"
msgstr "en attente d'approbation"
-#: models.py:629
+#: models.py:645
msgid "pending"
msgstr "en attente"
-#: models.py:644
+#: models.py:660
msgid "Invitation"
msgstr "Invitation"
-#: models.py:712
+#: models.py:728
#, python-format
msgid "Text %(link_to_text)s edited"
msgstr "Le texte %(link_to_text)s a été édité"
-#: models.py:713
+#: models.py:729
#, python-format
msgid "Text %(link_to_text)s edited (new version created)"
msgstr "Le texte %(link_to_text)s a été édité (nouvelle version créée)"
-#: models.py:714
+#: models.py:730
#, python-format
msgid "Text %(link_to_text)s added"
msgstr "Le texte %(link_to_text)s a été ajouté"
-#: models.py:715
+#: models.py:731
#, python-format
msgid "Text %(link_to_text)s removed"
msgstr "Le texte %(link_to_text)s a été supprimé"
-#: models.py:716
+#: models.py:732
#, python-format
msgid "Comment %(link_to_comment)s added on text %(link_to_text)s"
msgstr "Commentaire %(link_to_comment)s ajouté sur le texte %(link_to_text)s"
-#: models.py:717
+#: models.py:733
#, python-format
msgid "Comment %(link_to_comment)s removed from text %(link_to_text)s"
msgstr "Commentaire %(link_to_comment)s supprimé du texte %(link_to_text)s"
-#: models.py:718
+#: models.py:734
#, python-format
msgid "User %(username)s added"
msgstr "L'utilisateur %(username)s a été ajouté"
-#: models.py:719
+#: models.py:735
#, python-format
msgid "User %(username)s access to workspace enabled"
msgstr "Accès de utilisateur %(username)s à l'espace de travail activé"
-#: models.py:720
+#: models.py:736
#, python-format
msgid "User %(username)s access to workspace refused"
msgstr "Accès de utilisateur %(username)s à l'espace de travail suspendu"
-#: models.py:721
+#: models.py:737
#, python-format
msgid "User %(username)s access to workspace suspended"
msgstr "Accès de utilisateur %(username)s à l'espace de travail suspendu"
-#: models.py:722
+#: models.py:738
#, python-format
msgid "User %(username)s access to workspace activated"
msgstr "Accès de utilisateur %(username)s à l'espace de travail activé"
-#: models.py:723
+#: models.py:739
#, python-format
msgid "User %(username)s has activated his account"
msgstr "L'utilisateur %(username)s a activé son compte"
-#: models.py:778 models.py:786
+#: models.py:794
+#: models.py:802
#, python-format
msgid "by \"%(username)s\""
msgstr "par \"%(username)s\""
-#: models.py:780
+#: models.py:796
#, python-format
msgid "%(time_since)s ago"
msgstr "il y a %(time_since)s"
@@ -246,9 +246,10 @@
#: settings.py:109
msgid "Spanish"
-msgstr ""
+msgstr "Espagnol"
-#: static_i18n.py:6 static_i18n.py:11
+#: static_i18n.py:6
+#: static_i18n.py:11
msgid "Observer"
msgstr "Observateur"
@@ -360,7 +361,8 @@
msgid "An error has occurred."
msgstr "Une erreur s'est produite."
-#: templates/site/activate.html:10 templates/site/user_activate.html:10
+#: templates/site/activate.html:10
+#: templates/site/user_activate.html:10
#: views/user.py:330
msgid "Activate your account"
msgstr "Activer votre compte"
@@ -369,7 +371,8 @@
msgid "Activate"
msgstr "Activer"
-#: templates/site/contact.html:6 templates/site/layout/footer.html:9
+#: templates/site/contact.html:6
+#: templates/site/layout/footer.html:9
#: templates/site/macros/user_actions.html:20
msgid "Contact"
msgstr "Contact"
@@ -380,15 +383,20 @@
#: templates/site/contact.html:26
#: templates/site/notifications_desactivate.html:32
-#: templates/site/settings.html:23 templates/site/text_create_content.html:47
-#: templates/site/text_create_upload.html:42 templates/site/user_add.html:34
-#: templates/site/user_add_text.html:38 templates/site/user_contact.html:25
-#: templates/site/user_edit.html:29 templates/site/user_mass_add.html:34
+#: templates/site/settings.html:23
+#: templates/site/text_create_content.html:47
+#: templates/site/text_create_upload.html:42
+#: templates/site/user_add.html:34
+#: templates/site/user_add_text.html:38
+#: templates/site/user_contact.html:25
+#: templates/site/user_edit.html:29
+#: templates/site/user_mass_add.html:34
#: templates/site/user_mass_add_text.html:38
msgid "Cancel"
msgstr "Annuler"
-#: templates/site/dashboard.html:12 templates/site/macros/main_tabs.html:10
+#: templates/site/dashboard.html:12
+#: templates/site/macros/main_tabs.html:10
msgid "Dashboard"
msgstr "Tableau de bord"
@@ -396,16 +404,20 @@
msgid "Actions"
msgstr "Actions"
-#: templates/site/dashboard.html:48 templates/site/text_create_content.html:4
+#: templates/site/dashboard.html:48
+#: templates/site/text_create_content.html:4
#: templates/site/text_create_content.html:28
-#: templates/site/text_create_upload.html:26 templates/site/text_list.html:40
+#: templates/site/text_create_upload.html:26
+#: templates/site/text_list.html:40
#: templates/site/layout/header.html:10
msgid "Write a text"
msgstr "Ecrire un texte"
-#: templates/site/dashboard.html:49 templates/site/text_create_content.html:30
+#: templates/site/dashboard.html:49
+#: templates/site/text_create_content.html:30
#: templates/site/text_create_upload.html:4
-#: templates/site/text_create_upload.html:28 templates/site/text_list.html:42
+#: templates/site/text_create_upload.html:28
+#: templates/site/text_list.html:42
#: templates/site/layout/header.html:11
msgid "Upload a text"
msgstr "Charger un texte"
@@ -435,11 +447,13 @@
msgid "user %(user)s awaits approval"
msgstr "l'utilisateur %(user)s est en attente d'approbation"
-#: templates/site/dashboard.html:80 templates/site/dashboard.html.py:126
+#: templates/site/dashboard.html:80
+#: templates/site/dashboard.html.py:126
msgid "approve"
msgstr "accepter"
-#: templates/site/dashboard.html:80 templates/site/dashboard.html.py:126
+#: templates/site/dashboard.html:80
+#: templates/site/dashboard.html.py:126
msgid "refuse"
msgstr "refuser"
@@ -449,26 +463,21 @@
#: templates/site/dashboard.html:85
#: templates/site/macros/user_moderation.html:8
-msgid ""
-"Are you sure you want to approve this user's membership to the workspace?"
-msgstr ""
-"Etes-vous sûr de vouloir accepter l'accès de cet utilisateur à l'espace de "
-"travail ?"
+msgid "Are you sure you want to approve this user's membership to the workspace?"
+msgstr "Etes-vous sûr de vouloir accepter l'accès de cet utilisateur à l'espace de travail ?"
#: templates/site/dashboard.html:94
#: templates/site/macros/user_moderation.html:17
-msgid ""
-"Are you sure you want to refuse this user's membership to the workspace?"
-msgstr ""
-"Etes-vous sûr de vouloir refuser l'accès de cet utilisateur à l'espace de "
-"travail ?"
+msgid "Are you sure you want to refuse this user's membership to the workspace?"
+msgstr "Etes-vous sûr de vouloir refuser l'accès de cet utilisateur à l'espace de travail ?"
#: templates/site/dashboard.html:106
#, python-format
msgid "registered %(duration)s ago"
msgstr "enregistré il y a %(duration)s"
-#: templates/site/dashboard.html:120 templates/site/dashboard.html.py:126
+#: templates/site/dashboard.html:120
+#: templates/site/dashboard.html.py:126
msgid "comment"
msgstr "commentaire"
@@ -493,7 +502,8 @@
msgid "Are you sure you want to refuse this comment?"
msgstr "Etes vous sûr de vouloir refuser ce commentaire ?"
-#: templates/site/dashboard.html:168 templates/site/dashboard.html.py:201
+#: templates/site/dashboard.html:168
+#: templates/site/dashboard.html.py:201
#, python-format
msgid "modified %(duration)s ago"
msgstr "modifié il y a %(duration)s"
@@ -502,7 +512,8 @@
msgid "Recent texts"
msgstr "Textes récents"
-#: templates/site/dashboard.html:186 templates/site/macros/paginator.html:9
+#: templates/site/dashboard.html:186
+#: templates/site/macros/paginator.html:9
msgid "all"
msgstr "tous"
@@ -513,7 +524,8 @@
msgstr[0] "%(nb_comments)s commentaire"
msgstr[1] "%(nb_comments)s commentaires"
-#: templates/site/dashboard.html:206 templates/site/text_list.html:221
+#: templates/site/dashboard.html:206
+#: templates/site/text_list.html:221
msgid "No texts yet"
msgstr "Aucun texte"
@@ -537,8 +549,10 @@
msgid "Access"
msgstr "Accès"
-#: templates/site/dashboard.html:233 templates/site/dashboard.html.py:244
-#: templates/site/text_list.html:206 templates/site/user_list.html:158
+#: templates/site/dashboard.html:233
+#: templates/site/dashboard.html.py:244
+#: templates/site/text_list.html:206
+#: templates/site/user_list.html:158
#: templates/site/user_list.html.py:188
msgid "Loading..."
msgstr "Chargement ..."
@@ -555,7 +569,7 @@
msgid "texts"
msgstr "textes"
-#: templates/site/dashboard.html:264 templates/site/text_list.html:139
+#: templates/site/dashboard.html:264
msgid "comments"
msgstr "commentaires"
@@ -584,21 +598,26 @@
msgid "No comments yet"
msgstr "Aucun commentaire"
-#: templates/site/followup.html:7 templates/site/macros/main_tabs.html:16
+#: templates/site/followup.html:7
+#: templates/site/macros/main_tabs.html:16
#: templates/site/macros/text_tabs.html:22
msgid "Followup"
msgstr "Suivi"
-#: templates/site/followup.html:20 templates/site/text_followup.html:22
+#: templates/site/followup.html:20
+#: templates/site/text_followup.html:22
msgid "Feeds"
msgstr "Flux"
-#: templates/site/followup.html:22 templates/site/text_followup.html:24
+#: templates/site/followup.html:22
+#: templates/site/text_followup.html:24
msgid "Public feed"
msgstr "Flux public"
-#: templates/site/followup.html:22 templates/site/followup.html.py:35
-#: templates/site/help.html:6 templates/site/text_embed.html:27
+#: templates/site/followup.html:22
+#: templates/site/followup.html.py:35
+#: templates/site/help.html:6
+#: templates/site/text_embed.html:27
#: templates/site/layout/footer.html:26
#: templates/site/macros/form_fields.html:15
msgid "Help"
@@ -612,7 +631,8 @@
msgid "This is the public feed for the workspace."
msgstr "Ceci est le flux public de l'espace de travail."
-#: templates/site/followup.html:35 templates/site/text_followup.html:37
+#: templates/site/followup.html:35
+#: templates/site/text_followup.html:37
msgid "Private feed"
msgstr "Flux privé"
@@ -621,19 +641,16 @@
msgstr "Flux privé de l'espace de travail"
#: templates/site/followup.html:43
-msgid ""
-"This is the private feed for the workspace. Don't share this address with "
-"others unless you want them to see all activities on the workspace."
-msgstr ""
-"Ceci est le flux privé de l'espace de travail. Ne partagez cette adresse que "
-"si vous voulez que d'autres que vous-même puissent suivre toutes les "
-"activités de l'espace de travail."
+msgid "This is the private feed for the workspace. Don't share this address with others unless you want them to see all activities on the workspace."
+msgstr "Ceci est le flux privé de l'espace de travail. Ne partagez cette adresse que si vous voulez que d'autres que vous-même puissent suivre toutes les activités de l'espace de travail."
-#: templates/site/followup.html:45 templates/site/text_followup.html:47
+#: templates/site/followup.html:45
+#: templates/site/text_followup.html:47
msgid "Reset private feed url"
msgstr "Réinitialiser l'adresse du flux privé"
-#: templates/site/followup.html:49 templates/site/text_followup.html:51
+#: templates/site/followup.html:49
+#: templates/site/text_followup.html:51
msgid "Activate private feed"
msgstr "Activer le flux privé"
@@ -641,7 +658,8 @@
msgid "The private feed for this workspace is not yet activated."
msgstr "Le flux privé de cet espace de travail n'est pas encore activé."
-#: templates/site/followup.html:55 templates/site/text_followup.html:58
+#: templates/site/followup.html:55
+#: templates/site/text_followup.html:58
msgid "Email notifications"
msgstr "Notifications par email"
@@ -650,14 +668,11 @@
msgstr "S'abonner aux notifications de l'espace de travail"
#: templates/site/followup.html:62
-msgid ""
-"Subscribe to all replies notifications in discussions where you have "
-"participated"
-msgstr ""
-"S'abonner aux notifications concernant les commentaires ou réponses dans les "
-"discussions auxquelles vous avez participé"
+msgid "Subscribe to all replies notifications in discussions where you have participated"
+msgstr "S'abonner aux notifications concernant les commentaires ou réponses dans les discussions auxquelles vous avez participé"
-#: templates/site/login.html:8 templates/site/login_form.html:19
+#: templates/site/login.html:8
+#: templates/site/login_form.html:19
#: templates/site/layout/header.html:17
msgid "Login"
msgstr "Se connecter"
@@ -667,7 +682,8 @@
msgid "%(wname)s Login"
msgstr "Se connecter à %(wname)s"
-#: templates/site/login_form.html:20 templates/site/register.html:8
+#: templates/site/login_form.html:20
+#: templates/site/register.html:8
#: templates/site/layout/header.html:18
msgid "Register"
msgstr "S'enregistrer"
@@ -692,15 +708,20 @@
msgid "Desactivate"
msgstr "Désactiver"
-#: templates/site/profile.html:6 templates/site/profile.html.py:14
+#: templates/site/profile.html:6
+#: templates/site/profile.html.py:14
#, python-format
msgid "Your profile (%(username)s)"
msgstr "Votre profil (%(username)s)"
-#: templates/site/profile.html:26 templates/site/text_create_content.html:45
-#: templates/site/text_create_upload.html:40 templates/site/text_edit.html:36
-#: templates/site/text_settings.html:23 templates/site/text_share.html:153
-#: templates/site/user_activate.html:27 templates/site/user_list.html:210
+#: templates/site/profile.html:26
+#: templates/site/text_create_content.html:45
+#: templates/site/text_create_upload.html:40
+#: templates/site/text_edit.html:36
+#: templates/site/text_settings.html:23
+#: templates/site/text_share.html:153
+#: templates/site/user_activate.html:27
+#: templates/site/user_list.html:210
#: templates/site/layout/base_workspace_form.html:32
msgid "Save"
msgstr "Enregistrer"
@@ -710,22 +731,20 @@
msgid "%(wname)s Registration"
msgstr "S'enregistrer sur %(wname)s"
-#: templates/site/settings.html:5 templates/site/text_list.html:181
+#: templates/site/settings.html:5
+#: templates/site/text_list.html:181
#: templates/site/macros/main_tabs.html:14
#: templates/site/macros/text_tabs.html:19
msgid "Settings"
msgstr "Paramètres"
#: templates/site/settings.html:32
-msgid ""
-"Are you sure you want to change the role model? All roles (except managers) "
-"will be resetted!"
-msgstr ""
-"Etes-vous sur de vouloir modifier le modèle des rôles ? Tous les roles "
-"actifs (excepté les gestionnaires) seront remis à zéro !"
+msgid "Are you sure you want to change the role model? All roles (except managers) will be resetted!"
+msgstr "Etes-vous sur de vouloir modifier le modèle des rôles ? Tous les roles actifs (excepté les gestionnaires) seront remis à zéro !"
#: templates/site/text_create_content.html:26
-#: templates/site/text_create_upload.html:24 templates/site/text_list.html:37
+#: templates/site/text_create_upload.html:24
+#: templates/site/text_list.html:37
msgid "Text list"
msgstr "Textes"
@@ -739,30 +758,19 @@
#: templates/site/text_embed.html:26
msgid "Copy this code into your site to display text with comments."
-msgstr ""
-"Copier ce code dans votre site pour afficher le texte et ses commentaires."
+msgstr "Copier ce code dans votre site pour afficher le texte et ses commentaires."
#: templates/site/text_embed.html:26
-#, fuzzy
-msgid ""
-"Users will also be able to add comments from your site depending on "
-"anonymous users' roles."
-msgstr ""
-" Les utilisateurs pourront ajouter leurs commentaires (si vous avez activé "
-"cette possiblité)."
+msgid "Users will also be able to add comments from your site depending on anonymous users' roles."
+msgstr " Les utilisateurs pourront ajouter leurs commentaires (si vous avez activé cette possiblité)."
#: templates/site/text_embed.html:36
msgid "Warning:"
msgstr "Attention: "
#: templates/site/text_embed.html:36
-msgid ""
-"You won't successfully embed the text before you give anonymous users a role "
-"allowing them to view the text."
-msgstr ""
-"Vous ne pourrez pas encapsuler votre texte dans un site externe si vous ne "
-"donnez pas aux utilisateurs anonymes un rôle leur permettant de voir le "
-"texte."
+msgid "You won't successfully embed the text before you give anonymous users a role allowing them to view the text."
+msgstr "Vous ne pourrez pas encapsuler votre texte dans un site externe si vous ne donnez pas aux utilisateurs anonymes un rôle leur permettant de voir le texte."
#: templates/site/text_followup.html:7
msgid "Text followup"
@@ -782,123 +790,158 @@
msgstr "Flux privé du texte"
#: templates/site/text_followup.html:45
-msgid ""
-"This is the private feed for the text. Don't share this address with others "
-"unless you want them to see all activities on this text."
-msgstr ""
-"Ceci est le flux privé du texte. Ne partagez cette adresse que si vous "
-"voulez que d'autres que vous-même puissent suivre toutes les activités du "
-"texte."
+msgid "This is the private feed for the text. Don't share this address with others unless you want them to see all activities on this text."
+msgstr "Ceci est le flux privé du texte. Ne partagez cette adresse que si vous voulez que d'autres que vous-même puissent suivre toutes les activités du texte."
#: templates/site/text_followup.html:53
msgid "The private feed for this text is not yet activated."
msgstr "Le flux privé de ce texte n'est pas encore activé."
#: templates/site/text_followup.html:61
-msgid ""
-"You will receive text notifications because you subscribed to notifications "
-"at the workspace level"
-msgstr ""
-"Vous recevrez les notifications de ce texte parce que vous vous êtes abonné "
-"aux notifications au niveau de l'espace de travail tout entier"
+msgid "You will receive text notifications because you subscribed to notifications at the workspace level"
+msgstr "Vous recevrez les notifications de ce texte parce que vous vous êtes abonné aux notifications au niveau de l'espace de travail tout entier"
#: templates/site/text_followup.html:64
msgid "Subscribe to all text notifications"
msgstr "S'abonner aux notifications du texte"
-#: templates/site/text_history.html:38
-msgid "Versions:"
-msgstr "Versions :"
+#: templates/site/text_history.html:56
+#: templates/site/text_history_compare.html:28
+#: templates/site/text_history_version.html:28
+msgid "Version list"
+msgstr "Liste des versions"
+
+#: templates/site/text_history.html:59
+msgid "Compare last two versions"
+msgstr "Comparer les deux dernières versions"
+
+#: templates/site/text_history.html:61
+#: templates/site/text_history_compare.html:36
+#: templates/site/text_history_version.html:40
+msgid "Most recent version"
+msgstr "Version la plus récente"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "version #%(v1number)s"
-msgstr "version n°%(v1number)s"
+#: templates/site/text_history.html:67
+msgid "Compare selected versions"
+msgstr "Comparer les versions selectionnées"
+
+#: templates/site/text_history.html:77
+msgid "Version"
+msgstr "Version"
+
+#: templates/site/text_history.html:78
+msgid "Selection"
+msgstr "Sélection"
+
+#: templates/site/text_history.html:80
+#: templates/site/text_list.html:137
+msgid "Author"
+msgstr "Auteur"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "by %(v1name)s"
-msgstr "par %(v1name)s"
+#: templates/site/text_history.html:81
+msgid "Created"
+msgstr "Crée"
+
+#: templates/site/text_history.html:82
+#: templates/site/text_list.html:139
+msgid "# comments"
+msgstr "nb. de commentaires"
+
+#: templates/site/text_history.html:102
+#: templates/site/text_list.html:159
+msgid "View"
+msgstr "Voir"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "created %(v1created)s"
-msgstr "créé le %(v1created)s"
+#: templates/site/text_history.html:103
+#: templates/site/text_history_version.html:33
+msgid "Compare with previous version"
+msgstr "Comparer avec la version précédente"
+
+#: templates/site/text_history.html:104
+msgid "Revert to this version"
+msgstr "Revenir à cette version"
-#: templates/site/text_history.html:54
+#: templates/site/text_history.html:105
+#: templates/site/text_list.html:80
+#: templates/site/text_list.html.py:161
+msgid "Delete"
+msgstr "Supprimer"
+
+#: templates/site/text_history.html:111
+msgid "Are you sure you want to delete this version?"
+msgstr "Etes-vous sûr de vouloir supprimer cette version ?"
+
+#: templates/site/text_history_compare.html:30
+#: templates/site/text_history_compare.html:34
+#: templates/site/text_history_version.html:30
#, python-format
-msgid "differences between version #%(v1number)s and #%(v2number)s"
-msgstr "différences entre les versions n°%(v1number)s et n°%(v2number)s :"
+msgid "Version %(version_number)s"
+msgstr "Version n°%(version_number)s"
-#: templates/site/text_history.html:66
-#, python-format
-msgid "Revert to version #%(v1_nid)s"
-msgstr "Revenir à la version n°%(v1_nid)s"
-
-#: templates/site/text_history.html:70
+#: templates/site/text_history_compare.html:32
#, python-format
-msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
-msgstr "Différences entre les versions n°%(v1_nid)s et n°%(v2_nid)s :"
+msgid "Comparison between version #%(version_1_number)s and #%(version_2_number)s"
+msgstr "Différences entre les versions n°%(version_1_number)s et n°%(version_2_number)s"
-#: templates/site/text_history.html:73 templates/site/text_history.html:85
-#: templates/site/text_history.html:91
-#, python-format
-msgid "Version #%(version_number)s created on %(date)s"
-msgstr "Version n°%(version_number)s créée le %(date)s :"
-
-#: templates/site/text_history.html:101
+#: templates/site/text_history_compare.html:43
msgid "No differences"
msgstr "Pas de différences"
+#: templates/site/text_history_version.html:37
+msgid "Compare with next version"
+msgstr "Comparer avec la version suivante"
+
#: templates/site/text_list.html:12
msgid "Texts"
msgstr "Textes"
-#: templates/site/text_list.html:47 templates/site/text_share.html:35
-#: templates/site/user_list.html:7 templates/site/user_list.html.py:32
-#: templates/site/user_list.html:40 templates/site/user_list.html.py:116
+#: templates/site/text_list.html:47
+#: templates/site/text_share.html:35
+#: templates/site/user_list.html:7
+#: templates/site/user_list.html.py:32
+#: templates/site/user_list.html:40
+#: templates/site/user_list.html.py:116
msgid "People' list"
msgstr "Liste des utilisateurs"
-#: templates/site/text_list.html:50 templates/site/text_share.html:40
+#: templates/site/text_list.html:50
+#: templates/site/text_share.html:40
#: templates/site/user_list.html:45
msgid "Filter by tag:"
msgstr "Filtrer avec le mot-clé"
-#: templates/site/text_list.html:52 templates/site/text_share.html:42
+#: templates/site/text_list.html:52
+#: templates/site/text_share.html:42
#: templates/site/user_list.html:47
msgid "All"
msgstr "Tous"
-#: templates/site/text_list.html:79 templates/site/user_list.html:72
+#: templates/site/text_list.html:79
+#: templates/site/user_list.html:72
msgid "Bulk Actions"
msgstr "Actions multiples"
-#: templates/site/text_list.html:80 templates/site/text_list.html.py:161
-msgid "Delete"
-msgstr "Supprimer"
-
-#: templates/site/text_list.html:83 templates/site/user_list.html:81
+#: templates/site/text_list.html:83
+#: templates/site/user_list.html:81
msgid "Apply"
msgstr "Appliquer"
-#: templates/site/text_list.html:104 templates/site/user_list.html:102
+#: templates/site/text_list.html:104
+#: templates/site/user_list.html:102
msgid "Are you sure?"
msgstr "Etes vous sûr ?"
-#: templates/site/text_list.html:136 templates/site/macros/text_tabs.html:10
+#: templates/site/text_list.html:136
+#: templates/site/macros/text_tabs.html:10
msgid "Text"
msgstr "Texte"
-#: templates/site/text_list.html:137
-msgid "Author"
-msgstr "Auteur"
-
#: templates/site/text_list.html:138
msgid "Modified"
msgstr "Modifié"
-#: templates/site/text_list.html:140 templates/site/user_list.html:136
+#: templates/site/text_list.html:140
+#: templates/site/user_list.html:136
msgid "Last week activity"
msgstr "Activités de la dernière semaine"
@@ -913,11 +956,8 @@
msgid "Filter by tag: %(tag_name)s"
msgstr "Filtrer avec le mot-clé : %(tag_name)s"
-#: templates/site/text_list.html:159
-msgid "View"
-msgstr "Voir"
-
-#: templates/site/text_list.html:160 templates/site/macros/text_tabs.html:12
+#: templates/site/text_list.html:160
+#: templates/site/macros/text_tabs.html:12
#: templates/site/macros/user_actions.html:19
msgid "Edit"
msgstr "Editer"
@@ -934,51 +974,58 @@
msgid "Edit user"
msgstr "Editer l'utilisateur"
-#: templates/site/text_share.html:27 templates/site/user_add.html:20
-#: templates/site/user_add_text.html:23 templates/site/user_contact.html:19
-#: templates/site/user_edit.html:20 templates/site/user_mass_add.html:20
+#: templates/site/text_share.html:27
+#: templates/site/user_add.html:20
+#: templates/site/user_add_text.html:23
+#: templates/site/user_contact.html:19
+#: templates/site/user_edit.html:20
+#: templates/site/user_mass_add.html:20
#: templates/site/user_mass_add_text.html:23
msgid "Users' list"
msgstr "Liste des utilisateurs"
-#: templates/site/text_share.html:29 templates/site/user_add.html:6
-#: templates/site/user_add.html.py:22 templates/site/user_add_text.html:6
-#: templates/site/user_add_text.html:25 templates/site/user_contact.html:19
-#: templates/site/user_edit.html:22 templates/site/user_list.html:34
+#: templates/site/text_share.html:29
+#: templates/site/user_add.html:6
+#: templates/site/user_add.html.py:22
+#: templates/site/user_add_text.html:6
+#: templates/site/user_add_text.html:25
+#: templates/site/user_contact.html:19
+#: templates/site/user_edit.html:22
+#: templates/site/user_list.html:34
#: templates/site/user_mass_add.html:22
#: templates/site/user_mass_add_text.html:6
#: templates/site/user_mass_add_text.html:25
msgid "Add a new user"
msgstr "Ajouter un utilisateur"
-#: templates/site/text_share.html:31 templates/site/user_add.html:24
-#: templates/site/user_add_text.html:27 templates/site/user_list.html:36
-#: templates/site/user_mass_add.html:6 templates/site/user_mass_add.html:24
+#: templates/site/text_share.html:31
+#: templates/site/user_add.html:24
+#: templates/site/user_add_text.html:27
+#: templates/site/user_list.html:36
+#: templates/site/user_mass_add.html:6
+#: templates/site/user_mass_add.html:24
#: templates/site/user_mass_add_text.html:27
msgid "Add users in bulk"
msgstr "Ajouter des utilisateurs en masse"
-#: templates/site/text_share.html:38 templates/site/user_list.html:43
+#: templates/site/text_share.html:38
+#: templates/site/user_list.html:43
msgid "Hide suspended users"
msgstr "Masquer les utilisateurs désactivés"
-#: templates/site/text_share.html:38 templates/site/user_list.html:43
+#: templates/site/text_share.html:38
+#: templates/site/user_list.html:43
msgid "Display suspended users"
msgstr "Afficher les utilisateurs désactivés"
-#: templates/site/text_share.html:86 templates/site/user_list.html:132
+#: templates/site/text_share.html:86
+#: templates/site/user_list.html:132
msgid "User"
msgstr "Utilisateur"
#: templates/site/text_share.html:87
-msgid ""
-"The 'Workspace role' is the global role that applies to every text, you can "
-"give a user a particular role on this text using the 'text role' column on "
-"the right"
-msgstr ""
-"Le 'rôle dans l'espace de travail' est le rôle global qui s'applique à tous "
-"les textes. Vous pouvez donner à un utilisateur particulier un rôle "
-"différent sur ce texte via la colonne 'rôle sur le texte' à droite"
+msgid "The 'Workspace role' is the global role that applies to every text, you can give a user a particular role on this text using the 'text role' column on the right"
+msgstr "Le 'rôle dans l'espace de travail' est le rôle global qui s'applique à tous les textes. Vous pouvez donner à un utilisateur particulier un rôle différent sur ce texte via la colonne 'rôle sur le texte' à droite"
#: templates/site/text_share.html:87
msgid "Workspace role"
@@ -993,12 +1040,15 @@
msgid "This role has been overriden on this text by a text role: %(rolename)s"
msgstr "Ce rôle a été surchargé par un rôle sur le texte : %(rolename)s"
-#: templates/site/text_share.html:128 templates/site/user_edit.html:6
-#: templates/site/user_edit.html.py:24 templates/site/user_list.html:177
+#: templates/site/text_share.html:128
+#: templates/site/user_edit.html:6
+#: templates/site/user_edit.html.py:24
+#: templates/site/user_list.html:177
msgid "Edit anonymous users"
msgstr "Editer 'l'utilisateur anonyme'"
-#: templates/site/text_share.html:128 templates/site/user_list.html:177
+#: templates/site/text_share.html:128
+#: templates/site/user_list.html:177
msgid "Anonymous users"
msgstr "Utilisateurs anonymes"
@@ -1039,20 +1089,18 @@
"The user will receive an email invitation to join the workspace.\n"
"You can customize the email sent by using the 'Note' field bellow."
msgstr ""
-"L'utilisateur recevra un email d'invitation à rejoindre l'espace de "
-"travail.\n"
+"L'utilisateur recevra un email d'invitation à rejoindre l'espace de travail.\n"
"Vous pouvez personnaliser cet email en utilisant le champ 'Note' ci-dessous."
#: templates/site/user_add_text.html:29
msgid "The user will receive an email invitation to join the workspace."
-msgstr ""
-"L'utilisateur recevra un email d'invitation à rejoindre l'espace de travail."
+msgstr "L'utilisateur recevra un email d'invitation à rejoindre l'espace de travail."
-#: templates/site/user_add_text.html:30 templates/site/user_mass_add.html:27
+#: templates/site/user_add_text.html:30
+#: templates/site/user_mass_add.html:27
#: templates/site/user_mass_add_text.html:30
msgid "You can customize the email sent by using the 'Note' field bellow."
-msgstr ""
-"Vous pouvez personnaliser cet email en utilisant le champ 'Note' ci-dessous."
+msgstr "Vous pouvez personnaliser cet email en utilisant le champ 'Note' ci-dessous."
#: templates/site/user_contact.html:6
msgid "Contact user"
@@ -1063,16 +1111,19 @@
msgid "Contact user %(username)s"
msgstr "Contacter l'utilisateur %(username)s"
-#: templates/site/user_edit.html:6 templates/site/user_edit.html.py:24
+#: templates/site/user_edit.html:6
+#: templates/site/user_edit.html.py:24
#, python-format
msgid "Edit user %(username)s"
msgstr "Editer l'utilisateur %(username)s"
-#: templates/site/user_list.html:73 templates/site/macros/user_actions.html:28
+#: templates/site/user_list.html:73
+#: templates/site/macros/user_actions.html:28
msgid "Suspend access"
msgstr "Désactiver l'accès"
-#: templates/site/user_list.html:74 templates/site/macros/user_actions.html:23
+#: templates/site/user_list.html:74
+#: templates/site/macros/user_actions.html:23
msgid "Enable access"
msgstr "Activer l'accès"
@@ -1081,7 +1132,8 @@
msgid "Change role to %(role_name)s"
msgstr "Modifier le rôle en %(role_name)s"
-#: templates/site/user_list.html:133 views/user.py:283
+#: templates/site/user_list.html:133
+#: views/user.py:283
msgid "Email"
msgstr "Email"
@@ -1096,9 +1148,7 @@
#: templates/site/user_mass_add.html:26
#: templates/site/user_mass_add_text.html:29
msgid "The users will receive an email invitation to join the workspace."
-msgstr ""
-"Les utilisateurs recevront un email d'invitation à rejoindre l'espace de "
-"travail."
+msgstr "Les utilisateurs recevront un email d'invitation à rejoindre l'espace de travail."
#: templates/site/layout/base_text.html:16
#: templates/site/layout/base_workspace.html:14
@@ -1172,12 +1222,8 @@
msgstr "par %(name)s le %(date)s"
#: templates/site/macros/text_editor.html:38
-msgid ""
-"You have attempted to leave this page. Unsaved changes will be lost. Are you "
-"sure you want to exit this page?"
-msgstr ""
-"Vous avez tenté de quitter la page. Les modifications non sauvegardées "
-"seront perdues. Etes vous sûr de vouloir quitter cette page ?"
+msgid "You have attempted to leave this page. Unsaved changes will be lost. Are you sure you want to exit this page?"
+msgstr "Vous avez tenté de quitter la page. Les modifications non sauvegardées seront perdues. Etes vous sûr de vouloir quitter cette page ?"
#: templates/site/macros/text_meta.html:6
#, python-format
@@ -1219,21 +1265,15 @@
#: templates/site/macros/user_actions.html:38
msgid "Are you sure you want to suspend this user's access to the workspace?"
-msgstr ""
-"Etes vous sûr de vouloir désactiver l'accès de cet utilisateur à l'espace de "
-"travail ?"
+msgstr "Etes vous sûr de vouloir désactiver l'accès de cet utilisateur à l'espace de travail ?"
#: templates/site/macros/user_actions.html:47
msgid "Are you sure you want to enable this user's access to the workspace?"
-msgstr ""
-"Etes vous sûr de vouloir activer l'accès de cet utilisateur à l'espace de "
-"travail ?"
+msgstr "Etes vous sûr de vouloir activer l'accès de cet utilisateur à l'espace de travail ?"
#: templates/site/macros/user_actions.html:56
msgid "Are you sure you want to send this user an invitation to the workspace?"
-msgstr ""
-"Etes vous sûr de vouloir envoyer à cet utilisateur une invitation à "
-"rejoindre l'espace de travail ?"
+msgstr "Etes vous sûr de vouloir envoyer à cet utilisateur une invitation à rejoindre l'espace de travail ?"
#: templates/site/macros/user_moderation.html:3
msgid "Approve"
@@ -1252,11 +1292,8 @@
msgstr "Charger un fichier (optionnel)"
#: views/create.py:27
-msgid ""
-"Upload a file from your computer instead of using the direct input above"
-msgstr ""
-"Charger un fichier de votre ordinateur plutôt que d'utiliser le champ de "
-"saisie ci-dessus"
+msgid "Upload a file from your computer instead of using the direct input above"
+msgstr "Charger un fichier de votre ordinateur plutôt que d'utiliser le champ de saisie ci-dessus"
#: views/create.py:38
msgid "You should specify a file to upload."
@@ -1266,7 +1303,8 @@
msgid "The title of your text"
msgstr "Le titre de votre texte"
-#: views/create.py:70 views/create.py:107
+#: views/create.py:70
+#: views/create.py:107
#, python-format
msgid "Text \"%(text_title)s\" has been created"
msgstr "Le texte \"%(text_title)s\" a été créé"
@@ -1311,7 +1349,8 @@
msgid "Private activity feed for text %(text_title)s"
msgstr "Flux public pour le texte %(text_title)s"
-#: views/followup.py:31 views/followup.py:80
+#: views/followup.py:31
+#: views/followup.py:80
msgid "Private feed activated."
msgstr "Flux privé activé."
@@ -1335,7 +1374,9 @@
msgid "Private notifications feed reseted."
msgstr "Flux privé réinitialisé."
-#: views/site.py:81 views/texts.py:132 views/user.py:525
+#: views/site.py:81
+#: views/texts.py:132
+#: views/user.py:525
msgid "You're logged in!"
msgstr "Vous êtes connecté !"
@@ -1380,24 +1421,16 @@
msgstr "S'enregistrer sur l'espace de travail"
#: views/site.py:160
-msgid ""
-"Can users register themselves into the workspace? (if not, only invitations "
-"by managers can create new users)"
-msgstr ""
-"Les utilisateurs peuvent-ils s'enregistrer sur l'espace de travail ? (dans "
-"le cas contraire l'ajout d'utilisateurs à l'espace de travail peut seulement "
-"se faire par l'envoi d'invitations par les gestionnaires)"
+msgid "Can users register themselves into the workspace? (if not, only invitations by managers can create new users)"
+msgstr "Les utilisateurs peuvent-ils s'enregistrer sur l'espace de travail ? (dans le cas contraire l'ajout d'utilisateurs à l'espace de travail peut seulement se faire par l'envoi d'invitations par les gestionnaires)"
#: views/site.py:164
msgid "Workspace registration moderation"
msgstr "Modération de l'enregistrement sur l'espace de travail"
#: views/site.py:165
-msgid ""
-"Should new users be moderated (registration will require manager's approval)"
-msgstr ""
-"Les nouveaux utilisateurs doivent-ils être modérés (l'enregistrement exigera "
-"alors l'approbation par un gestionnaire)"
+msgid "Should new users be moderated (registration will require manager's approval)"
+msgstr "Les nouveaux utilisateurs doivent-ils être modérés (l'enregistrement exigera alors l'approbation par un gestionnaire)"
#: views/site.py:169
msgid "Role model"
@@ -1421,51 +1454,56 @@
msgid "Text %(text_title)s deleted"
msgstr "texte %(text_title)s supprimé"
-#: views/texts.py:621
+#: views/texts.py:221
+#, python-format
+msgid "Text version %(text_version_title)s deleted"
+msgstr "Version %(text_version_title)s supprimée"
+
+#: views/texts.py:616
msgid "Note (optional)"
msgstr "Note (facultative)"
-#: views/texts.py:624
+#: views/texts.py:619
msgid "Add a note to explain the modifications made to the text"
msgstr "Ajouter une note pour expliquer les modifications apportées au texte"
-#: views/texts.py:634
+#: views/texts.py:629
msgid "New version (optional)"
msgstr "Nouvelle version (facultative)"
-#: views/texts.py:637
+#: views/texts.py:632
msgid "Create a new version of this text (recommended)"
msgstr "créér une nouvelle version de ce texte (recommandé)"
-#: views/texts.py:640
+#: views/texts.py:635
msgid "Keep comments (optional)"
msgstr "Conserver les commentaires (facultatif)"
-#: views/texts.py:643
+#: views/texts.py:638
msgid "Keep comments (if not affected by the edit)"
-msgstr ""
-"Conserver les commentaires dont la portée n'a pas été affectée par l'édition"
+msgstr "Conserver les commentaires dont la portée n'a pas été affectée par l'édition"
-#: views/texts.py:706
+#: views/texts.py:701
msgid "Name (optional)"
msgstr "Nom (facultatif)"
-#: views/texts.py:707
+#: views/texts.py:702
msgid "Email (optional)"
msgstr "Email (facultatif)"
-#: views/texts.py:757
+#: views/texts.py:752
#, python-format
-msgid "A new version (copied from version %(version_id)s) has been created"
-msgstr ""
-"Une nouvelle version (copiée depuis la version %(version_id)s) a été créée"
+msgid "A new version (copied from version %(version_title)s) has been created"
+msgstr "Une nouvelle version (copiée depuis la version %(version_title)s) a été créée"
-#: views/texts.py:865 views/user.py:79 views/user.py:99
+#: views/texts.py:860
+#: views/user.py:79
+#: views/user.py:99
#, python-format
msgid "%(count)i user(s) role modified"
msgstr "%(count)i rôle(s) d'utilisateur modifié(s)"
-#: views/texts.py:923
+#: views/texts.py:918
msgid "Text settings updated"
msgstr "Paramètres mis à jour"
@@ -1493,23 +1531,15 @@
#: views/user.py:164
msgid "Add multiples emails one per line (or separated by \",\" or \";\")"
-msgstr ""
-"Ajouter des emails multiples (un par ligne ou séparés par \",\" or \";\")"
+msgstr "Ajouter des emails multiples (un par ligne ou séparés par \",\" or \";\")"
#: views/user.py:181
msgid "Workspace level role"
msgstr "Rôle dans l'espace de travail"
#: views/user.py:182
-msgid ""
-"This role will apply to every text in the workspace. To share only a (few) "
-"texts with this user, you can leave this blank and delegate roles on texts "
-"once the user is created."
-msgstr ""
-"Ce rôle s'appliquera à tous les textes dans l'espace de travail. Pour "
-"partager seulement quelques textes avec cet utilisateur, vous pouvez laisser "
-"ce champ vide et déléguer les rôles sur les textes une fois l'utilisateur "
-"créé."
+msgid "This role will apply to every text in the workspace. To share only a (few) texts with this user, you can leave this blank and delegate roles on texts once the user is created."
+msgstr "Ce rôle s'appliquera à tous les textes dans l'espace de travail. Pour partager seulement quelques textes avec cet utilisateur, vous pouvez laisser ce champ vide et déléguer les rôles sur les textes une fois l'utilisateur créé."
#: views/user.py:198
msgid "Text level role"
@@ -1540,7 +1570,8 @@
msgid "This username is already in use. Please supply a different username."
msgstr "Ce nom d'utilisateur est déjà utilisé. Merci d'en fournir un autre."
-#: views/user.py:320 views/user.py:336
+#: views/user.py:320
+#: views/user.py:336
msgid "Your account has been activated. You're now logged-in."
msgstr "Votre compte a été activé. Vous êtes maintenant connecté."
@@ -1607,32 +1638,36 @@
#: views/user.py:519
msgid "This account is suspended, contact the workspace administrator."
-msgstr ""
-"Ce compte est désactivé, veuillez contacter le gestionnaire de l'espace de "
-"travail."
+msgstr "Ce compte est désactivé, veuillez contacter le gestionnaire de l'espace de travail."
#: views/user.py:550
msgid "You've been logged out."
msgstr "Vous êtes déconnecté."
#: views/user.py:566
-msgid ""
-"You've been registered, you will receive a confirmation mail once a "
-"moderator has approved your membership."
-msgstr ""
-"Enregistrement réussi, vous recevrez un message de confirmation quand un "
-"gestionnaire de l'espace de travail aura activé votre compte."
+msgid "You've been registered, you will receive a confirmation mail once a moderator has approved your membership."
+msgstr "Enregistrement réussi, vous recevrez un message de confirmation quand un gestionnaire de l'espace de travail aura activé votre compte."
#: views/user.py:569
-msgid ""
-"You've been registered, please check your email for the confirm message."
+msgid "You've been registered, please check your email for the confirm message."
msgstr "Enregistrement réussi, un message de confirmation vous a été envoyé"
+#~ msgid "%(workspace_name)s's workspace"
+#~ msgstr "espace de travail : %(workspace_name)s"
+#~ msgid "Versions:"
+#~ msgstr "Versions :"
+#~ msgid "by %(v1name)s"
+#~ msgstr "par %(v1name)s"
+#~ msgid "created %(v1created)s"
+#~ msgstr "créé le %(v1created)s"
+#~ msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
+#~ msgstr "Différences entre les versions n°%(v1_nid)s et n°%(v2_nid)s :"
+#~ msgid "Version #%(version_number)s created on %(date)s"
+#~ msgstr "Version n°%(version_number)s créée le %(date)s :"
#~ msgid "Contact from user: %(name)s / %(email)s"
#~ msgstr "Contact de l'utilisateur %(name)s / %(email)s"
-
#~ msgid "Your text \"%(title)s\" has been created."
#~ msgstr "Votre texte \"%(title)s\" a été créé."
-
#~ msgid "%(title)s"
#~ msgstr "%(title)s"
+
Binary file src/cm/locale/no/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/no/LC_MESSAGES/django.po Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/locale/no/LC_MESSAGES/django.po Tue Feb 09 22:20:08 2010 +0100
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: COMT\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-02 16:41+0100\n"
+"POT-Creation-Date: 2010-02-05 15:11+0100\n"
"PO-Revision-Date: 2010-01-16 18:00+0100\n"
"Last-Translator: Kirill Miazine <km@krot.org>\n"
"Language-Team: <no@li.org>\n"
@@ -24,39 +24,39 @@
"Et område i teksten må merkes. Merk et område i teksten som din merknad skal "
"gjelde"
-#: client.py:133
+#: client.py:134
msgid "name is required"
msgstr "navn må angis"
-#: client.py:136
+#: client.py:137
msgid "email is required"
msgstr "epost må angis"
-#: client.py:138
+#: client.py:139
msgid "invalid email"
msgstr "ugyldig epost"
-#: client.py:140
+#: client.py:141
msgid "title is required"
msgstr "overskriften må angis"
-#: client.py:142
+#: client.py:143
msgid "content is required"
msgstr "teksten må fylles ut"
-#: client.py:157
+#: client.py:158
msgid "comment removed"
msgstr "merknad slettet"
-#: client.py:208 client.py:273
+#: client.py:209 client.py:274
msgid "comment saved"
msgstr "merknad lagret"
-#: client.py:275
+#: client.py:276
msgid "comment saved, it is being held for moderation"
msgstr "merknad lagret og holdes tilbake for godkjenning"
-#: client.py:336
+#: client.py:337
msgid "Tags input must be no longer than 250 characters."
msgstr "Samlet lengde på etiketter kan ikke overstige 250 tegn."
@@ -64,7 +64,8 @@
msgid "unknown"
msgstr "ukjent"
-#: models.py:175 views/create.py:30 views/create.py:45 views/texts.py:617
+#: models.py:175 templates/site/text_history.html:79 views/create.py:30
+#: views/create.py:45 views/texts.py:612
msgid "Title"
msgstr "Overskrift"
@@ -72,11 +73,11 @@
msgid "Format"
msgstr "Format"
-#: models.py:177 views/texts.py:708
+#: models.py:177 views/texts.py:703
msgid "Content"
msgstr "Innhold"
-#: models.py:178 models.py:599
+#: models.py:178 models.py:615
msgid "Tags"
msgstr "Etiketter"
@@ -88,121 +89,116 @@
msgid "Moderation a posteriori?"
msgstr "Godkjenning i ettertid?"
-#: models.py:285
+#: models.py:300
msgid "Format:"
msgstr "Format:"
-#: models.py:361
-#, python-format
-msgid "%(workspace_name)s's workspace"
-msgstr "Arbeidsområde til %(workspace_name)s"
-
-#: models.py:502
+#: models.py:518
msgid "name"
msgstr "navn"
-#: models.py:503
+#: models.py:519
msgid "description"
msgstr "beskrivelse"
-#: models.py:593
+#: models.py:609
msgid "Allow contact"
msgstr "Tillatt kontakt"
-#: models.py:593
+#: models.py:609
msgid "Allow email messages from other users"
msgstr "Motta epost fra andre brukere"
-#: models.py:594
+#: models.py:610
msgid "Preferred language"
msgstr "Foretrukket språk"
-#: models.py:597
+#: models.py:613
msgid "Suspended access"
msgstr "Sperret tilgang"
-#: models.py:621
+#: models.py:637
msgid "suspended"
msgstr "sperret"
-#: models.py:623
+#: models.py:639
msgid "waiting approval"
msgstr "venter på godkjenning"
-#: models.py:629
+#: models.py:645
msgid "pending"
msgstr "pågående"
-#: models.py:644
+#: models.py:660
msgid "Invitation"
msgstr "Invitasjon"
-#: models.py:712
+#: models.py:728
#, python-format
msgid "Text %(link_to_text)s edited"
msgstr "Tekst %(link_to_text)s endret"
-#: models.py:713
+#: models.py:729
#, python-format
msgid "Text %(link_to_text)s edited (new version created)"
msgstr "Tekst %(link_to_text)s endret (ny versjon opprettet)"
-#: models.py:714
+#: models.py:730
#, python-format
msgid "Text %(link_to_text)s added"
msgstr "Tekst %(link_to_text)s lagt til"
-#: models.py:715
+#: models.py:731
#, python-format
msgid "Text %(link_to_text)s removed"
msgstr "Tekst %(link_to_text)s slettet"
-#: models.py:716
+#: models.py:732
#, python-format
msgid "Comment %(link_to_comment)s added on text %(link_to_text)s"
msgstr "Merknad %(link_to_comment)s lagt til teksten %(link_to_text)s"
-#: models.py:717
+#: models.py:733
#, python-format
msgid "Comment %(link_to_comment)s removed from text %(link_to_text)s"
msgstr "Merknad %(link_to_comment)s slettet fra teksten %(link_to_text)s"
-#: models.py:718
+#: models.py:734
#, python-format
msgid "User %(username)s added"
msgstr "Bruker %(username)s opprettet"
-#: models.py:719
+#: models.py:735
#, python-format
msgid "User %(username)s access to workspace enabled"
msgstr "Aktivert tilgang for brukeren %(username)s"
-#: models.py:720
+#: models.py:736
#, python-format
msgid "User %(username)s access to workspace refused"
msgstr "Nektet tilgang for brukeren %(username)s"
-#: models.py:721
+#: models.py:737
#, python-format
msgid "User %(username)s access to workspace suspended"
msgstr "Stoppet tilgang for brukeren %(username)s"
-#: models.py:722
+#: models.py:738
#, python-format
msgid "User %(username)s access to workspace activated"
msgstr "Aktivert tilgang for brukeren %(username)s"
-#: models.py:723
+#: models.py:739
#, python-format
msgid "User %(username)s has activated his account"
msgstr "Bruker %(username)s har aktivert kontoen"
-#: models.py:778 models.py:786
+#: models.py:794 models.py:802
#, python-format
msgid "by \"%(username)s\""
msgstr "av %(username)s"
-#: models.py:780
+#: models.py:796
#, python-format
msgid "%(time_since)s ago"
msgstr "for %(time_since)s siden"
@@ -245,7 +241,7 @@
#: settings.py:109
msgid "Spanish"
-msgstr ""
+msgstr "Spansk"
#: static_i18n.py:6 static_i18n.py:11
msgid "Observer"
@@ -550,7 +546,7 @@
msgid "texts"
msgstr "tekster"
-#: templates/site/dashboard.html:264 templates/site/text_list.html:139
+#: templates/site/dashboard.html:264
msgid "comments"
msgstr "merknader"
@@ -732,16 +728,14 @@
#: templates/site/text_embed.html:26
msgid "Copy this code into your site to display text with comments."
-msgstr ""
+msgstr "Kopier denne koden til din side for å vise tekst med merknader."
#: templates/site/text_embed.html:26
-#, fuzzy
msgid ""
"Users will also be able to add comments from your site depending on "
"anonymous users' roles."
msgstr ""
-"Kopier denne koden til din side for å vise teksten med merknader. Avhengig "
-"av rettighetene til anonyme brukere, vil andre muligens også kunne "
+"Avhengig av rettighetene til anonyme brukere, vil andre muligens også kunne "
"kommentere teksten direkte fra din side."
#: templates/site/text_embed.html:36
@@ -797,50 +791,89 @@
msgid "Subscribe to all text notifications"
msgstr "Abonner på alle varsler for teksten"
-#: templates/site/text_history.html:38
-msgid "Versions:"
-msgstr "Versjoner:"
+#: templates/site/text_history.html:56
+#: templates/site/text_history_compare.html:28
+#: templates/site/text_history_version.html:28
+msgid "Version list"
+msgstr "Versjoner"
+
+#: templates/site/text_history.html:59
+msgid "Compare last two versions"
+msgstr "Sammenlikn siste to versjoner"
+
+#: templates/site/text_history.html:61
+#: templates/site/text_history_compare.html:36
+#: templates/site/text_history_version.html:40
+msgid "Most recent version"
+msgstr "Nyeste versjon"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "version #%(v1number)s"
-msgstr "versjon #%(v1number)s"
+#: templates/site/text_history.html:67
+msgid "Compare selected versions"
+msgstr "Sammenlikn valgte versjoner"
+
+#: templates/site/text_history.html:77
+msgid "Version"
+msgstr "Versjon"
+
+#: templates/site/text_history.html:78
+msgid "Selection"
+msgstr "Tekstområde"
+
+#: templates/site/text_history.html:80 templates/site/text_list.html:137
+msgid "Author"
+msgstr "Forfatter"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "by %(v1name)s"
-msgstr "av %(v1name)s"
+#: templates/site/text_history.html:81
+msgid "Created"
+msgstr "Opprettet"
+
+#: templates/site/text_history.html:82 templates/site/text_list.html:139
+msgid "# comments"
+msgstr "# merknader"
+
+#: templates/site/text_history.html:102 templates/site/text_list.html:159
+msgid "View"
+msgstr "Se"
+
+#: templates/site/text_history.html:103
+#: templates/site/text_history_version.html:33
+msgid "Compare with previous version"
+msgstr "Sammenlikn med forrige versjon"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "created %(v1created)s"
-msgstr "opprettet %(v1created)s"
+#: templates/site/text_history.html:104
+msgid "Revert to this version"
+msgstr "Still tilbake til denne versjonen"
-#: templates/site/text_history.html:54
+#: templates/site/text_history.html:105 templates/site/text_list.html:80
+#: templates/site/text_list.html.py:161
+msgid "Delete"
+msgstr "Slett"
+
+#: templates/site/text_history.html:111
+msgid "Are you sure you want to delete this version?"
+msgstr "Ønsker du å slette denne versjonen?"
+
+#: templates/site/text_history_compare.html:30
+#: templates/site/text_history_compare.html:34
+#: templates/site/text_history_version.html:30
#, python-format
-msgid "differences between version #%(v1number)s and #%(v2number)s"
-msgstr "forskjeller mellom versjonene #%(v1number)s og #%(v2number)s"
+msgid "Version %(version_number)s"
+msgstr "Versjon %(version_number)s"
-#: templates/site/text_history.html:66
-#, python-format
-msgid "Revert to version #%(v1_nid)s"
-msgstr "Still tilbake til versjonen #%(v1_nid)s"
-
-#: templates/site/text_history.html:70
+#: templates/site/text_history_compare.html:32
#, python-format
-msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
-msgstr "Forskjeller mellom versjon #%(v1_nid)s og versjon #%(v2_nid)s:"
+msgid ""
+"Comparison between version #%(version_1_number)s and #%(version_2_number)s"
+msgstr "Sammenlikning mellom versjoner #%(version_1_number)s og #%(version_2_number)s"
-#: templates/site/text_history.html:73 templates/site/text_history.html:85
-#: templates/site/text_history.html:91
-#, python-format
-msgid "Version #%(version_number)s created on %(date)s"
-msgstr "Versjon #%(version_number)s opprettet %(date)s"
-
-#: templates/site/text_history.html:101
+#: templates/site/text_history_compare.html:43
msgid "No differences"
msgstr "Ingen forskjeller"
+#: templates/site/text_history_version.html:37
+msgid "Compare with next version"
+msgstr "Sammenlikn med neste versjon"
+
#: templates/site/text_list.html:12
msgid "Texts"
msgstr "Tekster"
@@ -865,10 +898,6 @@
msgid "Bulk Actions"
msgstr "Handlinger"
-#: templates/site/text_list.html:80 templates/site/text_list.html.py:161
-msgid "Delete"
-msgstr "Slett"
-
#: templates/site/text_list.html:83 templates/site/user_list.html:81
msgid "Apply"
msgstr "Utfør"
@@ -881,10 +910,6 @@
msgid "Text"
msgstr "Tekst"
-#: templates/site/text_list.html:137
-msgid "Author"
-msgstr "Forfatter"
-
#: templates/site/text_list.html:138
msgid "Modified"
msgstr "Endret"
@@ -904,10 +929,6 @@
msgid "Filter by tag: %(tag_name)s"
msgstr "Filtrer etter etikett: %(tag_name)s"
-#: templates/site/text_list.html:159
-msgid "View"
-msgstr "Se"
-
#: templates/site/text_list.html:160 templates/site/macros/text_tabs.html:12
#: templates/site/macros/user_actions.html:19
msgid "Edit"
@@ -1132,7 +1153,7 @@
#: templates/site/macros/paginator.html:5
msgid "Previous page"
-msgstr ""
+msgstr "Forrige side"
#: templates/site/macros/paginator.html:6
#, python-format
@@ -1402,49 +1423,54 @@
msgid "Text %(text_title)s deleted"
msgstr "Tekstet %(text_title)s slettet"
-#: views/texts.py:621
+#: views/texts.py:221
+#, python-format
+msgid "Text version %(text_version_title)s deleted"
+msgstr "Tekstversjon %(text_version_title)s slettet"
+
+#: views/texts.py:616
msgid "Note (optional)"
msgstr "Kommentar (valgfritt)"
-#: views/texts.py:624
+#: views/texts.py:619
msgid "Add a note to explain the modifications made to the text"
msgstr "Legg til en kommentar for å beskrive foretatte endringer i teksten"
-#: views/texts.py:634
+#: views/texts.py:629
msgid "New version (optional)"
msgstr "Ny versjon (valgfritt)"
-#: views/texts.py:637
+#: views/texts.py:632
msgid "Create a new version of this text (recommended)"
msgstr "Opprett ny versjon av teksten (anbefales)"
-#: views/texts.py:640
+#: views/texts.py:635
msgid "Keep comments (optional)"
msgstr "Behold merknader (valgfritt)"
-#: views/texts.py:643
+#: views/texts.py:638
msgid "Keep comments (if not affected by the edit)"
msgstr "Behold merknadene (dersom de ikke er påvirket av endringene i teksten)"
-#: views/texts.py:706
+#: views/texts.py:701
msgid "Name (optional)"
msgstr "Navn (valgfritt)"
-#: views/texts.py:707
+#: views/texts.py:702
msgid "Email (optional)"
msgstr "Epost (valgfritt)"
-#: views/texts.py:757
+#: views/texts.py:752
#, python-format
-msgid "A new version (copied from version %(version_id)s) has been created"
-msgstr "Ny versjon (kopiert fra versjon %(version_id)s) har blitt opprettet"
+msgid "A new version (copied from version %(version_title)s) has been created"
+msgstr "Ny versjon (kopiert fra versjon %(version_title)s) har blitt opprettet"
-#: views/texts.py:865 views/user.py:79 views/user.py:99
+#: views/texts.py:860 views/user.py:79 views/user.py:99
#, python-format
msgid "%(count)i user(s) role modified"
msgstr "Roller for %(count)i bruker(e) endret"
-#: views/texts.py:923
+#: views/texts.py:918
msgid "Text settings updated"
msgstr "Tekstinnstillinger oppdatert"
@@ -1606,6 +1632,24 @@
"You've been registered, please check your email for the confirm message."
msgstr "Du er blitt registert. Se din epost for en melding med bekreftelsen."
+#~ msgid "%(workspace_name)s's workspace"
+#~ msgstr "Arbeidsområde til %(workspace_name)s"
+
+#~ msgid "Versions:"
+#~ msgstr "Versjoner:"
+
+#~ msgid "by %(v1name)s"
+#~ msgstr "av %(v1name)s"
+
+#~ msgid "created %(v1created)s"
+#~ msgstr "opprettet %(v1created)s"
+
+#~ msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
+#~ msgstr "Forskjeller mellom versjon #%(v1_nid)s og versjon #%(v2_nid)s:"
+
+#~ msgid "Version #%(version_number)s created on %(date)s"
+#~ msgstr "Versjon #%(version_number)s opprettet %(date)s"
+
#, fuzzy
#~ msgid "Contact from user: %(name)s / %(email)s"
#~ msgstr "Kontakt bruker %(username)s"
Binary file src/cm/locale/pt_BR/LC_MESSAGES/django.mo has changed
--- a/src/cm/locale/pt_BR/LC_MESSAGES/django.po Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/locale/pt_BR/LC_MESSAGES/django.po Tue Feb 09 22:20:08 2010 +0100
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: COMT\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-02 16:40+0100\n"
+"POT-Creation-Date: 2010-02-05 15:10+0100\n"
"PO-Revision-Date: 2010-01-23 12:00-0300\n"
"Last-Translator: Paulo Rená da Silva Santarém <pbrss@yahoo.com.br>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,39 +19,39 @@
"A selection is required. Select in the text the part your comment applies to."
msgstr "Favor selecionar no texto o trecho ao qual se refere o seu comentário."
-#: client.py:133
+#: client.py:134
msgid "name is required"
msgstr "Favor preencher o nome"
-#: client.py:136
+#: client.py:137
msgid "email is required"
msgstr "Favor preencher email"
-#: client.py:138
+#: client.py:139
msgid "invalid email"
msgstr "Email inválido"
-#: client.py:140
+#: client.py:141
msgid "title is required"
msgstr "Favor preencher tÃtulo"
-#: client.py:142
+#: client.py:143
msgid "content is required"
msgstr "Favor preencher conteúdo"
-#: client.py:157
+#: client.py:158
msgid "comment removed"
msgstr "Conteúdo removido"
-#: client.py:208 client.py:273
+#: client.py:209 client.py:274
msgid "comment saved"
msgstr "comentário salvo"
-#: client.py:275
+#: client.py:276
msgid "comment saved, it is being held for moderation"
msgstr "comentário salvo, aguarda moderação"
-#: client.py:336
+#: client.py:337
msgid "Tags input must be no longer than 250 characters."
msgstr "Palavras-chave não pode exceder 250 caracteres."
@@ -59,7 +59,8 @@
msgid "unknown"
msgstr "desconhecido"
-#: models.py:175 views/create.py:30 views/create.py:45 views/texts.py:617
+#: models.py:175 templates/site/text_history.html:79 views/create.py:30
+#: views/create.py:45 views/texts.py:612
msgid "Title"
msgstr "TÃtulo"
@@ -67,11 +68,11 @@
msgid "Format"
msgstr "Formatar"
-#: models.py:177 views/texts.py:708
+#: models.py:177 views/texts.py:703
msgid "Content"
msgstr "Conteúdo"
-#: models.py:178 models.py:599
+#: models.py:178 models.py:615
msgid "Tags"
msgstr "Palavras-chave"
@@ -83,121 +84,116 @@
msgid "Moderation a posteriori?"
msgstr "Moderação a posteriori?"
-#: models.py:285
+#: models.py:300
msgid "Format:"
msgstr "Formatar:"
-#: models.py:361
-#, python-format
-msgid "%(workspace_name)s's workspace"
-msgstr "%(workspace_name)s da área de trabalho"
-
-#: models.py:502
+#: models.py:518
msgid "name"
msgstr "nome"
-#: models.py:503
+#: models.py:519
msgid "description"
msgstr "descrição"
-#: models.py:593
+#: models.py:609
msgid "Allow contact"
msgstr "Permitir contato"
-#: models.py:593
+#: models.py:609
msgid "Allow email messages from other users"
msgstr "Permitir mensagens de email de outros usuários"
-#: models.py:594
+#: models.py:610
msgid "Preferred language"
msgstr "Idioma preferido"
-#: models.py:597
+#: models.py:613
msgid "Suspended access"
msgstr "Suspender acesso"
-#: models.py:621
+#: models.py:637
msgid "suspended"
msgstr "suspenso"
-#: models.py:623
+#: models.py:639
msgid "waiting approval"
msgstr "aguardando aprovação"
-#: models.py:629
+#: models.py:645
msgid "pending"
msgstr "pendente"
-#: models.py:644
+#: models.py:660
msgid "Invitation"
msgstr "Convite"
-#: models.py:712
+#: models.py:728
#, python-format
msgid "Text %(link_to_text)s edited"
msgstr "Texto %(link_to_text)s editado"
-#: models.py:713
+#: models.py:729
#, python-format
msgid "Text %(link_to_text)s edited (new version created)"
msgstr "Texto %(link_to_text)s editado (criada nova versão)"
-#: models.py:714
+#: models.py:730
#, python-format
msgid "Text %(link_to_text)s added"
msgstr "Texto %(link_to_text)s adicionado"
-#: models.py:715
+#: models.py:731
#, python-format
msgid "Text %(link_to_text)s removed"
msgstr "Texto %(link_to_text)s removido"
-#: models.py:716
+#: models.py:732
#, python-format
msgid "Comment %(link_to_comment)s added on text %(link_to_text)s"
msgstr "Comentário %(link_to_comment)s adicionado ao texto %(link_to_text)s "
-#: models.py:717
+#: models.py:733
#, python-format
msgid "Comment %(link_to_comment)s removed from text %(link_to_text)s"
msgstr "Comentário %(link_to_comment)s removido do texto %(link_to_text)s"
-#: models.py:718
+#: models.py:734
#, python-format
msgid "User %(username)s added"
msgstr "Usuário %(username)s adicionado"
-#: models.py:719
+#: models.py:735
#, python-format
msgid "User %(username)s access to workspace enabled"
msgstr "Acesso do usuário %(username)s à área de trabalho permitido"
-#: models.py:720
+#: models.py:736
#, python-format
msgid "User %(username)s access to workspace refused"
msgstr "Acesso do usuário %(username)s à área de trabalho recusado"
-#: models.py:721
+#: models.py:737
#, python-format
msgid "User %(username)s access to workspace suspended"
msgstr "Acesso do usuário %(username)s à área de trabalho suspenso"
-#: models.py:722
+#: models.py:738
#, python-format
msgid "User %(username)s access to workspace activated"
msgstr "Acesso do usuário %(username)s à área de trabalho ativado"
-#: models.py:723
+#: models.py:739
#, python-format
msgid "User %(username)s has activated his account"
msgstr "O usuário %(username)s ativou sua conta"
-#: models.py:778 models.py:786
+#: models.py:794 models.py:802
#, python-format
msgid "by \"%(username)s\""
msgstr "por \"%(username)s\""
-#: models.py:780
+#: models.py:796
#, python-format
msgid "%(time_since)s ago"
msgstr "há %(time_since)s"
@@ -545,7 +541,7 @@
msgid "texts"
msgstr "textos"
-#: templates/site/dashboard.html:264 templates/site/text_list.html:139
+#: templates/site/dashboard.html:264
msgid "comments"
msgstr "comentários"
@@ -791,50 +787,95 @@
msgid "Subscribe to all text notifications"
msgstr "Receber todas as notificações"
-#: templates/site/text_history.html:38
-msgid "Versions:"
-msgstr "Versões:"
+#: templates/site/text_history.html:56
+#: templates/site/text_history_compare.html:28
+#: templates/site/text_history_version.html:28
+#, fuzzy
+msgid "Version list"
+msgstr "Versões"
+
+#: templates/site/text_history.html:59
+msgid "Compare last two versions"
+msgstr ""
+
+#: templates/site/text_history.html:61
+#: templates/site/text_history_compare.html:36
+#: templates/site/text_history_version.html:40
+msgid "Most recent version"
+msgstr ""
+
+#: templates/site/text_history.html:67
+msgid "Compare selected versions"
+msgstr ""
+
+#: templates/site/text_history.html:77
+#, fuzzy
+msgid "Version"
+msgstr "Versões"
+
+#: templates/site/text_history.html:78
+#, fuzzy
+msgid "Selection"
+msgstr "Ações"
+
+#: templates/site/text_history.html:80 templates/site/text_list.html:137
+msgid "Author"
+msgstr "Autor"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "version #%(v1number)s"
+#: templates/site/text_history.html:81
+msgid "Created"
+msgstr ""
+
+#: templates/site/text_history.html:82 templates/site/text_list.html:139
+#, fuzzy
+msgid "# comments"
+msgstr "comentários"
+
+#: templates/site/text_history.html:102 templates/site/text_list.html:159
+msgid "View"
+msgstr "Ver"
+
+#: templates/site/text_history.html:103
+#: templates/site/text_history_version.html:33
+msgid "Compare with previous version"
+msgstr ""
+
+#: templates/site/text_history.html:104
+#, fuzzy
+msgid "Revert to this version"
+msgstr "Reverter para a versão #%(v1_nid)s"
+
+#: templates/site/text_history.html:105 templates/site/text_list.html:80
+#: templates/site/text_list.html.py:161
+msgid "Delete"
+msgstr "Apagar"
+
+#: templates/site/text_history.html:111
+#, fuzzy
+msgid "Are you sure you want to delete this version?"
+msgstr "Confirmar a exclusão desse texto?"
+
+#: templates/site/text_history_compare.html:30
+#: templates/site/text_history_compare.html:34
+#: templates/site/text_history_version.html:30
+#, fuzzy, python-format
+msgid "Version %(version_number)s"
msgstr "versão #%(v1number)s"
-#: templates/site/text_history.html:46
-#, python-format
-msgid "by %(v1name)s"
-msgstr "por %(v1name)s"
-
-#: templates/site/text_history.html:46
-#, python-format
-msgid "created %(v1created)s"
-msgstr "criado %(v1created)s"
-
-#: templates/site/text_history.html:54
-#, python-format
-msgid "differences between version #%(v1number)s and #%(v2number)s"
+#: templates/site/text_history_compare.html:32
+#, fuzzy, python-format
+msgid ""
+"Comparison between version #%(version_1_number)s and #%(version_2_number)s"
msgstr "diferenças entre a versão #%(v1number)s e a versão #%(v2number)s"
-#: templates/site/text_history.html:66
-#, python-format
-msgid "Revert to version #%(v1_nid)s"
-msgstr "Reverter para a versão #%(v1_nid)s"
-
-#: templates/site/text_history.html:70
-#, python-format
-msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
-msgstr "Diferenças entre a versão #%(v1_nid)s e a versão #%(v2_nid)s:"
-
-#: templates/site/text_history.html:73 templates/site/text_history.html:85
-#: templates/site/text_history.html:91
-#, python-format
-msgid "Version #%(version_number)s created on %(date)s"
-msgstr "Versão #%(version_number)s criada em %(date)s"
-
-#: templates/site/text_history.html:101
+#: templates/site/text_history_compare.html:43
msgid "No differences"
msgstr "Sem diferenças"
+#: templates/site/text_history_version.html:37
+msgid "Compare with next version"
+msgstr ""
+
#: templates/site/text_list.html:12
msgid "Texts"
msgstr "Textos"
@@ -859,10 +900,6 @@
msgid "Bulk Actions"
msgstr "Ações em massa"
-#: templates/site/text_list.html:80 templates/site/text_list.html.py:161
-msgid "Delete"
-msgstr "Apagar"
-
#: templates/site/text_list.html:83 templates/site/user_list.html:81
msgid "Apply"
msgstr "Aplicar"
@@ -875,10 +912,6 @@
msgid "Text"
msgstr "Texto"
-#: templates/site/text_list.html:137
-msgid "Author"
-msgstr "Autor"
-
#: templates/site/text_list.html:138
msgid "Modified"
msgstr "Modificar"
@@ -898,10 +931,6 @@
msgid "Filter by tag: %(tag_name)s"
msgstr "Filtrar por palavra chave: %(tag_name)s"
-#: templates/site/text_list.html:159
-msgid "View"
-msgstr "Ver"
-
#: templates/site/text_list.html:160 templates/site/macros/text_tabs.html:12
#: templates/site/macros/user_actions.html:19
msgid "Edit"
@@ -1397,49 +1426,54 @@
msgid "Text %(text_title)s deleted"
msgstr "Texto %(text_title)s apagado"
-#: views/texts.py:621
+#: views/texts.py:221
+#, fuzzy, python-format
+msgid "Text version %(text_version_title)s deleted"
+msgstr "Texto %(text_title)s apagado"
+
+#: views/texts.py:616
msgid "Note (optional)"
msgstr "Observação (opcional)"
-#: views/texts.py:624
+#: views/texts.py:619
msgid "Add a note to explain the modifications made to the text"
msgstr "Adicionar uma observação para explicar as mudanças feitas no texto"
-#: views/texts.py:634
+#: views/texts.py:629
msgid "New version (optional)"
msgstr "Nova versão (opcional)"
-#: views/texts.py:637
+#: views/texts.py:632
msgid "Create a new version of this text (recommended)"
msgstr "Criar uma nova versão desse texto (recomendado)"
-#: views/texts.py:640
+#: views/texts.py:635
msgid "Keep comments (optional)"
msgstr "Manter comentários (opcional)"
-#: views/texts.py:643
+#: views/texts.py:638
msgid "Keep comments (if not affected by the edit)"
msgstr "Manter comentários (se não afetados pela edição)"
-#: views/texts.py:706
+#: views/texts.py:701
msgid "Name (optional)"
msgstr "Nome (opcional)"
-#: views/texts.py:707
+#: views/texts.py:702
msgid "Email (optional)"
msgstr "Email (opcional)"
-#: views/texts.py:757
-#, python-format
-msgid "A new version (copied from version %(version_id)s) has been created"
+#: views/texts.py:752
+#, fuzzy, python-format
+msgid "A new version (copied from version %(version_title)s) has been created"
msgstr "Uma mova versão (copiada da versão %(version_id)s) foi criada"
-#: views/texts.py:865 views/user.py:79 views/user.py:99
+#: views/texts.py:860 views/user.py:79 views/user.py:99
#, python-format
msgid "%(count)i user(s) role modified"
msgstr "%(count)i função do(s) usuário(s) modificada"
-#: views/texts.py:923
+#: views/texts.py:918
msgid "Text settings updated"
msgstr "Configurações do texto atualizadas"
@@ -1604,6 +1638,24 @@
msgstr ""
"Você se inscreveu. Favor verifique em seu email a mensagem de confirmação."
+#~ msgid "%(workspace_name)s's workspace"
+#~ msgstr "%(workspace_name)s da área de trabalho"
+
+#~ msgid "Versions:"
+#~ msgstr "Versões:"
+
+#~ msgid "by %(v1name)s"
+#~ msgstr "por %(v1name)s"
+
+#~ msgid "created %(v1created)s"
+#~ msgstr "criado %(v1created)s"
+
+#~ msgid "Differences between version #%(v1_nid)s and version #%(v2_nid)s:"
+#~ msgstr "Diferenças entre a versão #%(v1_nid)s e a versão #%(v2_nid)s:"
+
+#~ msgid "Version #%(version_number)s created on %(date)s"
+#~ msgstr "Versão #%(version_number)s criada em %(date)s"
+
#~ msgid "%(title)s"
#~ msgstr "%(title)s"
--- a/src/cm/models.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/models.py Tue Feb 09 22:20:08 2010 +0100
@@ -85,12 +85,10 @@
"""
versions = TextVersion.objects.filter(text__exact=self).order_by('-created')
# TODO: use new postgresql 8.4 row_number as extra select to do that
- for index in xrange(len(versions)):
- v = versions[index]
- # version_number is 1-based
- setattr(v, 'version_number', len(versions) - index)
- #for v in versions:
- # print v.created,v.id,v.version_number
+ #for index in xrange(len(versions)):
+ # v = versions[index]
+ # # version_number is 1-based
+ # setattr(v, 'version_number', len(versions) - index)
return versions
def get_version(self, version_number):
@@ -103,10 +101,10 @@
def get_inversed_versions(self):
versions = TextVersion.objects.filter(text__exact=self).order_by('created')
# TODO: use new postgresql 8.4 row_number as extra select to do that
- for index in xrange(len(versions)):
- v = versions[index]
- # version_number is 1-based
- setattr(v, 'version_number', index + 1)
+ #for index in xrange(len(versions)):
+ # v = versions[index]
+ # # version_number is 1-based
+ # setattr(v, 'version_number', index + 1)
return versions
def get_versions_number(self):
@@ -118,8 +116,10 @@
else:
return False
- def revert_to_version(self, v_id):
- text_version = self.get_version(int(v_id))
+ def revert_to_version(self, text_version_key):
+ text_version = TextVersion.objects.get(key=text_version_key)
+ if text_version.text != self:
+ raise Exception('Invalid revert attempt')
new_text_version = TextVersion.objects.duplicate(text_version, True)
return new_text_version
@@ -256,7 +256,22 @@
self.content = new_content
self.format = new_format
self.save()
-
+
+ def get_next_version(self):
+ other_versions = TextVersion.objects.filter(text__exact=self.text).order_by('created').filter(created__gt=self.created)
+ return other_versions[0] if other_versions else None
+ if other_versions:
+ return
+ else:
+ return None
+
+ def get_previous_version(self):
+ other_versions = TextVersion.objects.filter(text__exact=self.text).order_by('-created').filter(created__lt=self.created)
+ return other_versions[0] if other_versions else None
+
+ def get_version_number(self):
+ return TextVersion.objects.filter(text__exact=self.text).order_by('created').filter(created__lte=self.created).count()
+
class CommentManager(Manager):
def duplicate(self, comment, text_version, reply_to=None, keep_dates=False):
--- a/src/cm/templates/site/text_history.html Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/templates/site/text_history.html Tue Feb 09 22:20:08 2010 +0100
@@ -12,101 +12,141 @@
-->
</script>
+<div id="text_history" class="tab-meta">
+
<script type="text/javascript">
<!--
$(function() {
- $(".arrow").bind("mouseenter", function(e){
- $(this).attr('src','{{ MEDIA_URL }}img/arrow_w_red.png');
- });
-
- $(".arrow").bind("mouseout", function(e){
- $(this).attr('src','{{ MEDIA_URL }}img/arrow_w_blue.png');
- });
-
- $(".ver_span").bind("mouseenter", function(e){
- $(this).removeClass('version_item').addClass('version_item-selected');
- });
-
- $(".ver_span").bind("mouseout", function(e){
- $(this).removeClass('version_item-selected').addClass('version_item');
- });
-});
+ $(".hidden-text-actions").css('visibility','hidden');
+}) ;
+$(function() {
+ $("input[name=oldkey]").click(function () {
+ hide_show($(this), 'newkey', true, true, -1);
+ hide_show($(this), 'newkey', false, false, 0);
+ });
+ $("input[name=newkey]").click(function () {
+ hide_show($(this), 'oldkey', false, true, 0);
+ hide_show($(this), 'oldkey', true, false, +1);
+ });
+
+ $("input[name=newkey]")[0].click();
+ $("input[name=oldkey]")[1].click();
+}) ;
+
+
+function hide_show(elem, name, hide, up, plus) {
+ var nb = elem.attr('id').split('-')[1];
+ nb = parseInt(nb) + plus;
+
+ if (hide)
+ var vis = 'hidden';
+ else
+ var vis = 'visible';
+
+ if (up)
+ var fu = 'gt';
+ else
+ var fu = 'lt';
+ $("input[name=" + name + "]:" + fu + "(" + nb + ")").css('visibility',vis);
+};
-->
</script>
-<div id="text_history" class="tab-meta">
-<div class="label">{% blocktrans %}Versions:{% endblocktrans %}
-{% for author,color in author_colors %}
- <span style="background: {{ color }};">{{ author }}</span>
-{% endfor %}
-</div>
-
-<span id="text_history_timeline">
-{% for v1, v2, color in paired_versions %}
- <a href="{% url text-history-version text.key v1.version_number %}" title="{% blocktrans with v1.version_number as v1number %}version #{{ v1number }}{% endblocktrans %}{% if v1.name %} {% blocktrans with v1.name as v1name %}by {{ v1name }}{% endblocktrans %}{% endif %}{% if v1.note %} / {{ v1.note }}{% endif %} ({% blocktrans with v1.created|local_date as v1created %}created {{ v1created }}{% endblocktrans %})">
- <span id={{ v1_id }}
- style="background: {{ color }};"
- class="ver_span {% choice_string v1_id v1.id version_item-selected or v1.id v2_id version_item-selected version_item %}">{{ forloop.counter }}</span></a>
+<ul class="sub_list">
+ <li class="active_sub">{% blocktrans %}Version list{% endblocktrans %}</li>
+ {% if last_last_version %}
+ <li> / </li>
+ <li><a href="{% url text-history-compare text.key last_last_version.key last_version.key %}">{% blocktrans %}Compare last two versions{% endblocktrans %}</a></li>
+ <li> / </li>
+ <li><a href="{% url text-history-version text.key text.last_text_version.key %}">{% blocktrans %}Most recent version{% endblocktrans %}</a></li>
+ {% endif %}
+</ul>
- {% if v2 %}
- <span class="{% choice_string v2_nid v2.version_number diff_item-selected diff_item %}">
- <!-- <a href="{% url text-history-compare text.key v1.version_number v2.version_number %}" title="diff between {{ forloop.counter }} and following ">→</a>-->
- <a href="{% url text-history-compare text.key v1.version_number v2.version_number %}" title="{% blocktrans with v1.version_number as v1number and v2.version_number as v2number %}differences between version #{{ v1number }} and #{{ v2number }}{% endblocktrans %}"><span style="vertical-align:middle;" >
- <img class="arrow"
- id="arrow_{{ v1.version_number }}"
- src="{{ MEDIA_URL }}img/arrow_w_blue.png"/></span></a>
- </span>
- {% endif %}
-{% endfor %}
-</span>
+<form id="compare_form" action="." method="post">
+
+<input name="compare" id="compare_button" type="submit" value="{% blocktrans %}Compare selected versions{% endblocktrans %}"/>
-{% if can_edit_text %}
<br />
-<br />
-<form action="{% url text-revert text.key v1_nid %}" method="POST" ><input name="revert" type="submit" value="{% blocktrans %}Revert to version #{{ v1_nid }}{% endblocktrans %}"/></form>
-{% endif %}
+{% include "site/macros/paginator.html" %}
+
+<div style="clear:both;"></div>
-{% if v2_nid %}
- <h2>{% blocktrans with v1_nid as v1_nid and v1_nid as v1_nid %}Differences between version #{{ v1_nid }} and version #{{ v2_nid }}:{% endblocktrans %}</h2>
-{% else %}
- <h2>{{ version1.title }}</h2>
- <span class="metadata">{% blocktrans with version1.created|local_date:tz as date and v1_nid as version_number %}Version #{{ version_number }} created on {{ date }}{% endblocktrans %}</span>
- <br /><br />
-{% endif %}
-{% autoescape off %}
+<table summary="text list" class="large_table">
+ <thead>
+ <tr>
+ <th>{% blocktrans %}Version{% endblocktrans %}</th>
+ <th colspan="2" width="1%">{% blocktrans %}Selection{% endblocktrans %}</th>
+ <th>{% blocktrans %}Title{% endblocktrans %}</th>
+ <th>{% blocktrans %}Author{% endblocktrans %}</th>
+ <th>{% blocktrans %}Created{% endblocktrans %}</th>
+ <th>{% blocktrans %}# comments{% endblocktrans %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for text_version in object_list %}
+
+ {% get_local_text_perm request text can_edit_text as can_edit_text %}
+ {% get_local_text_perm request text can_delete_text as can_delete_text %}
+ {% get_local_text_perm request text can_manage_text as can_manage_text %}
+
+ <tr class="text-{{ text_version.key }} {% cycle 'odd' 'even' %}">
+ {% if can_manage_workspace %}<td><input type="checkbox" class="text_check" name="check-{{ text_version.key }}"/></td>{% endif %}
+ <td>#{{ forloop.counter0|add:page_obj.start_index|invneg:paginator.count|add:"1" }}</td>
+ <td><input id="oldkey-{{ forloop.counter0 }}" type="radio" name="oldkey" value="{{ text_version.key }}"/></td>
+ <td><input id="newkey-{{ forloop.counter0 }}" type="radio" name="newkey" value="{{ text_version.key }}"/></td>
+ <td>
+ <a class="main_object_title" href="{% url text-history-version text.key text_version.key %}">{{ text_version.title }}</a>
+
+
+ <div class="hidden-text-actions text-actions-{{ text_version.key }}">
+ <a href="{% url text-history-version text.key text_version.key %}">{% blocktrans %}View{% endblocktrans %}</a>
+ {% if text_version.get_previous_version %}| <a href="{% url text-history-compare text.key text_version.get_previous_version.key text_version.key %}">{% blocktrans %}Compare with previous version{% endblocktrans %}</a>{% endif %}
+ {% if can_edit_text %} | <a href="{% url text-revert text.key text_version.key %}">{% blocktrans %}Revert to this version{% endblocktrans %}</a>{% endif %}
+ {% comment %}{% if can_delete_text %}<a id="text-delete-{{ text_version.key }}" href="#">{% blocktrans %}Delete{% endblocktrans %}</a>
+ <script type="text/javascript">
+ <!--
+ $(function() {
+ $("#text-delete-{{ text_version.key }}").click(function(){
+ url = '{% url text-version-delete text.key text_version.key %}';
+ question = "{% blocktrans %}Are you sure you want to delete this version?{% endblocktrans %}";
+ if (confirm(question)) {
+ $.post(url, function(data){
+ window.location = '{% url index %}';
+ });
+ }
+ });
+
+ }) ;
+ -->
+ </script>
+ {% endif %}
+ {% endcomment %}
+ </div>
+ <script type="text/javascript">
+ <!--
+ $(function() {
+ $(".text-{{ text_version.key }}").mouseover(function(){
+ $(".text-actions-{{ text_version.key }}").css('visibility','visible');
+ $(".text-{{ text_version.key }}").addClass('hover');
+ });
+ $(".text-{{ text_version.key }}").mouseout(function(){
+ $(".text-actions-{{ text_version.key }}").css('visibility','hidden');
+ $(".text-{{ text_version.key }}").removeClass('hover');
+ });
+ }) ;
+ -->
+ </script>
+ </td>
+ <td>{{ text_version.get_name }}</td>
+ <td>{{ text_version.created|local_date }}</td>
+ <td>{{ text_version|nb_comments:request }}</td>
-{% if v2_nid %}
-<br />
-<table class="diff" width="100%">
- <tr>
- <td class="diff-head" width="45%">
- {{ version1.title }}
- <br/>
- <span class="metadata">{% blocktrans with version1.created|local_date:tz as date and v1_nid as version_number %}Version #{{ version_number }} created on {{ date }}{% endblocktrans %}</span>
- </td>
- <td width="10%"></td>
- <td class="diff-head" width="45%">
- {{ version2.title }}
- <br/>
- <span class="metadata">{% blocktrans with version2.created|local_date:tz as date and v2_nid as version_number %}Version #{{ version_number }} created on {{ date }}{% endblocktrans %}</span>
- </td>
- </tr>
+ </tr>
+ {% endfor %}
+ </tbody>
</table>
-{% endif %}
-
-{% if is_diff %}
-{{ content }}
-{% else %}
-<center>{% blocktrans %}No differences{% endblocktrans %}</center>
-{% endif %}
+</form>
-{% if embed_code %}
-<div id="autoexpand_text_view_frame_container">
-{{ embed_code }}
-{% endif %}
-</div>
-
-{% endautoescape %}
</div>
{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/templates/site/text_history_compare.html Tue Feb 09 22:20:08 2010 +0100
@@ -0,0 +1,50 @@
+{% extends "site/layout/base_text.html" %}
+{% load com %}
+{% load i18n %}
+{% load local_perms %}
+{% block main %}
+
+{% get_local_text_perm request text can_edit_text as can_edit_text %}
+
+<script type="text/javascript">
+<!--
+tb_conf['current_tab'] = 'history';
+-->
+</script>
+
+<div id="text_history" class="tab-meta">
+
+<script type="text/javascript">
+<!--
+$(function() {
+ $(".hidden-text-actions").css('visibility','hidden');
+}) ;
+-->
+
+</script>
+
+
+<ul class="sub_list">
+ <li><a href="{% url text-history text.key %}">{% blocktrans %}Version list{% endblocktrans %}</a></li>
+ <li> / </li>
+ <li><a href="{% url text-history-version text.key v1.key %}">{% blocktrans with v1.get_version_number as version_number %}Version {{ version_number }}{% endblocktrans %}</a></li>
+ <li> / </li>
+ <li class="active_sub">{% blocktrans with v1.get_version_number as version_1_number and v2.get_version_number as version_2_number %}Comparison between version #{{ version_1_number }} and #{{ version_2_number }}{% endblocktrans %}</li>
+ <li> / </li>
+ <li><a href="{% url text-history-version text.key v2.key %}">{% blocktrans with v2.get_version_number as version_number %}Version {{ version_number }}{% endblocktrans %}</a></li>
+ <li> / </li>
+ <li><a href="{% url text-history-version text.key text.last_text_version.key %}">{% blocktrans %}Most recent version{% endblocktrans %}</a></li>
+</ul>
+
+<div style="clear:both;"></div>
+
+{% autoescape off %}
+{% if empty %}
+<center>{% blocktrans %}No differences{% endblocktrans %}</center>
+{% else %}
+{{ content }}
+{% endif %}
+{% endautoescape %}
+
+</div>
+{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/templates/site/text_history_version.html Tue Feb 09 22:20:08 2010 +0100
@@ -0,0 +1,52 @@
+{% extends "site/layout/base_text.html" %}
+{% load com %}
+{% load i18n %}
+{% load local_perms %}
+{% block main %}
+
+{% get_local_text_perm request text can_edit_text as can_edit_text %}
+
+<script type="text/javascript">
+<!--
+tb_conf['current_tab'] = 'history';
+-->
+</script>
+
+<div id="text_history" class="tab-meta">
+
+<script type="text/javascript">
+<!--
+$(function() {
+ $(".hidden-text-actions").css('visibility','hidden');
+}) ;
+-->
+
+</script>
+
+
+<ul class="sub_list">
+ <li><a href="{% url text-history text.key %}">{% blocktrans %}Version list{% endblocktrans %}</a></li>
+ <li> / </li>
+ <li class="active_sub">{% blocktrans with text_version.get_version_number as version_number %}Version {{ version_number }}{% endblocktrans %}</li>
+ {% if text_version.get_previous_version %}
+ <li> / </li>
+ <li><a href="{% url text-history-compare text.key text_version.get_previous_version.key text_version.key %}">{% blocktrans %}Compare with previous version{% endblocktrans %}</a></li>
+ {% endif %}
+ {% if text_version.get_next_version %}
+ <li> / </li>
+ <li><a href="{% url text-history-compare text.key text_version.key text_version.get_next_version.key %}">{% blocktrans %}Compare with next version{% endblocktrans %}</a></li>
+ {% endif %}
+ <li> / </li>
+ <li><a href="{% url text-history-version text.key text.last_text_version.key %}">{% blocktrans %}Most recent version{% endblocktrans %}</a></li>
+</ul>
+
+<div style="clear:both;"></div>
+
+<div id="autoexpand_text_view_frame_container">
+{% autoescape off %}
+{{ embed_code }}
+{% endautoescape %}
+</div>
+
+</div>
+{% endblock %}
--- a/src/cm/templates/site/text_list.html Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/templates/site/text_list.html Tue Feb 09 22:20:08 2010 +0100
@@ -136,7 +136,7 @@
<th>{% up_down title %}{% blocktrans %}Text{% endblocktrans %}{% endup_down %}</th>
<th>{% blocktrans %}Author{% endblocktrans %}</th>
<th>{% up_down -modified %}{% blocktrans %}Modified{% endblocktrans %}{% endup_down %}</th>
- <th># {% blocktrans %}comments{% endblocktrans %}</th>
+ <th>{% blocktrans %}# comments{% endblocktrans %}</th>
{% if can_manage_workspace %}<th>{% blocktrans %}Last week activity{% endblocktrans %}</th>{% endif %}
</tr>
</thead>
--- a/src/cm/templatetags/com.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/templatetags/com.py Tue Feb 09 22:20:08 2010 +0100
@@ -209,11 +209,14 @@
from cm.security import get_viewable_comments
+from cm.models import Text
@register.filter(name='nb_comments')
def nb_comments(text, request):
- return len(get_viewable_comments(request, text.last_text_version.comment_set.all(), text))
-
+ if type(text) == Text:
+ return len(get_viewable_comments(request, text.last_text_version.comment_set.all(), text))
+ else:
+ return len(get_viewable_comments(request, text.comment_set.all(), text))
## number tags
from cm.security import get_texts_with_perm, get_viewable_comments
@@ -297,3 +300,7 @@
all_params = all_params[1:]
return NewParams([a for a in all_params])
+@register.filter(name='invneg')
+def do_invneg(value, arg):
+ """."""
+ return int(arg) - int(value)
--- a/src/cm/tests/test_history.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/tests/test_history.py Tue Feb 09 22:20:08 2010 +0100
@@ -10,6 +10,7 @@
def test_revert(self):
text = Text.objects.all()[0]
#for i in range(1,text.get_versions_number()+1):
- text.revert_to_version(1)
+ text_version = Text.last_text_version
+ text.revert_to_version(text_version.key)
#self.assertEqual(Comment.objects.count(), 16)
--- a/src/cm/urls.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/urls.py Tue Feb 09 22:20:08 2010 +0100
@@ -63,14 +63,16 @@
url(r'^text/(?P<key>\w*)/pre_edit/$', text_pre_edit, name="text-preedit"),
url(r'^text/(?P<key>\w*)/settings/$', text_settings, name="text-settings"),
url(r'^text/(?P<key>\w*)/history/$', text_history, name="text-history"),
- url(r'^text/(?P<key>\w*)/history-version/(?P<v1_nid>\d*)/$', text_history, name="text-history-version"),
- url(r'^text/(?P<key>\w*)/history/(?P<v1_nid>\w*)/(?P<v2_nid>\d*)/$', text_history, name="text-history-compare"),
- url(r'^text/(?P<key>\w*)/revert/(?P<v1_nid>\w*)/$', text_revert, name="text-revert"),
+ url(r'^text/(?P<key>\w*)/history-version/(?P<version_key>\w*)/$', text_history_version, name="text-history-version"),
+ url(r'^text/(?P<key>\w*)/history-compare/(?P<v1_version_key>\w*)/(?P<v2_version_key>\w*)/$', text_history_compare, name="text-history-compare"),
+ url(r'^text/(?P<key>\w*)/history-compare/(?P<v1_version_key>\w*)/(?P<v2_version_key>\w*)/(?P<mode>\d*)$', text_history_compare, name="text-history-compare2"),
+ url(r'^text/(?P<key>\w*)/revert/(?P<text_version_key>\w*)/$', text_revert, name="text-revert"),
url(r'^text/(?P<key>\w*)/attach/(?P<attach_key>\w*)/$', text_attach, name="text-attach"),
- url(r'^text/(?P<key>\w*)/delete/$', text_delete, name="text-delete"),
+ url(r'^text/(?P<key>\w*)/delete/$', text_delete, name="text-delete"),
+ url(r'^text/(?P<key>\w*)/(?P<text_version_key>\w*)/delete/$', text_version_delete, name="text-version-delete"),
url(r'^text/(?P<key>\w*)/export/(?P<format>\w*)/(?P<download>\w*)/(?P<whichcomments>\w*)/(?P<withcolor>\w*)/$', text_export, name="text-export"),
url(r'^text/(?P<key>\w*)/history/$', text_history, name="text-history"),
- url(r'^text/(?P<key>\w*)/diff/(?P<id_v1>\w*)/(?P<id_v2>\w*)/$', text_diff, name="text-diff"),
+ #url(r'^text/(?P<key>\w*)/diff/(?P<id_v1>\w*)/(?P<id_v2>\w*)/$', text_diff, name="text-diff"),
# url(r'^text/(?P<key>\w*)/version/(?P<id_version>\w*)/$', text_version, name="text-version"),
# main client frame
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/utils/diff.py Tue Feb 09 22:20:08 2010 +0100
@@ -0,0 +1,115 @@
+import difflib, string
+from django.utils.translation import ugettext as _
+
+def isatag(x): return x.startswith("<") and x.endswith(">")
+
+def text_diff(a, b):
+ res = []
+ a, b = createlist(a), createlist(b)
+ s = difflib.SequenceMatcher(isatag, a, b)
+ for e in s.get_opcodes():
+ if e[0] == "replace":
+ res.append('<del class="diff modified">'+''.join(a[e[1]:e[2]]) + '</del><ins class="diff modified">'+''.join(b[e[3]:e[4]])+"</ins>")
+ elif e[0] == "delete":
+ res.append('<del class="diff">'+ ''.join(a[e[1]:e[2]]) + "</del>")
+ elif e[0] == "insert":
+ res.append('<ins class="diff">'+''.join(b[e[3]:e[4]]) + "</ins>")
+ elif e[0] == "equal":
+ res.append(''.join(b[e[3]:e[4]]))
+ else:
+ raise "error parsing %s" %(e[0])
+ return ''.join(res)
+
+COLORS = [
+'#FF0000',
+'#EE0000',
+'#DD0000',
+'#CC0000',
+'#BB0000',
+'#AA0000',
+'#990000',
+'#880000',
+'#770000',
+]
+
+from colorsys import hls_to_rgb, hsv_to_rgb
+
+def generatePastelColors(n):
+ s = .4
+ v = .99
+ return ['#'+''.join((hex(int(r*255))[2:],hex(int(g*255))[2:],hex(int(b*255))[2:])) for r,g,b in [hsv_to_rgb(h/200.,s,v) for h in range(1,100,100/n)]]
+
+
+DEFAULT_COLOR = '#D9D9D9'
+def get_colors(authors, last_white = False):
+ """
+ returns a dict for authors's colors (with last one white if 'last_white')
+ """
+ authors = set(authors)
+ #new_colors = list(tuple(COLORS))
+ new_colors = generatePastelColors(len(set(authors)))
+ res = []
+ if None in authors or '' in authors:
+ res = [(_(u'unknown'),DEFAULT_COLOR) ]
+ res.extend([(author,new_colors.pop()) for author in authors if author])
+ #if authors[-1]:
+ # res[authors[-1]] = '#FFFFFF'
+ return res
+
+
+def text_history(versions, authors):
+ res = versions[0]
+ colors = get_colors(authors)
+ for ind in range(len(versions)-1):
+ author = authors[ind]
+ color = colors.get(author,DEFAULT_COLOR)
+ v_2 = versions[ind + 1]
+ res = text_diff_add(v_2, res, color)
+ return res,colors.items()
+
+from cm.utils.html import surrond_text_node
+
+def text_diff_add(a,b, color):
+ res = []
+ a, b = createlist(a), createlist(b)
+ s = difflib.SequenceMatcher(isatag, a, b)
+ for e in s.get_opcodes():
+ if e[0] == "replace":
+ html_chunk = ''.join(b[e[3]:e[4]])
+ new_html_chunk = surrond_text_node(html_chunk,'<span style="background: %s;">' %color,'</span>')
+ res.append(new_html_chunk)
+ #res.append('<font style="background: %s;" class="diff modified">' %color+''.join(b[e[3]:e[4]])+"</font>")
+ elif e[0] == "delete":
+ pass
+ elif e[0] == "insert":
+ html_chunk = ''.join(b[e[3]:e[4]])
+ new_html_chunk = surrond_text_node(html_chunk,'<span style="background: %s;">' %color,'</span>')
+ res.append(new_html_chunk)
+ #res.append('<font style="background: %s;" class="diff">' %color+''.join(b[e[3]:e[4]]) + "</font>")
+ elif e[0] == "equal":
+ res.append(''.join(b[e[3]:e[4]]))
+ else:
+ raise "error parsing %s" %(e[0])
+ return ''.join(res)
+
+def createlist(x, b=0):
+ mode = 'char'
+ cur = ''
+ out = []
+ for c in x:
+ if mode == 'tag':
+ if c == '>':
+ if b: cur += ']'
+ else: cur += c
+ out.append(cur); cur = ''; mode = 'char'
+ else: cur += c
+ elif mode == 'char':
+ if c == '<':
+ out.append(cur)
+ if b: cur = '['
+ else: cur = c
+ mode = 'tag'
+ elif c in string.whitespace: out.append(cur+c); cur = ''
+ else: cur += c
+ out.append(cur)
+ return filter(lambda x: x is not '', out)
--- a/src/cm/utils/string.py Fri Feb 05 18:43:58 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-import chardet
-
-def to_unicode(input):
- if type(input) == str:
- res = None
- for encoding in [chardet.detect(input)['encoding'], 'utf8', 'latin1']:
- try:
- res = unicode(input, encoding)
- break;
- except UnicodeDecodeError:
- pass
- if not res:
- raise Exception('UnicodeDecodeError: could not decode')
- return res
- return input
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/utils/string_utils.py Tue Feb 09 22:20:08 2010 +0100
@@ -0,0 +1,15 @@
+import chardet
+
+def to_unicode(input):
+ if type(input) == str:
+ res = None
+ for encoding in [chardet.detect(input)['encoding'], 'utf8', 'latin1']:
+ try:
+ res = unicode(input, encoding)
+ break;
+ except UnicodeDecodeError:
+ pass
+ if not res:
+ raise Exception('UnicodeDecodeError: could not decode')
+ return res
+ return input
\ No newline at end of file
--- a/src/cm/views/__init__.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/views/__init__.py Tue Feb 09 22:20:08 2010 +0100
@@ -1,5 +1,3 @@
-from cm.diff import text_diff as _text_diff, \
- text_history as inner_text_history, get_colors
from cm.message import display_message
from cm.models import Text, TextVersion, Attachment, Comment, Configuration
from cm.security import has_global_perm
--- a/src/cm/views/texts.py Fri Feb 05 18:43:58 2010 +0100
+++ b/src/cm/views/texts.py Tue Feb 09 22:20:08 2010 +0100
@@ -3,8 +3,6 @@
from cm.client import jsonize, get_filter_datas, edit_comment, remove_comment, \
add_comment, RequestComplexEncoder, comments_thread, own_notify
from cm.cm_settings import NEW_TEXT_VERSION_ON_EDIT
-from cm.diff import text_diff as _text_diff, text_history as inner_text_history, \
- get_colors
from cm.exception import UnauthorizedException
from cm.message import *
from cm.models import *
@@ -211,6 +209,19 @@
text.delete()
return HttpResponse('') # no redirect because this is called by js
+@has_perm_on_text('can_delete_text')
+def text_version_delete(request, key, text_version_key):
+ text_version = TextVersion.objects.get(key=text_version_key)
+ text=text_version.text
+ if request.method != 'POST':
+ raise UnauthorizedException('Unauthorized')
+ display_message(request, _(u'Text version %(text_version_title)s deleted') %{'text_version_title':text_version.title})
+ register_activity(request, "text_version_removed", text=text)
+ import pdb;pdb.set_trace()
+ text_version.delete()
+ return HttpResponse('') # no redirect because this is called by js
+
+
@has_perm_on_text('can_view_text') # only protected by text_view / comment filtering done in view
def text_view_comments(request, key, version_key=None, adminkey=None):
text = get_text_by_keys_or_404(key)
@@ -445,59 +456,61 @@
@has_perm_on_text('can_view_text')
-def text_history(request, key, v1_nid=None, v2_nid=None, adminkey=False):
- text = get_text_by_keys_or_404(key)
- text_versions = text.get_versions()
- author_colors = get_colors([t.get_name() for t in text.get_inversed_versions()])
-
- if v1_nid:
- v1_nid = int(v1_nid)
- else:
- v1_nid = text.get_versions_number()
-
- v1 = text.get_version(v1_nid)
+def text_history_version(request, key, version_key):
+ text = get_text_by_keys_or_404(key)
+ text_version = get_textversion_by_keys_or_404(version_key, key=key)
+ template_dict = {'text' : text,
+ 'text_version' : text_version,
+ 'embed_code' : embed_html(key, 'id="text_view_frame" name="text_view_frame"', version_key),
+ }
+ return render_to_response('site/text_history_version.html',
+ template_dict,
+ context_instance=RequestContext(request))
- v1_id = v1.id
-
- v2_id = None
- v2 = None
- if v2_nid:
- v2_nid = int(v2_nid)
- v2 = text.get_version(v2_nid)
- v2_id = v2.id
+@has_perm_on_text('can_view_text')
+def text_history_compare(request, key, v1_version_key, v2_version_key, mode=''):
+ text = get_text_by_keys_or_404(key)
+ v1 = get_textversion_by_keys_or_404(v1_version_key, key=key)
+ v2 = get_textversion_by_keys_or_404(v2_version_key, key=key)
+
+ content = get_uniffied_inner_diff_table(v1.content, v2.content)
+ if mode=='1':
+ # alternate diff
+ from cm.utils.diff import text_diff
+ content = text_diff(v1.get_content(), v2.get_content())
- versions = text.get_inversed_versions()
- paired_versions = []
- colors_dict = dict(author_colors)
- for index in range(len(versions)):
- vv1 = versions[index]
- if index + 1 < len(versions):
- vv2 = versions[index + 1]
- else:
- vv2 = None
- paired_versions.append((vv1, vv2, colors_dict.get(vv1.get_name(), '#D9D9D9')))
+ template_dict = {
+ 'text' : text,
+ 'v1': v1,
+ 'v2': v2,
+ 'content' : content.strip(),
+ 'empty' : '<table class="diff"><tbody></tbody></table>'==content,
+ }
+ return render_to_response('site/text_history_compare.html',
+ template_dict,
+ context_instance=RequestContext(request))
+
+@has_perm_on_text('can_view_text')
+def text_history(request, key):
+ text = get_text_by_keys_or_404(key)
+
+ if request.method == 'POST':
+ v1_key = request.POST.get('newkey',None)
+ v2_key = request.POST.get('oldkey',None)
+ if v1_key and v2_key:
+ return redirect(request, 'text-history-compare', args=[text.key, v2_key, v1_key ])
+
+ text_versions = text.get_versions()
+ paginate_by = get_int(request.GET,'paginate',TEXT_PAGINATION)
- embed_code = ""
- content = ""
- if v1_nid and not v2_nid:
- embed_code = embed_html(key, 'id="text_view_frame" name="text_view_frame"', v1.key)
- else:
- content = get_uniffied_inner_diff_table(v1.content, v2.content)
-
- template_dict = {'paired_versions' : paired_versions,
- 'text' : text,
- 'v1_nid' : v1_nid,
- 'v2_nid' : v2_nid,
- 'v1_id' : v1_id,
- 'v2_id' : v2_id,
- 'version1': v1,
- 'version2': v2,
- 'content' : content.strip(),
- 'embed_code':embed_code,
- 'is_diff' : content !='<table class="diff"><tbody></tbody></table>',
- 'author_colors' : author_colors,
- }
- return render_to_response('site/text_history.html', template_dict, context_instance=RequestContext(request))
+ last_last_version = text_versions[1] if len(text_versions)>1 else None
+ context = {'text':text, 'last_version':text.last_text_version, 'last_last_version':last_last_version}
+ return object_list(request, text_versions,
+ template_name = 'site/text_history.html',
+ paginate_by = paginate_by,
+ extra_context=context,
+ )
+
# taken from trac
def _get_change_extent(str1, str2):
@@ -558,22 +571,6 @@
res.append('</tbody></table>')
return ''.join(res)
-@has_perm_on_text('can_view_text')
-def text_history_compare(request, key, v1_nid=None, v2_nid=None, adminkey=None):
- text = get_text_by_keys_or_404(key)
-
- vis_diff = difflib.HtmlDiff()
- v1 = text.get_version(int(v1_nid))
- v2 = text.get_version(int(v2_nid))
- content = _text_diff(v2.get_content(), v1.get_content())
- #content = vis_diff.make_table(v1.content.split('\n'), v2.content.split('\n'), v1_nid, v2_nid, context=None)
-
- template_dict = {
- 'text' : text,
- 'content' : content,
- }
- return render_to_response('site/text_history_compare.html', template_dict, context_instance=RequestContext(request))
-
#def text_history_version(request, key):
# text = get_text_by_keys_or_404(key=key)
# return _text_history_version(request, text)
@@ -586,32 +583,11 @@
# template_dict['admin'] = True
# return render_to_response('site/text_history.html', template_dict, context_instance=RequestContext(request))
#
-#def _text_history_version(request, text, admin=False):
-# pass
-#
class TextVersionForm(ModelForm):
class Meta:
model = TextVersion
fields = ('title', 'content', 'format')
-@has_perm_on_text('can_view_text')
-def text_diff(request, key, id_v1, id_v2):
- text = get_text_by_keys_or_404(key)
- text_version_1 = TextVersion.objects.get(pk=id_v1)
- text_version_2 = TextVersion.objects.get(pk=id_v2)
- content = _text_diff(text_version_1.get_content(), text_version_2.get_content())
- title = _text_diff(text_version_1.title, text_version_2.title)
- return render_to_response('site/text_view.html', {'text' : text, 'text_version_1' : text_version_1, 'text_version_2' : text_version_2, 'title' : title, 'content' : content}, context_instance=RequestContext(request))
-
-# commented out, unused suspected
-#@has_perm_on_text('can_view_text')
-#def text_version(request, key, id_version):
-# text = get_text_by_keys_or_404(key)
-# text_version = TextVersion.objects.get(pk=id_version)
-# # TODO : assert text_v in text ...
-# # TODO : do not use db id
-# return render_to_response('site/text_view.html', {'text' : text, 'text_version' : text_version, 'title' : text_version.title, 'content' : text_version.get_content()}, context_instance=RequestContext(request))
-
class EditTextForm(ModelForm):
title = forms.CharField(label=_("Title"), widget=forms.TextInput)
#format = forms.CharField(label=_("Format"))
@@ -749,11 +725,11 @@
# TODO: modif de la base => if POST
@has_perm_on_text('can_edit_text')
-def text_revert(request, key, v1_nid, adminkey=None):
+def text_revert(request, key, text_version_key):
text = get_text_by_keys_or_404(key)
- text.revert_to_version(v1_nid)
- display_message(request, _(u'A new version (copied from version %(version_id)s) has been created') % {'version_id':v1_nid})
+ text_version = text.revert_to_version(text_version_key)
+ display_message(request, _(u'A new version (copied from version %(version_title)s) has been created') % {'version_title':text_version.title})
return HttpResponseRedirect(reverse('text-history', args=[text.key]))