Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

return preferred language if lp and item is lang neutral

  • Loading branch information...
commit cf53343489c5b86dc0c974e7557f2bc759c52f78 1 parent a3184e4
@agitator agitator authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Products/ATVocabularyManager/types/simple/vocabulary.py
View
4 Products/ATVocabularyManager/types/simple/vocabulary.py
@@ -172,10 +172,10 @@ def getSortedKeys(self, instance=None):
context = self
if self.isLinguaPloneInstalled():
from Products.LinguaPlone.interfaces import ITranslatable
+ langtool = getToolByName(self, 'portal_languages')
if instance and ITranslatable.providedBy(instance):
- lang = instance.getLanguage()
+ lang = instance.getLanguage() or langtool.getPreferredLanguage()
else:
- langtool = getToolByName(self, 'portal_languages')
lang = langtool.getPreferredLanguage()
context = context.getTranslation(lang) or self
Please sign in to comment.
Something went wrong with that request. Please try again.