Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated recipients.csv to accept both lang #245

Merged
merged 7 commits into from
Oct 3, 2023
Merged

Conversation

jzbahrai
Copy link
Collaborator

  • EN FR headings are now allowed for sms and email
  • Your error message will be in the language of your choice
  • Updated tests.

- EN FR headings are now allowed for sms and email
- Your error message will be in the language of your choice
Copy link
Member

@andrewleith andrewleith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing looks wrong per se I just find it hard to understand what a few of the lines are doing where many methods are being chained together. It might be helpful to comment a bit for these.

I am going to move on to admin and try testing the functionality to get a better understanding of how it works.

@@ -290,13 +345,12 @@ def is_optional_address_column(self, key):

@property
def has_recipient_columns(self):
return (
return set([list(self.column_headers_as_column_keys)[0]]).issubset(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do? Should we have a comment here maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

for key in self.placeholders:
# If the key has a different heading due to language, then we need to check that the column_headers
# in the file have either the same or other language. This is only for email address / phone number
if key in self.recipient_column_headers_lang_check: # type: ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do we allow FR column headers when the request is in EN and vice versa? What exactly is the intersection method doing here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we allow FR heading and EN request and vice versa.

The intersection says - if the headings that english/french are not in column headers of the file:
Add that header to the result - we know that it is "missing"

Copy link
Member

@andrewleith andrewleith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - everything is working as expected ✅

@jzbahrai jzbahrai merged commit cfb132e into main Oct 3, 2023
4 checks passed
@jzbahrai jzbahrai deleted the task/fix-upload branch October 3, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants