Skip to content

Commit 10ad5fb

Browse files
committed
Merge branch 'develop' into new_i18n
Conflicts: cms/middleware/multilingual.py docs/upgrade/index.rst
2 parents bb7c546 + a9670a5 commit 10ad5fb

File tree

58 files changed

+2149
-1109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2149
-1109
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: python
22
python:
3+
- "2.5"
34
- "2.6"
45
- "2.7"
56
env:

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Contributors (in alphabetical order):
2626
* Alberto Paro
2727
* Alessandro Ronchi
2828
* Aleš Kocjančič
29+
* Alex Cucu
2930
* Alexandre Leray
3031
* Alexey Subbotin
3132
* Alvin Mites
@@ -153,6 +154,7 @@ Contributors (in alphabetical order):
153154
* Paolo
154155
* Patrick Toal
155156
* Paul van der Linden
157+
* Pavel Puchkin
156158
* pbgc
157159
* Pedro Gracia
158160
* Pete Loggie

cms/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = '2.4.0.pre'
2+
__version__ = '2.3.3.post0'
33

44
# patch settings
55
try:

cms/cache/permissions.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,48 @@
22
from django.conf import settings
33
from django.core.cache import cache
44

5-
permission_cache_keys = []
6-
all_keys = []
5+
from django.contrib.auth.models import User
6+
7+
PERMISSION_KEYS = [
8+
'can_change', 'can_add', 'can_delete',
9+
'can_change_advanced_settings', 'can_publish',
10+
'can_change_permissions', 'can_move_page',
11+
'can_moderate', 'can_view']
12+
713

814
def get_cache_key(user, key):
915
return "%s:permission:%s:%s" % (
1016
settings.CMS_CACHE_PREFIX, user.username, key)
1117

18+
1219
def get_permission_cache(user, key):
1320
"""
1421
Helper for reading values from cache
1522
"""
1623
return cache.get(get_cache_key(user, key))
1724

25+
1826
def set_permission_cache(user, key, value):
1927
"""
2028
Helper method for storing values in cache. Stores used keys so
2129
all of them can be cleaned when clean_permission_cache gets called.
2230
"""
2331
# store this key, so we can clean it when required
2432
cache_key = get_cache_key(user, key)
25-
26-
if not cache_key in all_keys:
27-
all_keys.append(cache_key)
28-
if not key in permission_cache_keys:
29-
permission_cache_keys.append(key)
3033
cache.set(cache_key, value, settings.CMS_CACHE_DURATIONS['permissions'])
3134

35+
3236
def clear_user_permission_cache(user):
3337
"""
3438
Cleans permission cache for given user.
3539
"""
36-
for key in permission_cache_keys:
37-
cache.delete(get_cache_key(user, key))
40+
for key in PERMISSION_KEYS:
41+
cache.delete(get_cache_key(user, key))
42+
3843

3944
def clear_permission_cache():
40-
for key in all_keys:
41-
cache.delete(key)
45+
users = User.objects.filter(is_active=True)
46+
for user in users:
47+
for key in PERMISSION_KEYS:
48+
cache_key = get_cache_key(user, key)
49+
cache.delete(cache_key)

cms/locale/ar/LC_MESSAGES/django.po

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# SOME DESCRIPTIVE TITLE.
22
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
33
# This file is distributed under the same license as the PACKAGE package.
4-
#
4+
#
55
# Translators:
66
# Jonas Obrist <me@ojii.ch>, 2011.
77
msgid ""
88
msgstr ""
99
"Project-Id-Version: django-cms\n"
10-
"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
11-
"POT-Creation-Date: 2012-09-19 14:44+0200\n"
10+
"Report-Msgid-Bugs-To: \n"
11+
"POT-Creation-Date: 2012-09-21 14:52+0200\n"
1212
"PO-Revision-Date: 2012-09-19 14:44+0000\n"
1313
"Last-Translator: Patrick Lauber <patrick.lauber@divio.ch>\n"
1414
"Language-Team: divio.ch <developers@divio.ch>\n"
15+
"Language: ar\n"
1516
"MIME-Version: 1.0\n"
1617
"Content-Type: text/plain; charset=UTF-8\n"
1718
"Content-Transfer-Encoding: 8bit\n"
18-
"Language: ar\n"
19-
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
19+
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
20+
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
2021
"X-Poedit-Country: SWITZERLAND\n"
2122
"X-Poedit-Language: English\n"
2223
"X-Poedit-SourceCharset: utf-8\n"
@@ -127,8 +128,7 @@ msgid "Page Title"
127128
msgstr "عنوان الصفحة"
128129

129130
#: admin/forms.py:154
130-
msgid ""
131-
"Overwrites what is displayed at the top of your browser or in bookmarks"
131+
msgid "Overwrites what is displayed at the top of your browser or in bookmarks"
132132
msgstr "حرر المعروض في أعلى متصفحك أو في الـ bookmarks."
133133

134134
#: admin/forms.py:155
@@ -176,7 +176,9 @@ msgstr "مستخدم"
176176
msgid ""
177177
"Add page permission requires also access to children, or descendants, "
178178
"otherwise added page can't be changed by its creator."
179-
msgstr "Add page permission requires also access to children, or descendants, otherwise added page can't be changed by its creator."
179+
msgstr ""
180+
"Add page permission requires also access to children, or descendants, "
181+
"otherwise added page can't be changed by its creator."
180182

181183
#: admin/forms.py:233
182184
msgid "Add page permission also requires edit page permission."
@@ -219,7 +221,9 @@ msgstr "أعلم المستخدم"
219221
msgid ""
220222
"Send email notification to user about username or password change. Requires "
221223
"user email."
222-
msgstr "بعث رسالة تنبيهية للمسخدم حول تغيير اسم المستخدم أو كلمة المرور. يتطب عنوان البريد الإلكتروني للمستخدم."
224+
msgstr ""
225+
"بعث رسالة تنبيهية للمسخدم حول تغيير اسم المستخدم أو كلمة المرور. يتطب عنوان "
226+
"البريد الإلكتروني للمستخدم."
223227

224228
#: admin/forms.py:330
225229
msgid "New password"
@@ -253,7 +257,8 @@ msgstr "إعدادات إفتراضية"
253257

254258
#: admin/pageadmin.py:111
255259
msgid "Note: This page reloads if you change the selection. Save it first."
256-
msgstr "ملاحظة: هذه الصفحة ستقوم بإعادة التحميل عند تغيير المحدد. قم بالحفظ أولاً."
260+
msgstr ""
261+
"ملاحظة: هذه الصفحة ستقوم بإعادة التحميل عند تغيير المحدد. قم بالحفظ أولاً."
257262

258263
#: admin/pageadmin.py:113 admin/pageadmin.py:165
259264
msgid "Hidden"
@@ -356,7 +361,8 @@ msgstr ""
356361
#, python-format
357362
msgid ""
358363
"%(plugin_name)s plugin edited at position %(position)s in %(placeholder)s"
359-
msgstr "تم تعديل الإضافة %(plugin_name)s في %(position)s الموجودة في %(placeholder)s"
364+
msgstr ""
365+
"تم تعديل الإضافة %(plugin_name)s في %(position)s الموجودة في %(placeholder)s"
360366

361367
#: admin/pageadmin.py:1370
362368
msgid "You have no permission to move a plugin"
@@ -375,7 +381,9 @@ msgstr ""
375381
msgid ""
376382
"%(plugin_name)s plugin at position %(position)s in %(placeholder)s was "
377383
"deleted."
378-
msgstr "تم حذف الإضافة %(plugin_name)s الموجودة في %(placeholder)s في المكان %(position)s."
384+
msgstr ""
385+
"تم حذف الإضافة %(plugin_name)s الموجودة في %(placeholder)s في المكان "
386+
"%(position)s."
379387

380388
#: admin/permissionadmin.py:94
381389
msgid "View restriction"
@@ -709,7 +717,9 @@ msgstr "مغير من قبل"
709717
msgid ""
710718
"When the page should go live. Status must be \"Published\" for page to go "
711719
"live."
712-
msgstr "When the page should go live. Status must be \"Published\" for page to go live."
720+
msgstr ""
721+
"When the page should go live. Status must be \"Published\" for page to go "
722+
"live."
713723

714724
#: models/pagemodel.py:62
715725
msgid "When to expire the page. Leave empty to never expire."
@@ -723,7 +733,9 @@ msgstr "لن يتم عرض الآباء في التصفح"
723733
msgid ""
724734
"An unique identifier that is used with the page_url templatetag for linking "
725735
"to this page"
726-
msgstr "An unique identifier that is used with the page_url templatetag for linking to this page"
736+
msgstr ""
737+
"An unique identifier that is used with the page_url templatetag for linking "
738+
"to this page"
727739

728740
#: models/pagemodel.py:66
729741
msgid "attached menu"
@@ -1011,7 +1023,9 @@ msgstr "يجب أن يتم تعبئة اللغة أو الصفحة"
10111023
msgid ""
10121024
"Choose a page to include its plugins into this placeholder, empty will "
10131025
"choose current page"
1014-
msgstr "قم باختيار صفحة ليتم وضع إضافاتها في مكان محدد، سيتم إختيار الصفحة الحالية عند عدم التحديد."
1026+
msgstr ""
1027+
"قم باختيار صفحة ليتم وضع إضافاتها في مكان محدد، سيتم إختيار الصفحة الحالية "
1028+
"عند عدم التحديد."
10151029

10161030
#: plugins/inherit/models.py:11
10171031
msgid "Optional: the language of the plugins you want"
@@ -1291,8 +1305,8 @@ msgstr "عنوان url لملف الفيديو"
12911305

12921306
#: plugins/video/models.py:10
12931307
msgid ""
1294-
"vimeo or youtube video url. Example: "
1295-
"http://www.youtube.com/watch?v=-iJ7bs4mTUY"
1308+
"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=-"
1309+
"iJ7bs4mTUY"
12961310
msgstr ""
12971311

12981312
#: plugins/video/models.py:11
@@ -1498,7 +1512,9 @@ msgstr "حالة الصفحة"
14981512
msgid ""
14991513
"This page must be moderated at level %(moderation_level)s, post a message "
15001514
"for moderator."
1501-
msgstr "يجب إدارة الصفحة من مستخدم بمستوى %(moderation_level)s، أرسل رسالة إلى المدير."
1515+
msgstr ""
1516+
"يجب إدارة الصفحة من مستخدم بمستوى %(moderation_level)s، أرسل رسالة إلى "
1517+
"المدير."
15021518

15031519
#: templates/admin/cms/page/change_form.html:190
15041520
msgid "Request approvemet"
@@ -1855,7 +1871,8 @@ msgstr ""
18551871
#: templatetags/cms_tags.py:80
18561872
#, python-format
18571873
msgid ""
1858-
"A template tag couldn't find the page with lookup arguments `%(page_lookup)s\n"
1874+
"A template tag couldn't find the page with lookup arguments `"
1875+
"%(page_lookup)s\n"
18591876
"`. The URL of the request was: http://%(host)s%(path)s"
18601877
msgstr ""
18611878

@@ -1973,8 +1990,7 @@ msgstr "عنوان الـ URL غير صحيح. مثال: /my/url "
19731990
msgid ""
19741991
"Page %(pages)s has the same url '%(url)s' as current page \"%(instance)s\"."
19751992
msgid_plural ""
1976-
"Pages %(pages)s have the same url '%(url)s' as current page "
1977-
"\"%(instance)s\"."
1993+
"Pages %(pages)s have the same url '%(url)s' as current page \"%(instance)s\"."
19781994
msgstr[0] ""
19791995
msgstr[1] ""
19801996
msgstr[2] ""

0 commit comments

Comments
 (0)