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
3c6b01f3
Commit
3c6b01f3
authored
Mar 12, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check for missing plural forms
parent
15439a8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
trans/checks.py
trans/checks.py
+11
-0
No files found.
trans/checks.py
View file @
3c6b01f3
...
...
@@ -128,3 +128,14 @@ def check_c_format(source, target, flags):
return
check_format_strings
(
source
,
target
,
C_PRINTF_MATCH
)
CHECKS
[
'c_format'
]
=
(
_
(
'C format'
),
check_c_format
,
_
(
'Format string does not match source'
))
# Check for incomplete plural forms
def
check_plurals
(
sources
,
targets
,
flags
):
if
len
(
sources
)
==
1
:
return
False
if
targets
==
len
(
targets
)
*
[
''
]:
return
False
return
(
''
in
targets
)
CHECKS
[
'plurals'
]
=
(
_
(
'Missing plurals'
),
check_c_format
,
_
(
'Some plural forms are not translated'
))
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