Skip to content

Commit

Permalink
Merge pull request #253 from pbanaszkiewicz/gh-pages
Browse files Browse the repository at this point in the history
Add "lowercase" to language and country checks
  • Loading branch information
rgaiacs committed Oct 3, 2015
2 parents 2d10a2d + 877ac19 commit c29dd6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
root: .
venue: FIXME # brief name of host site without address (e.g., "Euphoric State University")
address: FIXME # street address of workshop (e.g., "123 Forth Street, Blimingen, Euphoria")
country: FIXME # country (two-letter ISO code such as "fr" - see https://en.wikipedia.org/wiki/ISO_3166-1)
language: FIXME # language (two-letter ISO code such as "fr" - see https://en.wikipedia.org/wiki/ISO_639-1)
country: FIXME # country (lowercase two-letter ISO code such as "fr" - see https://en.wikipedia.org/wiki/ISO_3166-1)
language: FIXME # language (lowercase two-letter ISO code such as "fr" - see https://en.wikipedia.org/wiki/ISO_639-1)
latlng: FIXME # fractional latitude and longitude (e.g., "41.7901128,-87.6007318"; you can use http://www.latlong.net/)
humandate: FIXME # human-readable date (e.g., "Feb 17-18, 2020")
humantime: FIXME # human-readable time (e.g., "9:00 am - 4:30 pm")
Expand Down
14 changes: 7 additions & 7 deletions tools/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ def check_root(root):

@look_for_fixme
def check_country(country):
'''"country" must be an ISO-3166 two-letter code.'''
'''"country" must be a lowercase ISO-3166 two-letter code.'''

return country in ISO_COUNTRY


@look_for_fixme
def check_language(language):
'''"language" must be an ISO-639 two-letter code.'''
'''"language" must be a lowercase ISO-639 two-letter code.'''

return language in ISO_LANGUAGE

Expand Down Expand Up @@ -260,11 +260,11 @@ def check_pass(value):
'root': (True, check_root, 'root can only be "."'),

'country': (True, check_country,
'country invalid: must use two-letter ISO code from ' +
', '.join(ISO_COUNTRY)),
'language' : (False, check_language,
'language invalid: must use two-letter ISO code from ' +
', '.join(ISO_LANGUAGE)),
'country invalid: must use lowercase two-letter ISO code ' +
'from ' + ', '.join(ISO_COUNTRY)),
'language': (False, check_language,
'language invalid: must use lowercase two-letter ISO code' +
' from ' + ', '.join(ISO_LANGUAGE)),

'humandate': (True, check_humandate,
'humandate invalid. Please use three-letter months like ' +
Expand Down

0 comments on commit c29dd6b

Please sign in to comment.