Call-for-Code-for-Racial-Justice / Five-Fifths-Voter

Five Fifths Voter is a web application tool designed to enable and empower Black people and others to exercise their right to vote by ensuring their voice is heard
Apache License 2.0
67 stars 38 forks source link

addressLabel in data vs UI string #194

Closed upkarlidder closed 3 years ago

upkarlidder commented 3 years ago

Looking at the code in ui/src/components/BallotReturn/BallotReturn.vue and ui/src/components/EarlyVoting/EarlyVoting.vue, I noticed that addressLabel is stored in the component data. I am wondering if this is best practice or should the label be stored in the UI itself? What is the advantage of storing it in the data model?

https://github.com/Call-for-Code-for-Racial-Justice/Five-Fifths-Voter/blob/e196f0c4fee5c50ef55f358330c777106ab2c675/ui/src/components/BallotReturn/BallotReturn.vue#L80

I came across this while extracting strings for translation. This string appears in the UI.

@GeraldMit @davidnixon If okay to move it out of data, I can do it as part of the translation task.

image

davidnixon commented 3 years ago

@upkarlidder Yes, it should be part of translation. I probably did that a long while ago thinking it might help with translation. Same error is in src/components/EarlyVoting/EarlyVoting.vue

upkarlidder commented 3 years ago

Thank you. I will extract it out.