From: Aarni Koskela Date: Wed, 30 Mar 2016 14:32:27 +0000 (+0300) Subject: Rename `Locale.direction` to `Locale.text_direction`. X-Git-Tag: 2.3.1~4^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=532f638daed43125ea8acbea82d0ad97fd80ebcd;p=thirdparty%2Fbabel.git Rename `Locale.direction` to `Locale.text_direction`. --- diff --git a/babel/core.py b/babel/core.py index 251ebf16..cdd82388 100644 --- a/babel/core.py +++ b/babel/core.py @@ -897,16 +897,15 @@ class Locale(object): return self._data['character_order'] @property - def direction(self): + def text_direction(self): """The text direction for the language in CSS short-hand form. - >>> Locale('de', 'DE').direction + >>> Locale('de', 'DE').text_direction 'ltr' - >>> Locale('ar', 'SA').direction + >>> Locale('ar', 'SA').text_direction 'rtl' """ - order = self.character_order - return ''.join([word[0] for word in order.split('-')]) + return ''.join(word[0] for word in self.character_order.split('-')) def default_locale(category=None, aliases=LOCALE_ALIASES):