-
Notifications
You must be signed in to change notification settings - Fork 249
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
Language switcher for the Data Capture Gallery #558
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
Thanks @ndegwamartin :) This is really cool 😎 A note on UI: I'm not sure @fredhersch has any comment - but I would love to keep things simple to begin with. Do we have to have a navigation drawer on the left? Can we simply make this an action item on the top bar: number 4 in https://material.io/components/app-bars-top#anatomy? |
Thanks @jingtang10 I had requested the drawer. I think it's the most logical way to show this for implementers and will be useful for other features (like syncing). If you have concerns about maintainability of the demo app using this approach let's revisit. Otherwise, I'd propose we go ahead with this. Looks great @ndegwamartin |
646c736
to
4ad55ec
Compare
spoke with @fredhersch and we think the drawer layout is probably more useful for the reference app rather than the sdc gallery app here. if it's possible to refactor please do so - thanks @ndegwamartin! |
4ad55ec
to
101075d
Compare
@fredhersch @jingtang10 might be worth having the first page localised in Vietnamese so that it is apparent every time one switches the language, even before getting to the questionnaires |
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.
Thanks @ndegwamartin!
...ery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LanguageSwitcherUtils.kt
Outdated
Show resolved
Hide resolved
...ery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LanguageSwitcherUtils.kt
Outdated
Show resolved
Hide resolved
...ery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LanguageSwitcherUtils.kt
Outdated
Show resolved
Hide resolved
datacapturegallery/src/main/java/com/google/android/fhir/datacapture/gallery/MainActivity.kt
Outdated
Show resolved
Hide resolved
language: LanguageSwitcherUtils.Language, | ||
context: Activity | ||
) { | ||
|
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.
remove new line
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.
this isn't done
...ery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LanguageSwitcherUtils.kt
Outdated
Show resolved
Hide resolved
...ery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LanguageSwitcherUtils.kt
Outdated
Show resolved
Hide resolved
...ery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LanguageSwitcherUtils.kt
Outdated
Show resolved
Hide resolved
datacapturegallery/src/main/java/com/google/android/fhir/datacapture/gallery/MainActivity.kt
Outdated
Show resolved
Hide resolved
...ery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LanguageSwitcherUtils.kt
Outdated
Show resolved
Hide resolved
9a97cba
to
d9751d7
Compare
Hi @ndegwamartin , is there an ETA you can provide for completing the changes as per the review comments in order to close this PR? |
@Tarun-Bhardwaj all changes requested are complete |
...apturegallery/src/main/java/com/google/android/fhir/datacapture/gallery/utils/LocaleUtils.kt
Show resolved
Hide resolved
@deepankarb please check out the updates |
3452b6d
to
ca6a6a4
Compare
@deepankarb , it seems Martin has completed all changes as per review comments. Could you please re-review the same? |
ca6a6a4
to
7dd842a
Compare
Codecov Report
@@ Coverage Diff @@
## master #558 +/- ##
============================================
+ Coverage 88.78% 88.79% +0.01%
Complexity 464 464
============================================
Files 106 106
Lines 9089 9089
Branches 579 579
============================================
+ Hits 8070 8071 +1
+ Misses 714 713 -1
Partials 305 305
Continue to review full report at Codecov.
|
d8c113d
to
248b340
Compare
- Add language switcher to demo internationalization in the sdc lib - Vietnamese localization
- Remove Navigation Drawer - Add language selection as an Action item
248b340
to
809b722
Compare
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = ActivityMainBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
|
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.
remove new line
|
||
override fun onCreateOptionsMenu(menu: Menu): Boolean { | ||
menuInflater.inflate(R.menu.top_bar_menu, menu) | ||
|
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.
remove new line
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = ActivityMainBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
|
||
languageList = LocaleUtils.getLanguageList(this) |
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.
can this line be on line 31?
Following our discussion yesterday @ndegwamartin I closed this issue #503 (comment). Will you please close this PR if this sounds good to you? Thanks for the good work and I hope the learnings here have been useful in fhir core! |
Yeah I've learnt a alot. Closing this now |
Fixes #503
Description
Updated to the latest translated questionnaire Questionnaire-case-reporting-questionnaire-vn.zipType
Feature
Screenshots
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project./gradlew check
and./gradlew connectedCheck
to test my changes locally