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
466accdf
Commit
466accdf
authored
Mar 13, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check for trailing stop
parent
1990990e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
trans/checks.py
trans/checks.py
+7
-0
No files found.
trans/checks.py
View file @
466accdf
# -*- coding: UTF-8 -*-
from
django.utils.translation
import
ugettext_lazy
as
_
import
re
...
...
@@ -92,6 +93,12 @@ def check_end_space(source, target, flags, language):
CHECKS
[
'end_space'
]
=
(
_
(
'Trailing space'
),
check_end_newline
,
_
(
'Source and translated do not both end with space'
))
@
plural_check
def
check_end_stop
(
source
,
target
,
flags
,
language
):
return
check_chars
(
source
,
target
,
-
1
,
[
'.'
,
'。'
,
'।'
,
'۔'
])
CHECKS
[
'end_stop'
]
=
(
_
(
'Trailing stop'
),
check_end_newline
,
_
(
'Source and translated do not both end with full stop'
))
# For now all format string checks use generic implementation, but
# it should be switched to language specific
def
check_format_strings
(
source
,
target
,
regex
):
...
...
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