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
f16da835
Commit
f16da835
authored
Apr 08, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add model fields for custom script processing (issue #221)
parent
58cffe6c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
222 additions
and
0 deletions
+222
-0
trans/migrations/0033_auto__add_field_subproject_extra_commit_file__add_field_subproject_pre.py
...subproject_extra_commit_file__add_field_subproject_pre.py
+199
-0
trans/models/subproject.py
trans/models/subproject.py
+21
-0
weblate/appsettings.py
weblate/appsettings.py
+2
-0
No files found.
trans/migrations/0033_auto__add_field_subproject_extra_commit_file__add_field_subproject_pre.py
0 → 100644
View file @
f16da835
This diff is collapsed.
Click to expand it.
trans/models/subproject.py
View file @
f16da835
...
...
@@ -37,6 +37,7 @@ from trans.util import is_repo_link
from
trans.util
import
get_site_url
from
trans.util
import
sleep_while_git_locked
from
trans.validators
import
validate_repoweb
,
validate_filemask
,
validate_repo
from
weblate.appsettings
import
SCRIPT_CHOICES
class
SubProjectManager
(
models
.
Manager
):
...
...
@@ -128,6 +129,26 @@ class SubProject(models.Model, PercentMixin, URLMixin):
'and is slightly slower.'
),
)
extra_commit_file
=
models
.
CharField
(
max_length
=
200
,
default
=
''
,
blank
=
True
,
validators
=
[
validate_filemask
],
help_text
=
ugettext_lazy
(
'Additional file to include in commits, please check '
'documentation for more details.'
,
)
)
pre_commit_script
=
models
.
CharField
(
max_length
=
200
,
default
=
''
,
blank
=
True
,
choices
=
SCRIPT_CHOICES
,
help_text
=
ugettext_lazy
(
'Script to be executed before commiting translation.'
),
)
locked
=
models
.
BooleanField
(
default
=
False
,
help_text
=
ugettext_lazy
(
...
...
weblate/appsettings.py
View file @
f16da835
...
...
@@ -111,3 +111,5 @@ MACHINE_TRANSLATION_SERVICES = get('MACHINE_TRANSLATION_SERVICES', ())
# Whether machine translations are enabled
MACHINE_TRANSLATION_ENABLED
=
len
(
MACHINE_TRANSLATION_SERVICES
)
>
0
SCRIPT_CHOICES
=
((
''
,
''
),)
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