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
a873dc45
Commit
a873dc45
authored
Mar 27, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify definitions of language name fixups
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
76867dba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
21 deletions
+17
-21
weblate/lang/data.py
weblate/lang/data.py
+15
-0
weblate/lang/models.py
weblate/lang/models.py
+2
-21
No files found.
weblate/lang/data.py
View file @
a873dc45
...
...
@@ -258,6 +258,21 @@ RTL_LANGS = set((
'yi'
,
))
# Fixups (mostly shortening) of langauge names
LANGUAGE_NAME_FIXUPS
=
{
'ia'
:
'Interlingua'
,
'el'
:
'Greek'
,
'st'
:
'Sotho'
,
'oc'
:
'Occitan'
,
'nb'
:
'Norwegian Bokmål'
,
'pa'
:
'Punjabi'
,
'zh_CN'
:
'Simplified Chinese'
,
'zh_TW'
:
'Traditional Chinese'
,
'ca@valencia'
:
'Valencian'
,
'ky'
:
'Kyrgyz'
,
}
# Following variables are used to map Gettext plural equations
# to one/few/may/other like rules
...
...
weblate/lang/models.py
View file @
a873dc45
...
...
@@ -448,27 +448,8 @@ class Language(models.Model, PercentMixin):
'''
Fixes name, in most cases when wrong one is provided by ttkit.
'''
# Fixups (mostly shortening) of langauge names
if
self
.
code
==
'ia'
:
self
.
name
=
'Interlingua'
elif
self
.
code
==
'el'
:
self
.
name
=
'Greek'
elif
self
.
code
==
'st'
:
self
.
name
=
'Sotho'
elif
self
.
code
==
'oc'
:
self
.
name
=
'Occitan'
elif
self
.
code
==
'nb'
:
self
.
name
=
'Norwegian Bokmål'
elif
self
.
code
==
'pa'
:
self
.
name
=
'Punjabi'
elif
self
.
code
==
'zh_CN'
:
self
.
name
=
'Simplified Chinese'
elif
self
.
code
==
'zh_TW'
:
self
.
name
=
'Traditional Chinese'
elif
self
.
code
==
'ca@valencia'
:
self
.
name
=
'Valencian'
elif
self
.
code
==
'ky'
:
self
.
name
=
'Kyrgyz'
if
self
.
code
in
data
.
LANGUAGE_NAME_FIXUPS
:
self
.
name
=
data
.
LANGUAGE_NAME_FIXUPS
[
self
.
code
]
def
set_direction
(
self
):
'''
...
...
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