From e95eadff51b004725de272e45ca2c343f6d571eb Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Fri, 20 Aug 2021 20:59:04 +0200
Subject: [PATCH] Rename status (back) to status (revert) and make them
 translateble.

---
 hypha/apply/funds/workflow.py         | 66 ++++++++++----------
 hypha/locale/en/LC_MESSAGES/django.po | 87 ++++++++++++++++++---------
 2 files changed, 92 insertions(+), 61 deletions(-)

diff --git a/hypha/apply/funds/workflow.py b/hypha/apply/funds/workflow.py
index e1aaa2174..893939206 100644
--- a/hypha/apply/funds/workflow.py
+++ b/hypha/apply/funds/workflow.py
@@ -243,10 +243,10 @@ SingleStageDefinition = [
         'internal_review': {
             'transitions': {
                 'post_review_discussion': _('Close Review'),
-                INITIAL_STATE: 'Need screening (back)',
+                INITIAL_STATE: _('Need screening (revert)'),
             },
             'display': _('Internal Review'),
-            'public': f'{settings.ORG_SHORT_NAME} Review',
+            'public': _('{org_short_name} Review').format(org_short_name=settings.ORG_SHORT_NAME),
             'stage': Request,
             'permissions': default_permissions,
         },
@@ -256,7 +256,7 @@ SingleStageDefinition = [
             'transitions': {
                 'post_review_more_info': _('Request More Information'),
                 'determination': _('Ready For Determination'),
-                'internal_review': 'Open Review (back)',
+                'internal_review': _('Open Review (revert)'),
                 'almost': _('Accept but additional info required'),
                 'accepted': _('Accept'),
                 'rejected': _('Dismiss'),
@@ -285,7 +285,7 @@ SingleStageDefinition = [
     {
         'determination': {
             'transitions': {
-                'post_review_discussion': 'Ready For Discussion (back)',
+                'post_review_discussion': _('Ready For Discussion (revert)'),
                 'almost': _('Accept but additional info required'),
                 'accepted': _('Accept'),
                 'rejected': _('Dismiss'),
@@ -299,7 +299,7 @@ SingleStageDefinition = [
         'almost': {
             'transitions': {
                 'accepted': _('Accept'),
-                'post_review_discussion': 'Ready For Discussion (back)',
+                'post_review_discussion': _('Ready For Discussion (revert)'),
             },
             'display': _('Accepted but additional info required'),
             'stage': Request,
@@ -364,10 +364,10 @@ SingleStageExternalDefinition = [
         'ext_internal_review': {
             'transitions': {
                 'ext_post_review_discussion': _('Close Review'),
-                INITIAL_STATE: 'Need screening (back)',
+                INITIAL_STATE: _('Need screening (revert)'),
             },
             'display': _('Internal Review'),
-            'public': f'{settings.ORG_SHORT_NAME} Review',
+            'public': _('{org_short_name} Review').format(org_short_name=settings.ORG_SHORT_NAME),
             'stage': RequestExt,
             'permissions': default_permissions,
         },
@@ -378,7 +378,7 @@ SingleStageExternalDefinition = [
                 'ext_post_review_more_info': _('Request More Information'),
                 'ext_external_review': _('Open External Review'),
                 'ext_determination': _('Ready For Determination'),
-                'ext_internal_review': 'Open Internal Review (back)',
+                'ext_internal_review': _('Open Internal Review (revert)'),
                 'ext_rejected': _('Dismiss'),
             },
             'display': _('Ready For Discussion'),
@@ -402,7 +402,7 @@ SingleStageExternalDefinition = [
         'ext_external_review': {
             'transitions': {
                 'ext_post_external_review_discussion': _('Close Review'),
-                'ext_post_review_discussion': 'Ready For Discussion (back)',
+                'ext_post_review_discussion': _('Ready For Discussion (revert)'),
             },
             'display': _('External Review'),
             'stage': RequestExt,
@@ -414,7 +414,7 @@ SingleStageExternalDefinition = [
             'transitions': {
                 'ext_post_external_review_more_info': _('Request More Information'),
                 'ext_determination': _('Ready For Determination'),
-                'ext_external_review': 'Open External Review (back)',
+                'ext_external_review': _('Open External Review (revert)'),
                 'ext_almost': _('Accept but additional info required'),
                 'ext_accepted': _('Accept'),
                 'ext_rejected': _('Dismiss'),
@@ -439,7 +439,7 @@ SingleStageExternalDefinition = [
     {
         'ext_determination': {
             'transitions': {
-                'ext_post_external_review_discussion': 'Ready For Discussion (back)',
+                'ext_post_external_review_discussion': _('Ready For Discussion (revert)'),
                 'ext_almost': _('Accept but additional info required'),
                 'ext_accepted': _('Accept'),
                 'ext_rejected': _('Dismiss'),
@@ -453,7 +453,7 @@ SingleStageExternalDefinition = [
         'ext_almost': {
             'transitions': {
                 'ext_accepted': _('Accept'),
-                'ext_post_external_review_discussion': 'Ready For Discussion (back)',
+                'ext_post_external_review_discussion': _('Ready For Discussion (revert)'),
             },
             'display': _('Accepted but additional info required'),
             'stage': RequestExt,
@@ -518,7 +518,7 @@ SingleStageCommunityDefinition = [
         },
         'com_open_call': {
             'transitions': {
-                INITIAL_STATE: 'Need screening (back)',
+                INITIAL_STATE: _('Need screening (revert)'),
                 'com_rejected': _('Dismiss'),
             },
             'display': 'Open Call (public)',
@@ -531,22 +531,22 @@ SingleStageCommunityDefinition = [
             'transitions': {
                 'com_community_review': _('Open Community Review'),
                 'com_post_review_discussion': _('Close Review'),
-                INITIAL_STATE: 'Need screening (back)',
+                INITIAL_STATE: _('Need screening (revert)'),
                 'com_rejected': _('Dismiss'),
             },
             'display': _('Internal Review'),
-            'public': f'{settings.ORG_SHORT_NAME} Review',
+            'public': _('{org_short_name} Review').format(org_short_name=settings.ORG_SHORT_NAME),
             'stage': RequestCom,
             'permissions': default_permissions,
         },
         'com_community_review': {
             'transitions': {
                 'com_post_review_discussion': _('Close Review'),
-                'com_internal_review': 'Open Internal Review (back)',
+                'com_internal_review': _('Open Internal Review (revert)'),
                 'com_rejected': _('Dismiss'),
             },
             'display': _('Community Review'),
-            'public': f'{settings.ORG_SHORT_NAME} Review',
+            'public': _('{org_short_name} Review').format(org_short_name=settings.ORG_SHORT_NAME),
             'stage': RequestCom,
             'permissions': community_review_permissions,
         },
@@ -557,7 +557,7 @@ SingleStageCommunityDefinition = [
                 'com_post_review_more_info': _('Request More Information'),
                 'com_external_review': _('Open External Review'),
                 'com_determination': _('Ready For Determination'),
-                'com_internal_review': 'Open Internal Review (back)',
+                'com_internal_review': _('Open Internal Review (revert)'),
                 'com_rejected': _('Dismiss'),
             },
             'display': _('Ready For Discussion'),
@@ -581,7 +581,7 @@ SingleStageCommunityDefinition = [
         'com_external_review': {
             'transitions': {
                 'com_post_external_review_discussion': _('Close Review'),
-                'com_post_review_discussion': 'Ready For Discussion (back)',
+                'com_post_review_discussion': _('Ready For Discussion (revert)'),
             },
             'display': _('External Review'),
             'stage': RequestCom,
@@ -593,7 +593,7 @@ SingleStageCommunityDefinition = [
             'transitions': {
                 'com_post_external_review_more_info': _('Request More Information'),
                 'com_determination': _('Ready For Determination'),
-                'com_external_review': 'Open External Review (back)',
+                'com_external_review': _('Open External Review (revert)'),
                 'com_almost': _('Accept but additional info required'),
                 'com_accepted': _('Accept'),
                 'com_rejected': _('Dismiss'),
@@ -618,7 +618,7 @@ SingleStageCommunityDefinition = [
     {
         'com_determination': {
             'transitions': {
-                'com_post_external_review_discussion': 'Ready For Discussion (back)',
+                'com_post_external_review_discussion': _('Ready For Discussion (revert)'),
                 'com_almost': _('Accept but additional info required'),
                 'com_accepted': _('Accept'),
                 'com_rejected': _('Dismiss'),
@@ -632,7 +632,7 @@ SingleStageCommunityDefinition = [
         'com_almost': {
             'transitions': {
                 'com_accepted': _('Accept'),
-                'com_post_external_review_discussion': 'Ready For Discussion (back)',
+                'com_post_external_review_discussion': _('Ready For Discussion (revert)'),
             },
             'display': _('Accepted but additional info required'),
             'stage': RequestCom,
@@ -702,11 +702,11 @@ DoubleStageDefinition = [
         'concept_internal_review': {
             'transitions': {
                 'concept_review_discussion': _('Close Review'),
-                INITIAL_STATE: 'Need screening (back)',
+                INITIAL_STATE: _('Need screening (revert)'),
                 'invited_to_proposal': _('Invite to Proposal'),
             },
             'display': _('Internal Review'),
-            'public': f'{settings.ORG_SHORT_NAME} Review',
+            'public': _('{org_short_name} Review').format(org_short_name=settings.ORG_SHORT_NAME),
             'stage': Concept,
             'permissions': default_permissions,
         },
@@ -716,7 +716,7 @@ DoubleStageDefinition = [
             'transitions': {
                 'concept_review_more_info': _('Request More Information'),
                 'concept_determination': _('Ready For Preliminary Determination'),
-                'concept_internal_review': 'Open Review (back)',
+                'concept_internal_review': _('Open Review (revert)'),
                 'invited_to_proposal': _('Invite to Proposal'),
                 'concept_rejected': _('Dismiss'),
             },
@@ -741,7 +741,7 @@ DoubleStageDefinition = [
     {
         'concept_determination': {
             'transitions': {
-                'concept_review_discussion': 'Ready For Discussion (back)',
+                'concept_review_discussion': _('Ready For Discussion (revert)'),
                 'invited_to_proposal': _('Invite to Proposal'),
                 'concept_rejected': _('Dismiss'),
             },
@@ -817,10 +817,10 @@ DoubleStageDefinition = [
         'proposal_internal_review': {
             'transitions': {
                 'post_proposal_review_discussion': _('Close Review'),
-                'proposal_discussion': 'Proposal Received (back)',
+                'proposal_discussion': _('Proposal Received (revert)'),
             },
             'display': _('Internal Review'),
-            'public': f'{settings.ORG_SHORT_NAME} Review',
+            'public': _('{org_short_name} Review').format(org_short_name=settings.ORG_SHORT_NAME),
             'stage': Proposal,
             'permissions': default_permissions,
         },
@@ -831,7 +831,7 @@ DoubleStageDefinition = [
                 'post_proposal_review_more_info': _('Request More Information'),
                 'external_review': _('Open External Review'),
                 'proposal_determination': _('Ready For Final Determination'),
-                'proposal_internal_review': 'Open Internal Review (back)',
+                'proposal_internal_review': _('Open Internal Review (revert)'),
                 'proposal_rejected': _('Dismiss'),
             },
             'display': _('Ready For Discussion'),
@@ -856,7 +856,7 @@ DoubleStageDefinition = [
         'external_review': {
             'transitions': {
                 'post_external_review_discussion': _('Close Review'),
-                'post_proposal_review_discussion': 'Ready For Discussion (back)',
+                'post_proposal_review_discussion': _('Ready For Discussion (revert)'),
             },
             'display': _('External Review'),
             'stage': Proposal,
@@ -868,7 +868,7 @@ DoubleStageDefinition = [
             'transitions': {
                 'post_external_review_more_info': _('Request More Information'),
                 'proposal_determination': _('Ready For Final Determination'),
-                'external_review': 'Open External Review (back)',
+                'external_review': _('Open External Review (revert)'),
                 'proposal_almost': _('Accept but additional info required'),
                 'proposal_accepted': _('Accept'),
                 'proposal_rejected': _('Dismiss'),
@@ -893,7 +893,7 @@ DoubleStageDefinition = [
     {
         'proposal_determination': {
             'transitions': {
-                'post_external_review_discussion': 'Ready For Discussion (back)',
+                'post_external_review_discussion': _('Ready For Discussion (revert)'),
                 'proposal_almost': _('Accept but additional info required'),
                 'proposal_accepted': _('Accept'),
                 'proposal_rejected': _('Dismiss'),
@@ -907,7 +907,7 @@ DoubleStageDefinition = [
         'proposal_almost': {
             'transitions': {
                 'proposal_accepted': _('Accept'),
-                'post_external_review_discussion': 'Ready For Discussion (back)',
+                'post_external_review_discussion': _('Ready For Discussion (revert)'),
             },
             'display': _('Accepted but additional info required'),
             'stage': Proposal,
diff --git a/hypha/locale/en/LC_MESSAGES/django.po b/hypha/locale/en/LC_MESSAGES/django.po
index 3e03a846c..cb5894c5c 100644
--- a/hypha/locale/en/LC_MESSAGES/django.po
+++ b/hypha/locale/en/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-08-26 07:10+0000\n"
+"POT-Creation-Date: 2021-08-20 18:57+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -849,13 +849,13 @@ msgstr ""
 #: hypha/apply/determinations/forms.py:171
 #: hypha/apply/determinations/forms.py:252
 #: hypha/apply/determinations/forms.py:507
-#: hypha/apply/determinations/models.py:102
+#: hypha/apply/determinations/models.py:98
 msgid "Determination"
 msgstr ""
 
 #: hypha/apply/determinations/forms.py:177
 #: hypha/apply/determinations/forms.py:258
-#: hypha/apply/determinations/models.py:103
+#: hypha/apply/determinations/models.py:99
 msgid "Determination message"
 msgstr ""
 
@@ -940,43 +940,43 @@ msgstr ""
 msgid "Proposal Form"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:110 hypha/apply/funds/workflow.py:205
+#: hypha/apply/determinations/models.py:106 hypha/apply/funds/workflow.py:205
 #: hypha/apply/funds/workflow.py:332 hypha/apply/funds/workflow.py:487
 #: hypha/apply/funds/workflow.py:666 hypha/apply/review/models.py:162
 msgid "Draft"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:111
+#: hypha/apply/determinations/models.py:107
 #: hypha/apply/projects/models/vendor.py:49 hypha/apply/review/models.py:163
 msgid "Creation time"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:112
+#: hypha/apply/determinations/models.py:108
 #: hypha/apply/projects/models/vendor.py:50 hypha/apply/review/models.py:164
 msgid "Update time"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:113
+#: hypha/apply/determinations/models.py:109
 msgid "Send message to applicant"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:229
+#: hypha/apply/determinations/models.py:225
 msgid "Request"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:230
+#: hypha/apply/determinations/models.py:226
 msgid "Concept note"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:231
+#: hypha/apply/determinations/models.py:227
 msgid "Proposal"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:351
+#: hypha/apply/determinations/models.py:347
 msgid "Concept form"
 msgstr ""
 
-#: hypha/apply/determinations/models.py:352
+#: hypha/apply/determinations/models.py:348
 msgid "Proposal form"
 msgstr ""
 
@@ -1076,43 +1076,34 @@ msgstr ""
 msgid "Custom"
 msgstr ""
 
-#: hypha/apply/funds/forms.py:60 hypha/apply/funds/forms.py:79
+#: hypha/apply/funds/forms.py:59 hypha/apply/funds/forms.py:78
 msgid "Take action"
 msgstr ""
 
-#: hypha/apply/funds/forms.py:144 hypha/apply/projects/filters.py:28
+#: hypha/apply/funds/forms.py:143 hypha/apply/projects/filters.py:28
 #: hypha/apply/projects/filters.py:38 hypha/apply/projects/filters.py:52
 #: hypha/apply/projects/tables.py:49 hypha/apply/projects/tables.py:90
 msgid "Lead"
 msgstr ""
 
-#: hypha/apply/funds/forms.py:196 hypha/apply/funds/tables.py:259
+#: hypha/apply/funds/forms.py:195 hypha/apply/funds/tables.py:259
 #: hypha/apply/funds/tables.py:443
 msgid "Reviewers"
 msgstr ""
 
-#: hypha/apply/funds/forms.py:260 hypha/apply/funds/forms.py:331
+#: hypha/apply/funds/forms.py:259 hypha/apply/funds/forms.py:330
 msgid "Users cannot be assigned to multiple roles."
 msgstr ""
 
-#: hypha/apply/funds/forms.py:358
-msgid "Select a reviewer"
-msgstr ""
-
-#: hypha/apply/funds/forms.py:361
-#, python-brace-format
-msgid "{role_name} Reviewer"
-msgstr ""
-
-#: hypha/apply/funds/forms.py:376
+#: hypha/apply/funds/forms.py:374
 msgid "Partners"
 msgstr ""
 
-#: hypha/apply/funds/forms.py:437
+#: hypha/apply/funds/forms.py:435
 msgid "Meta terms"
 msgstr ""
 
-#: hypha/apply/funds/forms.py:440
+#: hypha/apply/funds/forms.py:438
 msgid "Meta terms are hierarchical in nature."
 msgstr ""
 
@@ -1501,12 +1492,29 @@ msgstr ""
 msgid "Close Review"
 msgstr ""
 
+#: hypha/apply/funds/workflow.py:246 hypha/apply/funds/workflow.py:367
+#: hypha/apply/funds/workflow.py:521 hypha/apply/funds/workflow.py:534
+#: hypha/apply/funds/workflow.py:705
+msgid "Need screening (revert)"
+msgstr ""
+
 #: hypha/apply/funds/workflow.py:248 hypha/apply/funds/workflow.py:369
 #: hypha/apply/funds/workflow.py:537 hypha/apply/funds/workflow.py:708
 #: hypha/apply/funds/workflow.py:822 hypha/apply/funds/workflow.py:1117
 msgid "Internal Review"
 msgstr ""
 
+#: hypha/apply/funds/workflow.py:249 hypha/apply/funds/workflow.py:370
+#: hypha/apply/funds/workflow.py:538 hypha/apply/funds/workflow.py:549
+#: hypha/apply/funds/workflow.py:709 hypha/apply/funds/workflow.py:823
+#, python-brace-format
+msgid "{org_short_name} Review"
+msgstr ""
+
+#: hypha/apply/funds/workflow.py:259 hypha/apply/funds/workflow.py:719
+msgid "Open Review (revert)"
+msgstr ""
+
 #: hypha/apply/funds/workflow.py:264 hypha/apply/funds/workflow.py:384
 #: hypha/apply/funds/workflow.py:422 hypha/apply/funds/workflow.py:563
 #: hypha/apply/funds/workflow.py:601 hypha/apply/funds/workflow.py:723
@@ -1514,6 +1522,15 @@ msgstr ""
 msgid "Ready For Discussion"
 msgstr ""
 
+#: hypha/apply/funds/workflow.py:288 hypha/apply/funds/workflow.py:302
+#: hypha/apply/funds/workflow.py:405 hypha/apply/funds/workflow.py:442
+#: hypha/apply/funds/workflow.py:456 hypha/apply/funds/workflow.py:584
+#: hypha/apply/funds/workflow.py:621 hypha/apply/funds/workflow.py:635
+#: hypha/apply/funds/workflow.py:744 hypha/apply/funds/workflow.py:859
+#: hypha/apply/funds/workflow.py:896 hypha/apply/funds/workflow.py:910
+msgid "Ready For Discussion (revert)"
+msgstr ""
+
 #: hypha/apply/funds/workflow.py:293 hypha/apply/funds/workflow.py:447
 #: hypha/apply/funds/workflow.py:626 hypha/apply/funds/workflow.py:1137
 msgid "Ready for Determination"
@@ -1542,11 +1559,21 @@ msgstr ""
 msgid "Open External Review"
 msgstr ""
 
+#: hypha/apply/funds/workflow.py:381 hypha/apply/funds/workflow.py:545
+#: hypha/apply/funds/workflow.py:560 hypha/apply/funds/workflow.py:834
+msgid "Open Internal Review (revert)"
+msgstr ""
+
 #: hypha/apply/funds/workflow.py:407 hypha/apply/funds/workflow.py:586
 #: hypha/apply/funds/workflow.py:861 hypha/apply/funds/workflow.py:1133
 msgid "External Review"
 msgstr ""
 
+#: hypha/apply/funds/workflow.py:417 hypha/apply/funds/workflow.py:596
+#: hypha/apply/funds/workflow.py:871
+msgid "Open External Review (revert)"
+msgstr ""
+
 #: hypha/apply/funds/workflow.py:498 hypha/apply/funds/workflow.py:532
 msgid "Open Community Review"
 msgstr ""
@@ -1600,6 +1627,10 @@ msgstr ""
 msgid "Proposal Received"
 msgstr ""
 
+#: hypha/apply/funds/workflow.py:820
+msgid "Proposal Received (revert)"
+msgstr ""
+
 #: hypha/apply/funds/workflow.py:901
 msgid "Ready for Final Determination"
 msgstr ""
-- 
GitLab