-
Notifications
You must be signed in to change notification settings - Fork 927
Minor clean up for the Account Security Screen #6076
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
Conversation
| SessionTimeoutActionRow( | ||
| isEnabled = state.hasUnlockMechanism, | ||
| vaultTimeoutPolicyAction = state.vaultTimeoutPolicyAction, | ||
| isEnabled = state.isSessionTimeoutActionEnabled, |
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 is a functional change. We now disable the action row when there is an action set by the admin that cannot be overridden by the user.
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6076 +/- ##
==========================================
- Coverage 84.79% 84.77% -0.03%
==========================================
Files 721 721
Lines 52800 52820 +20
Branches 7660 7668 +8
==========================================
+ Hits 44773 44779 +6
- Misses 5342 5355 +13
- Partials 2685 2686 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e98a53c to
b0abea4
Compare
b0abea4 to
84082b6
Compare
| } | ||
|
|
||
| @Composable | ||
| private fun rememberSessionTimeoutOptions( |
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 @SaintPatrck |
| <string name="vault_timeout_policy_in_effect_both_plural">Your organization has set the maximum session timeout to %1$d hours and %2$d minutes.</string> | ||
| <string name="vault_timeout_policy_in_effect_hours_plural">Your organization has set the maximum session timeout to %1$d hours and %2$d minute.</string> | ||
| <string name="vault_timeout_policy_in_effect_minutes_plural">Your organization has set the maximum session timeout to %1$d hour and %2$d minutes.</string> |
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.
🚨 @david-livefront @SaintPatrck Why you don't use plural function here? This is incorrect for my langauages.
Many languages have more than 1 version of plural
Example in Polish 2 hours, 5 hours is 2 godziny, 5 godzin
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.
You cannot have multiple plurals in a singular plural string... Using a plural here would mean that both minutes and hours would need to be plural together or not plural together.
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.
I understand it, but our requirements should be more important. Can we prepare something like
<string comment="Your organization has set the maximum session timeout to X hours and Y minutes." name="vault_timeout_policy_in_effect_both_plural">Your organization has set the maximum session timeout to %1$d and %2$d.</string>
and 2 plural strings
<plurals comment="Your organization has set the maximum session timeout to X hours and Y minutes." name="vault_timeout_hours_plural">
<item quantity="one">%d hour</item>
<item quantity="other">%d hours</item>
</plurals>
<plurals comment="Your organization has set the maximum session timeout to X hours and Y minutes." name="vault_timeout_minutes_plural">
<item quantity="one">%d minute</item>
<item quantity="other">%d minutes</item>
</plurals>
and required changes in Kotlin?
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.
We did consider that approach as well but injecting translated plural strings into other translated strings will also cause incorrect translations in since the rest of the string will be unaware of context.
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.
I also think about it. That's why I insert comment inside string and plural tag.
This comment will be visible for translators in Crowdin to these strings! :)
See also comment info https://store.crowdin.com/android-xml

🎟️ Tracking
N/A
📔 Objective
This PR updates the
AccountSecurityScreenin anticipation of more changes for the updates Vault Timeout Policy.All of these changes are non-function but there are some visual UI changes:
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes