Skip to content

Commit

Permalink
Language handler: only add language descriptions if this is for prese…
Browse files Browse the repository at this point in the history
…ntation purposes. Re nvaccess#7284.

Reduece confusion further by omitting language codes from language description texts.
  • Loading branch information
josephsl committed Apr 4, 2018
1 parent 9a375d5 commit 233dbfc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/languageHandler.py
Expand Up @@ -115,8 +115,11 @@ def getAvailableLanguages(presentational=False):
d=[]
for i in l:
desc=getLanguageDescription(i)
label="%s, %s"%(desc,i) if desc else i
d.append(label)
if desc and presentational:
# #7284: just add language description.
d.append(desc)
else:
d.append("%s, %s"%(desc,i) if desc else i)
#Prepare a zipped view of language codes and descriptions.
# #7284: especially for sorting by description.
langs = zip(l,d)
Expand Down

0 comments on commit 233dbfc

Please sign in to comment.