Make WordPress Core

Opened 7 weeks ago

Last modified 5 weeks ago

#65004 reopened defect (bug)

Prev/Next for posts needs context in block library

Reported by: timse201's profile timse201 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

Many locales can't use one word for different contexts. E.g. we Germans like to see "Nächster"/"Vorheriger" instead of "Weiter" which means more or less move forward or continue and is only used when it must be.

Currently it only has a comment.

wp-includes/js/dist/block-library.js:51599

https://translate.wordpress.org/projects/wp/dev/de/formal/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=3378&filters%5Btranslation_id%5D=44649272

Change History (8)

#1 @anupkankale
7 weeks ago

I'm working on a patch for this. Will submit a PR shortly.

This ticket was mentioned in PR #11413 on WordPress/wordpress-develop by @anupkankale.


7 weeks ago
#2

  • Keywords has-patch added

Adds context for translators to disambiguate 'Previous' and 'Next' in the image lightbox navigation.

Fixes #65004

Trac ticket:

## Use of AI Tools

#3 @poena
5 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Hi
Thank you for the suggestion and the PR.

This is already solved in Gutenberg, and no change is needed here.
https://github.com/WordPress/gutenberg/pull/76967

This is because the change from Gutenberg will be merged in to WordPress in the next available release.
So the changes in the PR linked to this ticket would be overwritten.

#4 follow-up: @poena
5 weeks ago

Please correct me if this was not related to the lightbox, the ticket can always be reopened.
The next and previous post links already has translators context since 5 years.

#5 in reply to: ↑ 4 @timse201
5 weeks ago

Replying to poena:

Please correct me if this was not related to the lightbox, the ticket can always be reopened.
The next and previous post links already has translators context since 5 years.

Not for next/previous. And the second ones are with comments.

#6 @timse201
5 weeks ago

  • Resolution reported-upstream deleted
  • Status changed from closed to reopened

#7 @poena
5 weeks ago

Are you able to provide more information?
And it still needs to be reported in the Gutenberg GitHub repository, not via Trac.

Here is where I am seeing the translators context for the next and previous post:

https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/blocks/post-navigation-link.php#L40

And it comes from the block here:
https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/post-navigation-link/index.php#L40

---

The comment pagination does not use the ambiguous next/previous texts, they use:

$default_label    = __( 'Newer Comments' );

https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/comments-pagination-next/index.php#L27
and

$default_label    = __( 'Older Comments' );

https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/comments-pagination-previous/index.php#L20

#8 @timse201
5 weeks ago

Ah my fault. The first one is the array and the second and third Strings are now fixed :)

Last edited 5 weeks ago by timse201 (previous) (diff)
Note: See TracTickets for help on using tickets.