Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using translation #18

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9ac4d0d
Babel
bemanuel Jan 16, 2018
340b8fe
Ajustes iniciais para traducao
bemanuel Jan 16, 2018
ba4b4f2
Ignore translations files .mo
bemanuel Jan 16, 2018
52143e3
Files for babel and Requirements
bemanuel Jan 16, 2018
5d12f40
Files for babel and Requirements
bemanuel Jan 16, 2018
8fbc7b7
Adjusting some parts of source code
bemanuel Jan 16, 2018
52d87cd
Adjusting some parts of source code
bemanuel Jan 16, 2018
8df92c4
New tags for translate
bemanuel Jan 16, 2018
1961d48
New tags for translate
bemanuel Jan 16, 2018
1ec0adc
More tags
bemanuel Jan 16, 2018
a2a40ba
More tags
bemanuel Jan 16, 2018
7c7d4d9
More tags
bemanuel Jan 16, 2018
a58db64
More tags
bemanuel Jan 16, 2018
9027454
More tags
bemanuel Jan 16, 2018
e027989
Merge branch 'master' into master
thomasDOTwtf Feb 10, 2018
7ebd18b
removed requirement to make build pass
thomasDOTwtf Feb 10, 2018
ca1f76c
Changing template to user language
bemanuel Feb 22, 2018
13b27a1
Merge branch 'master' of https://github.com/bemanuel/PowerDNS-Admin
bemanuel Feb 22, 2018
e736b61
Requirements to translate
bemanuel Feb 22, 2018
c03171c
Changes to inform requirements on Debian/Ubuntu
bemanuel Feb 22, 2018
9ca2c5e
New libs
bemanuel Feb 24, 2018
c450e46
New libs
bemanuel Feb 24, 2018
309b0ae
New libs
bemanuel Feb 24, 2018
c35af97
Correction for cases without LDAP_FILTER
bemanuel Feb 24, 2018
07e639c
Fixed package of translation
bemanuel Feb 27, 2018
bd8fe39
Fixed requirements
bemanuel Feb 27, 2018
4c1cd1a
Translations compiled by pybabel
bemanuel Feb 27, 2018
d0e14ac
Process of translation
bemanuel Feb 27, 2018
0490fbd
Process of translation
bemanuel Feb 27, 2018
d155dde
Avoid error on Python 2.6
bemanuel Mar 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ db_repository/*
upload/avatar/*
tmp/*
.ropeproject

# translate
*.mo
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ For testing purpose, you could also use SQLite as backend. This way you do not h

### PowerDNS-Admin

#### Requirements

For Debian/Ubuntu:

```
$ sudo apt install libmysqlclient-dev libldap2-dev libldap-2.4-2 libsasl2-dev libxml2-dev libxmlsec1-dev
```

In this installation guide, I am using CentOS 7 and run my python stuffs with *virtualenv*. If you don't have it, lets install it:
```
$ sudo yum install python-pip
Expand Down
2 changes: 2 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
from flask import Flask, request, session, redirect, url_for
from flask_login import LoginManager
from flask_sqlalchemy import SQLAlchemy
from flask_babel import Babel, gettext

app = Flask(__name__)
app.config.from_object('config')
app.wsgi_app = ProxyFix(app.wsgi_app)
babel = Babel(app)

login_manager = LoginManager()
login_manager.init_app(app)
Expand Down
5 changes: 4 additions & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ def is_validate(self, method):
return False

if LDAP_TYPE == 'ad':
searchFilter = "(&(objectcategory=person)(%s=%s)(%s))" % (LDAP_USERNAMEFIELD, self.username, LDAP_FILTER)
if not LDAP_FILTER:
searchFilter = "(&(objectcategory=person)(%s=%s))" % (LDAP_USERNAMEFIELD, self.username)
else:
searchFilter = "(&(objectcategory=person)(%s=%s)(%s))" % (LDAP_USERNAMEFIELD, self.username,LDAP_FILTER)

elif LDAP_TYPE == 'ldap':
searchFilter = "(&(%s=%s)(%s))" % (LDAP_USERNAMEFIELD, self.username, LDAP_FILTER)
Expand Down
Loading