Skip to content
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

Enhance the Two-Factor Authentication settings #16707

Merged
merged 6 commits into from
Sep 11, 2024
Merged

Conversation

MikeAlhayek
Copy link
Member

Here I also added a new shape called Duration shape that would convert TimeSpan to human readable string

@MikeAlhayek MikeAlhayek merged commit 76e1817 into main Sep 11, 2024
6 checks passed
@MikeAlhayek MikeAlhayek deleted the ma/2fa-settings branch September 11, 2024 22:58
{
builder.AppendWhitespace();
}
builder.AppendHtml(H.Plural(hours, "{1} hour", "{1} hours", hours));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't concatenate translated strings. It has to be a single one, which is this case doesn't seem possible because of pluralization (days could be one and hours multiple).

The only solution I could think of is to only keep the big part like "{0} days", or "{o} hours" and not concatenate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wouldn't this work? each phrase can be translated separately and then build into html content.

Here is an example

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wouldn't this work

For one some people write from right to left ;) And pretty sure we can find languages where durations don't work this way too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants