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
a13146a9
Commit
a13146a9
authored
Mar 29, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore short strings for same check
parent
352ff3a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
trans/checks.py
trans/checks.py
+7
-1
No files found.
trans/checks.py
View file @
a13146a9
...
...
@@ -107,9 +107,14 @@ def plural_check(f):
@
plural_check
def
check_same
(
source
,
target
,
flags
,
language
,
unit
):
# One letter things are usually labels or decimal/thousand separators
if
len
(
source
)
==
1
and
len
(
target
)
==
1
:
return
False
# English variants will have most things not translated
if
language
.
code
.
split
(
'_'
)[
0
]
==
'en'
:
return
False
# Ignore words which are often same in foreigh language
if
source
.
lower
()
in
SAME_BLACKLIST
or
source
.
lower
().
rstrip
(
': '
)
in
SAME_BLACKLIST
:
return
False
...
...
@@ -146,7 +151,8 @@ CHECKS['end_newline'] = (_('Trailing newline'), check_end_newline, _('Source and
@
plural_check
def
check_end_space
(
source
,
target
,
flags
,
language
,
unit
):
if
len
(
source
)
==
1
and
len
(
target
)
==
1
:
# One letter things are usually decimal/thousand separators
if
len
(
source
)
==
1
and
len
(
target
)
<=
1
:
return
False
if
language
.
code
.
split
(
'_'
)[
0
]
in
[
'fr'
,
'br'
]:
if
len
(
target
)
==
0
:
...
...
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