Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
3cce2540
Commit
3cce2540
authored
Feb 27, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging to po files processing
parent
e9dd7c07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
settings.py
settings.py
+18
-1
trans/models.py
trans/models.py
+4
-0
No files found.
settings.py
View file @
3cce2540
...
...
@@ -155,11 +155,24 @@ TEMPLATE_CONTEXT_PROCESSORS = (
LOGGING
=
{
'version'
:
1
,
'disable_existing_loggers'
:
False
,
'formatters'
:
{
'verbose'
:
{
'format'
:
'%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
'simple'
:
{
'format'
:
'%(levelname)s %(message)s'
},
},
'handlers'
:
{
'mail_admins'
:
{
'level'
:
'ERROR'
,
'class'
:
'django.utils.log.AdminEmailHandler'
}
},
'console'
:{
'level'
:
'DEBUG'
,
'class'
:
'logging.StreamHandler'
,
'formatter'
:
'simple'
},
},
'loggers'
:
{
'django.request'
:
{
...
...
@@ -167,6 +180,10 @@ LOGGING = {
'level'
:
'ERROR'
,
'propagate'
:
True
,
},
'weblate'
:
{
'handlers'
:
[
'console'
],
'level'
:
'DEBUG'
,
}
}
}
...
...
trans/models.py
View file @
3cce2540
...
...
@@ -4,12 +4,15 @@ from lang.models import Language
from
glob
import
glob
import
os
import
os.path
import
logging
import
git
from
translate.storage
import
factory
from
trans.managers
import
TranslationManager
,
UnitManager
from
util
import
is_plural
,
split_plural
,
join_plural
logger
=
logging
.
getLogger
(
'weblate'
)
class
Project
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
100
)
slug
=
models
.
SlugField
(
db_index
=
True
)
...
...
@@ -127,6 +130,7 @@ class SubProject(models.Model):
'''
blobs
=
self
.
get_translation_blobs
()
for
code
,
path
,
blob
in
blobs
:
logger
.
info
(
'processing %s'
,
path
)
Translation
.
objects
.
update_from_blob
(
self
,
code
,
path
,
blob
)
def
get_lang_code
(
self
,
path
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment