WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 20 months ago

#20881 closed defect (bug) (reported-upstream)

Show code references in inherited localization files

Reported by: pavelevap Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords:
Focuses: Cc:

Description

For example string "Invalid post type" is used several times - on frontend and also in admin. But this string is only in frontend localization file, because this file is also loaded on admin side. That is correct, no need to duplicate strings in different files. But translators do not see code references related to admin file and it can leads to context problems during translation.

It could be very helpfull to modify makepot.php to add related code references to generated .pot files.

Related example: #20809

Change History (5)

#1 @nacin
8 years ago

I am not sure exactly how we'd do this, but I imagine it is possible in some way.

For those interested, makepot's code is here: http://i18n.svn.wordpress.org/tools/trunk/

#2 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to WordPress.org

#3 @chriscct7
5 years ago

  • Keywords needs-patch added

#4 @ocean90
4 years ago

The script uses msguniq and msgcat , see trunk/tools/i18n/makepot.php@36752, and it seems like neither supports something to merge the locations.

#5 @ocean90
20 months ago

  • Keywords needs-patch removed
  • Milestone WordPress.org deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Reported upstream to WP-CLI in https://github.com/wp-cli/i18n-command/issues/105.

Related: #45287

Note: See TracTickets for help on using tickets.