Skip to content

Commit bd8ce6d

Browse files
committed
chore(dref): disable traslation on derf
1 parent a72818d commit bd8ce6d

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

dref/translation.py

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
from modeltranslation.translator import TranslationOptions, register
22

3-
from dref.models import (
4-
Dref,
5-
DrefFile,
6-
DrefFinalReport,
7-
DrefOperationalUpdate,
8-
IdentifiedNeed,
9-
NationalSocietyAction,
10-
PlannedIntervention,
11-
PlannedInterventionIndicators,
12-
RiskSecurity,
13-
)
3+
from dref.models import Dref, DrefFinalReport, DrefOperationalUpdate
4+
5+
"""
6+
NOTE:Commenting out for now as, we are currently
7+
working on translation feature on dref
8+
"""
149

1510

1611
@register(Dref)
@@ -19,6 +14,8 @@ class DrefTO(TranslationOptions):
1914
"title",
2015
"title_prefix",
2116
"event_text",
17+
)
18+
skip_fields = (
2219
"ns_request_text",
2320
"dref_recurrent_text",
2421
"lessons_learned",
@@ -47,16 +44,18 @@ class DrefTO(TranslationOptions):
4744
)
4845

4946

50-
@register(DrefFile)
51-
class DrefFileTO(TranslationOptions):
52-
fields = ("caption",)
47+
# @register(DrefFile)
48+
# class DrefFileTO(TranslationOptions):
49+
# fields = ("caption",)
5350

5451

5552
@register(DrefFinalReport)
5653
class DrefFinalReportTO(TranslationOptions):
5754
fields = (
5855
"title",
5956
"title_prefix",
57+
)
58+
skip_fields = (
6059
"event_description",
6160
"anticipatory_actions",
6261
"event_scope",
@@ -83,6 +82,8 @@ class DrefOperationalUpdateTO(TranslationOptions):
8382
"title_prefix",
8483
"event_description",
8584
"anticipatory_actions",
85+
)
86+
skip_fields = (
8687
"event_scope",
8788
"ifrc",
8889
"icrc",
@@ -105,39 +106,38 @@ class DrefOperationalUpdateTO(TranslationOptions):
105106
)
106107

107108

108-
@register(IdentifiedNeed)
109-
class IdentifiedNeedTO(TranslationOptions):
110-
fields = (
111-
"title",
112-
"description",
113-
)
109+
# @register(IdentifiedNeed)
110+
# class IdentifiedNeedTO(TranslationOptions):
111+
# fields = (
112+
# "title",
113+
# "description",
114+
# )
114115

115116

116-
@register(NationalSocietyAction)
117-
class NationalSocietyActionTO(TranslationOptions):
118-
fields = ("description",)
117+
# @register(NationalSocietyAction)
118+
# class NationalSocietyActionTO(TranslationOptions):
119+
# fields = ("description",)
119120

120121

121-
@register(PlannedIntervention)
122-
class PlannedInterventionTO(TranslationOptions):
123-
fields = (
124-
"title",
125-
"description",
126-
"progress_towards_outcome",
127-
"narrative_description_of_achievements",
128-
"challenges",
129-
"lessons_learnt",
130-
)
122+
# @register(PlannedIntervention)
123+
# class PlannedInterventionTO(TranslationOptions):
124+
# fields = (
125+
# "title",
126+
# "description",
127+
# "progress_towards_outcome",
128+
# "narrative_description_of_achievements",
129+
# "challenges",
130+
# "lessons_learnt",
131+
# )
131132

133+
# @register(PlannedInterventionIndicators)
134+
# class PlannedInterventionIndicatorsTO(TranslationOptions):
135+
# fields = ("title",)
132136

133-
@register(PlannedInterventionIndicators)
134-
class PlannedInterventionIndicatorsTO(TranslationOptions):
135-
fields = ("title",)
136137

137-
138-
@register(RiskSecurity)
139-
class RiskSecurityTO(TranslationOptions):
140-
fields = (
141-
"risk",
142-
"mitigation",
143-
)
138+
# @register(RiskSecurity)
139+
# class RiskSecurityTO(TranslationOptions):
140+
# fields = (
141+
# "risk",
142+
# "mitigation",
143+
# )

0 commit comments

Comments
 (0)