Last active
April 4, 2016 19:55
-
-
Save lukaville/c7709e7553e16d8485c969d888232557 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vowel = "аеёиоуыэюя" | |
def about(value): | |
is_first_letter_vowel = value[:1] in vowel | |
prefix = "об" if is_first_letter_vowel else "о" | |
return prefix + " " + value | |
environment.filters['about'] = about |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment