-
Notifications
You must be signed in to change notification settings - Fork 973
Issue #9053: Making country field in autofill a dropdown list instead of text input box. #10300
Conversation
@darkdh @bsclifton Created the PR... Not sure how to add you guys as reviewers :( Sorry for being a noob! |
Is this l10n ready? |
@luixxiul Sorry to be a noob - l10n ready - whats that mean? Sorry - still have vacation brain! @bsclifton Woohoo! let me know what else I need to do! |
@dfperry5 The countries you listed are in The translations themselves are handled through a 3rd party service (as described in the document). The part you'll want to read and reference is under "Making sure our code has all strings localized" @luixxiul how would you suggest tackling this? Maybe we could make a separate |
Yes, I think that would be the best way. |
@luixxiul oh gotcha. Makes perfect sense. I'll take a look at it and give it a shot. I'll prolly have a few other questions. Thanks guys! |
I attempted to fix the l1on stuff. But I can't seem to see it working on my local. Do you guys mind taking a loot at the above commit -> 0f93cc4 and letting me know what you think I am missing? I even tried to add it in here: https://github.com/brave/browser-laptop/blob/master/app/locale.js, but I didn't think it really belonged because i wasnt sure if the autofill modal was considered a context menu or not. Any feedback/help is appreciated! Thanks! |
Any help guys? :) I'm sure yall are busy! Just a reminder :D |
Sorry, I don't know how to :-( |
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.
@dfperry5 ,
you have to move <link rel="localization" href="locales/{locale}/countries.properties">
to
both app/extensions/brave/index.html
and app/extensions/brave/index-dev.html
Also, the locale translation is case sensitive so you have to change you two country code in app/extensions/brave/locales/en-US/countries.properties
to be upper case
@darkdh Do you mind taking a look at my latest commit / pulling it down and trying for yourself. Sorry I'm struggling with this, haha. But it still doesn't seem like its working on my local. Thanks! |
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.
sorry, forgot to mention that you will also have to modify
app/locale.js
- Add those country code to
rendererIdentifiers
- Add
countries.properties
toappendLangProperties
@darkdh Updated it and it's working on my local now! thanks a ton! |
Codecov Report
@@ Coverage Diff @@
## master #10300 +/- ##
==========================================
- Coverage 54.19% 54.12% -0.07%
==========================================
Files 244 247 +3
Lines 21109 21550 +441
Branches 3258 3336 +78
==========================================
+ Hits 11440 11665 +225
- Misses 9669 9885 +216
|
@darkdh done -- i think :) |
@darkdh Alrighty - look at that last commit and see if it looks OK :) Thanks for all the help/patience! |
if you test locally, you will find out it didn't work because you have to add |
ok. my bad. I didn't see that. you are doing fine. |
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.
OK @dfperry5 - I found and fixed the issues I saw (they're not related to your changes). We have an active tab bug (which @bbondy is fixing) which triggered the error I saw
I tried the PR and only noticed one thing 😄
If you go to add an address, and just type in your name and pick "Save", country is not saved (even though it shows Afghanistan as the selected value). Can the dropdown also have an empty value which it defaults to? This way, the user has to pick the country. This is useful also if the user wants to clear the country that was entered
@bsclifton I'll take a look! Appreciate all the help! |
@dfperry5 hey- I just wanted to check back on this. Did you have a chance to check it out? Let us know if you need a hand 😄 |
@bsclifton Sorry! Time got away from me :) Started up grad school + work - looking at it right now. |
@bsclifton Pushed my changes :) Let me know what you think! |
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.
Looks (and works) great! 😄 👍
@darkdh maybe you can give this a shot again and if you approve, we'll be ready to merge 😄
@bsclifton woohoo! :) Let me know what the next steps are to get this merged in! |
changing this back to 0.22.x, because issue is set to 0.22.x as well. @bsclifton if you want to land this in 0.21.x please change milestone back |
after merged the milestone will be reset to 0.21.x anyway. |
width: '100%' | ||
}, | ||
|
||
sectionWrapper__expirationDate: { |
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.
Is this necessary?
expirationDate__dropdowns: { | ||
display: 'flex' | ||
}, | ||
dropdown__right: { |
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.
ditto.
|
||
const styles = StyleSheet.create({ | ||
// Copied from textbox.js | ||
input: { |
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.
ditto.
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.
See my comment above.
@luixxiul not necessary, because if PR is approved and we set milestone to 0.22.x, we will wait with merge until master is set to 0.22.x |
confused- I added this PR to 0.22.x before @bsclifton set the same milestone to the issue. |
oops...sorry I mistakenly closed this PR! sorry! |
I'm going to cherry-pick the commits and create a new PR. Apologies to @dfperry5 :-( |
@luixxiul all good :) I'll look at those changes you requested this afternoon! |
Fixes #9053
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests