Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 294bc7b

Browse files
authored
feat: add brazilian portguese translation for mandatory fields (#332)
1 parent 1ee713d commit 294bc7b

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

osm_fieldwork/form_components/choice_fields.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,20 @@
3333

3434
# Define the choices sheet
3535
choices_data = [
36-
{"list_name": "yes_no", "name": "yes", "label::english(en)": "Yes", "label::nepali(ne)": "छ"},
37-
{"list_name": "yes_no", "name": "no", "label::english(en)": "No", "label::nepali(ne)": "छैन"},
36+
{
37+
"list_name": "yes_no",
38+
"name": "yes",
39+
"label::english(en)": "Yes",
40+
"label::nepali(ne)": "छ",
41+
"label::portuguese(pt-br)": "Sim",
42+
},
43+
{
44+
"list_name": "yes_no",
45+
"name": "no",
46+
"label::english(en)": "No",
47+
"label::nepali(ne)": "छैन",
48+
"label::portuguese(pt-br)": "Não",
49+
},
3850
]
3951

4052
choices_df = pd.DataFrame(choices_data)
@@ -48,6 +60,7 @@
4860
"label::swahili(sw)": "Lumped - poligoni moja (zaidi ya jengo moja limewekwa dijiti kuwa moja)",
4961
"label::french(fr)": "Lumped - un polygone (plus d'un bâtiment numérisé en un seul)",
5062
"label::spanish(es)": "Agrupado - un polígono (más de un edificio digitalizado como uno)",
63+
"label::portuguese(pt-br)": "Agrupado - um polígono (mais de um edifício digitalizado como um só)",
5164
},
5265
{
5366
"list_name": "digitisation_problem",
@@ -57,6 +70,7 @@
5770
"label::swahili(sw)": "Mgawanyiko - jengo moja (jengo moja limebadilishwa kuwa zaidi ya poligoni moja)",
5871
"label::french(fr)": "Fractionnement - un bâtiment (un bâtiment numérisé sous la forme de plusieurs polygones)",
5972
"label::spanish(es)": "Split - un edificio (un edificio digitalizado como más de un polígono)",
73+
"label::portuguese(pt-br)": "Split - um edifício (um edifício digitalizado como mais de um polígono)",
6074
},
6175
{
6276
"list_name": "digitisation_problem",
@@ -66,6 +80,7 @@
6680
"label::swahili(sw)": "MENGINEYO",
6781
"label::french(fr)": "AUTRES",
6882
"label::spanish(es)": "OTROS",
83+
"label::portuguese(pt-br)": "OUTROS",
6984
},
7085
]
7186

osm_fieldwork/form_components/digitisation_fields.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@
3737
"name": "verification",
3838
"label::english(en)": "Verification",
3939
"label::nepali(ne)": "प्रमाणीकरण",
40+
"label::portuguese(pt-br)": "Verificação",
4041
"relevant": "(${new_feature} != '') or (${building_exists} = 'yes')",
4142
},
4243
{
4344
"type": "select_one yes_no",
4445
"name": "digitisation_correct",
4546
"label::english(en)": "Is the digitized location for this feature correct?",
4647
"label::nepali(ne)": "के यो डिजिटाइज गरिएको स्थान सही छ?",
48+
"label::portuguese(pt-br)": "O local digitalizado para esse recurso está correto?",
4749
"relevant": "(${new_feature} != '') or (${building_exists} = 'yes')",
4850
"calculation": "once(if(${new_feature} != '', 'yes', ''))",
4951
"read_only": "${new_feature} != ''",
@@ -54,13 +56,15 @@
5456
"name": "digitisation_problem",
5557
"label::english(en)": "What is wrong with the digitization?",
5658
"label::nepali(en)": "डिजिटलाइजेशनमा के गल्ती छ?",
59+
"label::portuguese(pt-br)": "O que há de errado com a digitalização?",
5760
"relevant": "${digitisation_correct}='no'",
5861
},
5962
{
6063
"type": "text",
6164
"name": "digitisation_problem_other",
6265
"label::english(en)": "You said “Other.” Please tell us what went wrong with the digitization!",
6366
"label::nepali(ne)": "तपाईंले 'अरू' भन्नुभयो। डिजिटलाइजेशनमा के गल्ती भयो! कृपया हामीलाई भन्न सक्नुहुन्छ?",
67+
"label::portuguese(pt-br)": "Você disse “Outro”. Diga-nos o que deu errado com a digitalização!",
6468
"relevant": "${digitisation_problem}='other' ",
6569
},
6670
{"type": "end group"},
@@ -69,6 +73,7 @@
6973
"name": "image",
7074
"label::english(en)": "Take a Picture",
7175
"label::nepali(ne)": "तस्विर लिनुहोस्",
76+
"label::portuguese(pt-br)": "Tire uma foto",
7277
"apperance": "minimal",
7378
"parameters": "max-pixels=1000",
7479
},
@@ -77,6 +82,7 @@
7782
"name": "end_note",
7883
"label::english(en)": "You can't proceed with data acquisition, if the building doesn't exist.",
7984
"label::nepali(ne)": "यदि भवन अवस्थित छैन भने, तपाईं डाटा लिन अगाडि बढ्न सक्नुहुन्न।",
85+
"label::portuguese(pt-br)": "Não é possível prosseguir com a aquisição de dados se o edifício não existir.",
8086
"relevant": "${building_exists} = 'no'",
8187
},
8288
]

osm_fieldwork/form_components/mandatory_fields.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def get_mandatory_fields(new_geom_type: DbGeomType):
8888
by HOT's FMTM to record ${form_category} map features.""",
8989
"label::nepali(ne)": """स्वागत छ ${username}। ${form_category} नक्सा Data रेकर्ड गर्न HOT को FMTM द्वारा
9090
यो सर्वेक्षण फारम उत्पन्न भएको थियो।""",
91+
"label::portuguese(pt-br)": """Bem-vindo ${username}. Este formulário de pesquisa foi gerado
92+
pelo FMTM do HOT para registrar os recursos do mapa ${form_category}.""",
9193
},
9294
{"notes": "Fields essential to FMTM"},
9395
{"type": "start-geopoint", "name": "warmup", "notes": "collects location on form start"},
@@ -97,6 +99,7 @@ def get_mandatory_fields(new_geom_type: DbGeomType):
9799
"name": "new_feature",
98100
"label::english(en)": "Please draw a new geometry",
99101
"label::nepali(ne)": "कृपया नयाँ ज्यामिति कोर्नुहोस्।",
102+
"label::portuguese(pt-br)": "Por favor, desenhe uma nova geometria",
100103
"appearance": "placement-map",
101104
"relevant": "${feature}= ''",
102105
"required": "yes",
@@ -153,6 +156,7 @@ def get_mandatory_fields(new_geom_type: DbGeomType):
153156
"name": "building_exists",
154157
"label::english(en)": "Does this feature exist?",
155158
"label::nepali(ne)": "के यो भवन अवस्थित छ?",
159+
"label::portuguese(pt-br)": "Esse recurso existe?",
156160
"relevant": "${feature} != '' ",
157161
},
158162
{

osm_fieldwork/update_xlsform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"spanish": "es",
5050
"swahili": "sw",
5151
"nepali": "ne",
52+
"portuguese": "pt-br",
5253
}
5354

5455
# def handle_translations(

0 commit comments

Comments
 (0)