Skip to content

Commit 0ad4d70

Browse files
Merge pull request #2555 from IFRCGo/chore/disable-translation-on-dref
Disable translation on DREF
2 parents a72818d + 82ab62d commit 0ad4d70

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

dref/translation.py

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,43 @@ class DrefTO(TranslationOptions):
4545
"communication",
4646
"risk_security_concern",
4747
)
48+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
49+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
50+
skip_fields = (
51+
"ns_request_text",
52+
"dref_recurrent_text",
53+
"lessons_learned",
54+
"child_safeguarding_risk_level",
55+
"event_description",
56+
"anticipatory_actions",
57+
"event_scope",
58+
"national_authorities",
59+
"ifrc",
60+
"icrc",
61+
"partner_national_society",
62+
"un_or_other_actor",
63+
"major_coordination_mechanism",
64+
"identified_gaps",
65+
"people_assisted",
66+
"selection_criteria",
67+
"operation_objective",
68+
"response_strategy",
69+
"human_resource",
70+
"is_volunteer_team_diverse",
71+
"surge_personnel_deployed",
72+
"logistic_capacity_of_ns",
73+
"pmer",
74+
"communication",
75+
"risk_security_concern",
76+
)
4877

4978

5079
@register(DrefFile)
5180
class DrefFileTO(TranslationOptions):
5281
fields = ("caption",)
82+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
83+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
84+
skip_fields = ("caption",)
5385

5486

5587
@register(DrefFinalReport)
@@ -74,6 +106,26 @@ class DrefFinalReportTO(TranslationOptions):
74106
"national_society_conducted_description",
75107
"financial_report_description",
76108
)
109+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
110+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
111+
skip_fields = (
112+
"event_description",
113+
"anticipatory_actions",
114+
"event_scope",
115+
"ifrc",
116+
"icrc",
117+
"partner_national_society",
118+
"national_authorities",
119+
"un_or_other_actor",
120+
"selection_criteria",
121+
"operation_objective",
122+
"response_strategy",
123+
"major_coordination_mechanism",
124+
"risk_security_concern",
125+
"event_text",
126+
"national_society_conducted_description",
127+
"financial_report_description",
128+
)
77129

78130

79131
@register(DrefOperationalUpdate)
@@ -103,6 +155,29 @@ class DrefOperationalUpdateTO(TranslationOptions):
103155
"pmer",
104156
"communication",
105157
)
158+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
159+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
160+
skip_fields = (
161+
"event_scope",
162+
"ifrc",
163+
"icrc",
164+
"partner_national_society",
165+
"national_authorities",
166+
"un_or_other_actor",
167+
"major_coordination_mechanism",
168+
"people_assisted",
169+
"selection_criteria",
170+
"operation_objective",
171+
"response_strategy",
172+
"risk_security_concern",
173+
"anticipatory_to_response",
174+
"human_resource",
175+
"is_volunteer_team_diverse",
176+
"surge_personnel_deployed",
177+
"logistic_capacity_of_ns",
178+
"pmer",
179+
"communication",
180+
)
106181

107182

108183
@register(IdentifiedNeed)
@@ -111,11 +186,20 @@ class IdentifiedNeedTO(TranslationOptions):
111186
"title",
112187
"description",
113188
)
189+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
190+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
191+
skip_fields = (
192+
"title",
193+
"description",
194+
)
114195

115196

116197
@register(NationalSocietyAction)
117198
class NationalSocietyActionTO(TranslationOptions):
118199
fields = ("description",)
200+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
201+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
202+
skip_fields = ("description",)
119203

120204

121205
@register(PlannedIntervention)
@@ -128,11 +212,24 @@ class PlannedInterventionTO(TranslationOptions):
128212
"challenges",
129213
"lessons_learnt",
130214
)
215+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
216+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
217+
skip_fields = (
218+
"title",
219+
"description",
220+
"progress_towards_outcome",
221+
"narrative_description_of_achievements",
222+
"challenges",
223+
"lessons_learnt",
224+
)
131225

132226

133227
@register(PlannedInterventionIndicators)
134228
class PlannedInterventionIndicatorsTO(TranslationOptions):
135229
fields = ("title",)
230+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
231+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
232+
skip_fields = ("title",)
136233

137234

138235
@register(RiskSecurity)
@@ -141,3 +238,9 @@ class RiskSecurityTO(TranslationOptions):
141238
"risk",
142239
"mitigation",
143240
)
241+
# NOTE: Adding skip_fields temporarily to avoid removing previously translated data
242+
# TODO(sudip): Remove skip_fields after dref translation feature is implemented
243+
skip_fields = (
244+
"risk",
245+
"mitigation",
246+
)

0 commit comments

Comments
 (0)