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
0e714fae
Commit
0e714fae
authored
Mar 15, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
2d8a7eee
36384184
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
docs/usage.rst
docs/usage.rst
+2
-0
trans/checks.py
trans/checks.py
+35
-0
No files found.
docs/usage.rst
View file @
0e714fae
...
...
@@ -116,6 +116,8 @@ Not translated
++++++++++++++
The source and translated strings are same at least in one of plural forms.
This checks ignores some strings which are quite usually same in all
languages.
.. _check-begin_newline:
...
...
trans/checks.py
View file @
0e714fae
...
...
@@ -36,6 +36,39 @@ C_PRINTF_MATCH = re.compile('''
(?P<type>[
\
w%])) #
t
ype (%s, %d, etc.)
)'''
,
re
.
VERBOSE
)
# We ignore some words which are usually not translated
SAME_BLACKLIST
=
[
'b'
,
'bzip2'
,
'data'
,
'e-mail'
,
'eib'
,
'export'
,
'firmware'
,
'gib'
,
'gzip'
,
'id'
,
'imei'
,
'import'
,
'kib'
,
'latex'
,
'mib'
,
'ok'
,
'open document'
,
'pdf'
,
'pib'
,
'port'
,
'server'
,
'sim'
,
'smsc'
,
'software'
,
'sql'
,
'text'
,
'tib'
,
'wiki'
,
'xml'
,
'zip'
,
]
CHECKS
=
{}
...
...
@@ -61,6 +94,8 @@ def plural_check(f):
def
check_same
(
source
,
target
,
flags
,
language
):
if
language
.
code
.
split
(
'_'
)[
0
]
==
'en'
:
return
False
if
source
.
lower
()
in
SAME_BLACKLIST
:
return
False
return
(
source
==
target
)
CHECKS
[
'same'
]
=
(
_
(
'Not translated'
),
check_same
,
_
(
'Source and translated strings are same'
))
...
...
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