Skip to content

Commit

Permalink
feat: add nepali translation to mandatory fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujanadh committed Dec 25, 2024
1 parent 2572ec1 commit be20a5b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions osm_fieldwork/form_components/choice_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

# Define the choices sheet
choices_data = [
{"list_name": "yes_no", "name": "yes", "label::english(en)": "Yes"},
{"list_name": "yes_no", "name": "no", "label::english(en)": "No"},
{"list_name": "yes_no", "name": "yes", "label::english(en)": "Yes", "label::nepali(ne)": "हो"},
{"list_name": "yes_no", "name": "no", "label::english(en)": "No", "label::nepali(ne)": "होइन"},
]

choices_df = pd.DataFrame(choices_data)
Expand All @@ -44,6 +44,7 @@
"list_name": "digitisation_problem",
"name": "lumped",
"label::english(en)": "Lumped - one polygon (more than one building digitized as one)",
"label::nepali(ne)": "लुम्पेड - एक बहुभुज (एउटा भन्दा बढी भवनहरू एकको रूपमा डिजिटलाइज गरिएको)",
"label::swahili(sw)": "Lumped - poligoni moja (zaidi ya jengo moja limewekwa dijiti kuwa moja)",
"label::french(fr)": "Lumped - un polygone (plus d'un bâtiment numérisé en un seul)",
"label::spanish(es)": "Agrupado - un polígono (más de un edificio digitalizado como uno)",
Expand All @@ -52,6 +53,7 @@
"list_name": "digitisation_problem",
"name": "split",
"label::english(en)": "Split - one building (one building digitized as more than one polygon)",
"label::nepali(ne)": "विभाजन - एउटा भवन (एउटा भवन एक भन्दा बढी बहुभुजको रूपमा डिजिटाइज गरिएको)",
"label::swahili(sw)": "Mgawanyiko - jengo moja (jengo moja limebadilishwa kuwa zaidi ya poligoni moja)",
"label::french(fr)": "Fractionnement - un bâtiment (un bâtiment numérisé sous la forme de plusieurs polygones)",
"label::spanish(es)": "Split - un edificio (un edificio digitalizado como más de un polígono)",
Expand All @@ -60,6 +62,7 @@
"list_name": "digitisation_problem",
"name": "other",
"label::english(en)": "OTHER",
"label::nepali(ne)": "अन्य",
"label::swahili(sw)": "MENGINEYO",
"label::french(fr)": "AUTRES",
"label::spanish(es)": "OTROS",
Expand Down
6 changes: 6 additions & 0 deletions osm_fieldwork/form_components/digitisation_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@
"type": "begin group",
"name": "verification",
"label::english(en)": "Verification",
"label::nepali(ne)": "प्रमाणीकरण",
"relevant": "(${new_feature} != '') or (${building_exists} = 'yes')",
},
{
"type": "select_one yes_no",
"name": "digitisation_correct",
"label::english(en)": "Is the digitized location for this feature correct?",
"label::nepali(ne)": "के यो डिजिटाइज गरिएको स्थान सही छ?",
"relevant": "(${new_feature} != '') or (${building_exists} = 'yes')",
"calculation": "once(if(${new_feature} != '', 'yes', ''))",
"read_only": "${new_feature} != ''",
Expand All @@ -51,26 +53,30 @@
"type": "select_one digitisation_problem",
"name": "digitisation_problem",
"label::english(en)": "What is wrong with the digitization?",
"label::nepali(en)": "डिजिटलाइजेशनमा के गल्ती छ?",
"relevant": "${digitisation_correct}='no'",
},
{
"type": "text",
"name": "digitisation_problem_other",
"label::english(en)": "You said “Other.” Please tell us what went wrong with the digitization!",
"label::nepali(ne)": "तपाईंले 'अरू' भन्नुभयो। डिजिटलाइजेशनमा के गल्ती भयो! कृपया हामीलाई भन्न सक्नुहुन्छ?",
"relevant": "${digitisation_problem}='other' ",
},
{"type": "end group"},
{
"type": "image",
"name": "image",
"label::english(en)": "Take a Picture",
"label::nepali(ne)": "तस्विर लिनुहोस्",
"apperance": "minimal",
"parameters": "max-pixels=1000",
},
{
"type": "note",
"name": "end_note",
"label::english(en)": "You can't proceed with data acquisition, if the building doesn't exist.",
"label::nepali(ne)": "यदि भवन अवस्थित छैन भने, तपाईं डाटा लिन अगाडि बढ्न सक्नुहुन्न।",
"relevant": "${building_exists} = 'no'",
},
]
Expand Down
4 changes: 4 additions & 0 deletions osm_fieldwork/form_components/mandatory_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
"name": "instructions",
"label::english(en)": """Welcome ${username}. This survey form was generated
by HOT's FMTM to record ${form_category} map features.""",
"label::nepali(ne)": """स्वागत छ ${username}। ${form_category} नक्सा Data रेकर्ड गर्न HOT को FMTM द्वारा
यो सर्वेक्षण फारम उत्पन्न भएको थियो।""",
},
{"notes": "Fields essential to FMTM"},
{"type": "start-geopoint", "name": "warmup", "notes": "collects location on form start"},
Expand All @@ -74,6 +76,7 @@
"type": "geopoint",
"name": "new_feature",
"label::english(en)": "Alternatively, take a gps coordinates of a new feature",
"label::nepali(ne)": "वैकल्पिक रूपमा, नयाँ सुविधाको GPS निर्देशांक लिनुहोस्।",
"appearance": "placement-map",
"relevant": "${feature}= ''",
"required": "yes",
Expand Down Expand Up @@ -129,6 +132,7 @@
"type": "select_one yes_no",
"name": "building_exists",
"label::english(en)": "Does this feature exist?",
"label::nepali(ne)": "के यो भवन अवस्थित छ?",
"relevant": "${feature} != '' ",
},
{
Expand Down

0 comments on commit be20a5b

Please sign in to comment.