File tree Expand file tree Collapse file tree 7 files changed +48
-7
lines changed
templates/django_dev_protector Expand file tree Collapse file tree 7 files changed +48
-7
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ coverage.xml
46
46
.hypothesis /
47
47
48
48
# Translations
49
- * .mo
50
49
* .pot
51
50
52
51
# Django stuff:
Original file line number Diff line number Diff line change @@ -60,3 +60,12 @@ curl \
60
60
-X POST -d '{"key": "<SECRET_KEY>", "status": true}' \
61
61
http://<your_domain>/django_dev_protector/
62
62
```
63
+
64
+ Localize
65
+ --------
66
+ The app template support Russian. You only need to switch Russian in settings.
67
+ ```
68
+ LANGUAGE_CODE = 'ru-ru'
69
+
70
+ USE_I18N = True
71
+ ```
Original file line number Diff line number Diff line change
1
+ # Translation for django-dev-protector template.
2
+ # Copyright (C) 2016 Manyakhin K.
3
+ # This file is distributed under the same license as the django_dev_protector package.
4
+ # Manyakhin K. [email protected] , 2016.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version : 0.3\n "
10
+ "Report-Msgid-Bugs-To : \n "
11
+ "POT-Creation-Date : 2016-11-14 18:33+0000\n "
12
+ "PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13
+ "
Last-Translator :
Manyakhin Konstantin [email protected] \n "
14
+ "Language : Russian\n "
15
+ "MIME-Version : 1.0\n "
16
+ "Content-Type : text/plain; charset=UTF-8\n "
17
+ "Content-Transfer-Encoding : 8bit\n "
18
+ "Plural-Forms : nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n "
19
+ "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n "
20
+ "%100>=11 && n%100<=14)? 2 : 3);\n "
21
+
22
+ #: templates/django_dev_protector/index.html:6
23
+ #: templates/django_dev_protector/index.html:9
24
+ msgid "The work was not paid"
25
+ msgstr "Работа не была оплачена"
26
+
27
+ #: templates/django_dev_protector/index.html:10
28
+ msgid "Owner of this site has not paid to the developer"
29
+ msgstr "Владелец данного сайта не заплатил разработчику"
30
+
31
+ #: templates/django_dev_protector/index.html:12
32
+ msgid "In 10 seconds you will be redirected to another site"
33
+ msgstr "Через 10 секунд вы будете перенаправлены на другой сайт"
Original file line number Diff line number Diff line change 1
- False
1
+ True
Original file line number Diff line number Diff line change
1
+ {% load i18n %}
1
2
<!DOCTYPE html>
2
3
< html >
3
4
< head >
4
5
< meta charset ="utf-8 ">
5
- < title > The work was not paid</ title >
6
+ < title > {% trans " The work was not paid" %} </ title >
6
7
</ head >
7
8
< body >
8
- < h1 > The work was not paid.</ h1 >
9
- < h3 > Owner of this site has not paid to the developer</ h3 >
9
+ < h1 > {% trans " The work was not paid" %} .</ h1 >
10
+ < h3 > {% trans " Owner of this site has not paid to the developer" %} </ h3 >
10
11
{% if redirect_url %}
11
- < h4 > In 10 seconds you will be redirected to another site < a href ="{{ redirect_url }} "> {{ redirect_url }}</ a > </ h4 >
12
+ < h4 > {% trans " In 10 seconds you will be redirected to another site" %} < a href ="{{ redirect_url }} "> {{ redirect_url }}</ a > </ h4 >
12
13
< script >
13
14
setTimeout ( function ( ) {
14
15
location . href = "{{ redirect_url }}" ;
Original file line number Diff line number Diff line change 9
9
10
10
ALLOWED_HOSTS = []
11
11
12
- PROTECT_REDIRECT_URL = 'http://ya.ru'
13
12
14
13
INSTALLED_APPS = [
15
14
'django.contrib.admin' ,
You can’t perform that action at this time.
0 commit comments