-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
jzbahrai
commented
Sep 22, 2023
- 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
7e201e4
to
8d62ea9
Compare
There was a problem hiding this 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( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"
There was a problem hiding this 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 ✅