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

I18n: Change time difference string. #17535

Merged
merged 1 commit into from
Oct 10, 2019
Merged

Conversation

Soean
Copy link
Member

@Soean Soean commented Sep 23, 2019

Description

To improve the internationalization, the time difference xxx ago should be translatable as one string.

For german, we need to change the sequence and translate the string %s ago into vor %s.

@Soean Soean added the Internationalization (i18n) Issues or PRs related to internationalization efforts label Sep 23, 2019
@Soean Soean self-assigned this Sep 25, 2019
@Soean Soean mentioned this pull request Oct 1, 2019
5 tasks
@gziolo gziolo requested review from ocean90, swissspidy and dd32 October 10, 2019 11:05
@gziolo gziolo added the [Feature] Block Directory Related to the Block Directory, a repository of block plugins label Oct 10, 2019
$block->humanized_updated = sprintf(
/* translators: %s: Human-readable time difference. */
__( '%s ago', 'gutenberg' ),
human_time_diff( strtotime( $plugin['last_updated'] ), current_time( 'timestamp' ) )
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
human_time_diff( strtotime( $plugin['last_updated'] ), current_time( 'timestamp' ) )
human_time_diff( strtotime( $plugin['last_updated'] ) )

No need to provide the second argument since it's the default value. Feel free to ignore since slightly out of scope.

@Soean Soean merged commit 99ffdc1 into master Oct 10, 2019
@Soean Soean deleted the update/block-api-ago-string branch October 10, 2019 16:47
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Directory Related to the Block Directory, a repository of block plugins Internationalization (i18n) Issues or PRs related to internationalization efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants