Skip to content

Commit

Permalink
Fix age/gender i18n
Browse files Browse the repository at this point in the history
Since the labels for the age-selection widget are taken from an
environment variable (no longer hard-coded) they are not included in
the strings for i18n. This patch adds default values to agepicker.py
so that they are included in the Sugar POT file.
  • Loading branch information
walterbender authored and godiard committed Nov 25, 2014
1 parent d7c30c7 commit 9cc32e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/jarabe/intro/agepicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@

_group_labels = None
_SECONDS_PER_YEAR = 365 * 24 * 60 * 60.

_DEFAULT_PROMPT = _('Select grade:')
_DEFAULT_LABELS = [_('Preschool'), _('Kindergarten'), _('1st Grade'),
_('2nd Grade'), _('3rd Grade'), _('4th Grade'),
_('5th Grade'), _('6th Grade'), _('7th Grade'),
_('High School'), _('Adult')]

def calculate_birth_timestamp(age):
age_in_seconds = age * _SECONDS_PER_YEAR
Expand Down

0 comments on commit 9cc32e3

Please sign in to comment.