forked from Scifabric/pybossa
-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings_upref_mdata.py.tmpl
110 lines (103 loc) · 3.57 KB
/
settings_upref_mdata.py.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import pycountry
def upref_languages():
langs = [("Afrikaans", "Afrikaans"),
("Albanian", "Albanian"),
("Arabic", "Arabic"),
("Armenian", "Armenian"),
("Bengali", "Bengali"),
("Bosnian", "Bosnian"),
("Bulgarian", "Bulgarian"),
("Catalan", "Catalan"),
("Croatian", "Croatian"),
("Czech", "Czech"),
("Danish", "Danish"),
("Dutch", "Dutch"),
("English", "English"),
("Estonian", "Estonian"),
("Filipino", "Filipino"),
("Finnish", "Finnish"),
("French", "French"),
("German", "German"),
("Greek", "Greek"),
("Hebrew", "Hebrew"),
("Hindi", "Hindi"),
("Hungarian", "Hungarian"),
("Icelandic", "Icelandic"),
("Indonesian", "Indonesian"),
("Italian", "Italian"),
("Japanese", "Japanese"),
("Korean", "Korean"),
("Latvian", "Latvian"),
("Lithuanian", "Lithuanian"),
("Luxembourgish", "Luxembourgish"),
("Macedonian", "Macedonian"),
("Malay", "Malay"),
("Maltese", "Maltese"),
("Mongolian", "Mongolian"),
("Norwegian", "Norwegian"),
("Polish", "Polish"),
("Portuguese", "Portuguese"),
("Punjabi", "Punjabi"),
("Romanian", "Romanian"),
("Russian", "Russian"),
("Samoan", "Samoan"),
("Serbian", "Serbian"),
("Simplified Chinese", "Simplified Chinese"),
("Slovak", "Slovak"),
("Slovenian", "Slovenian"),
("Spanish", "Spanish"),
("Swedish", "Swedish"),
("Tamil", "Tamil"),
("Thai", "Thai"),
("Traditional Chinese", "Traditional Chinese"),
("Turkish", "Turkish"),
("Ukrainian", "Ukrainian"),
("Vietnamese", "Vietnamese"),
("Welsh", "Welsh")]
return langs
def upref_locations():
cts = []
for ct in pycountry.countries:
name = ct.name.encode('ascii', 'ignore').replace("'", "")
cts.append((name, name))
return sorted(cts)
def mdata_user_types():
types = [("", ""),
("Researcher", "Researcher"),
("Analyst", "Analyst"),
("Curator", "Curator")]
return types
def mdata_timezones():
tz = [("", ""), ("ACT", "Australia Central Time"),
("AET", "Australia Eastern Time"),
("AGT", "Argentina Standard Time"),
("ART", "(Arabic) Egypt Standard Time"),
("AST", "Alaska Standard Time"),
("BET", "Brazil Eastern Time"),
("BST", "Bangladesh Standard Time"),
("CAT", "Central African Time"),
("CNT", "Canada Newfoundland Time"),
("CST", "Central Standard Time"),
("CTT", "China Taiwan Time"),
("EAT", "Eastern African Time"),
("ECT", "European Central Time"),
("EET", "Eastern European Time"),
("EST", "Eastern Standard Time"),
("GMT", "Greenwich Mean Time"),
("HST", "Hawaii Standard Time"),
("IET", "Indiana Eastern Standard Time"),
("IST", "India Standard Time"),
("JST", "Japan Standard Time"),
("MET", "Middle East Time"),
("MIT", "Midway Islands Time"),
("MST", "Mountain Standard Time"),
("NET", "Near East Time"),
("NST", "New Zealand Standard Time"),
("PLT", "Pakistan Lahore Time"),
("PNT", "Phoenix Standard Time"),
("PRT", "Puerto Rick and US Virgin Islands Time"),
("PST", "Pacific Standard Time"),
("SST", "Solomon Standard Time"),
("UTC", "Universal Coordinated Time"),
("VST", "Vietnam Standard Time")]
return tz