Making WordPress.org

Opened 9 months ago

Closed 9 months ago

#8161 closed defect (bug) (fixed)

Wrong path used when determining project translation status.

Reported by: sdnunca Owned by:
Priority: normal Milestone:
Component: Translate Site & Plugins Keywords: has-patch
Cc:

Description

https://translate.wordpress.org/projects/wp-plugins/<plugin> accepts case insensitive slugs, e.g.
both ​https://translate.wordpress.org/projects/wp-plugins/akismet/ and ​https://translate.wordpress.org/projects/wp-plugins/AkisMet/ return 200.

However, ​https://translate.wordpress.org/projects/wp-plugins/AkisMet/ reports:
`
This plugin is not properly prepared for localization.
`
and returns no translation status data.

When determining if a project exists, we use $project_path e.g. wp-plugins/AkisMet. Because of the case insensitive collation, this matches the project with the actual path of wp-plugins/akismet.

To determine if a plugin is prepared for localization, we look at its subprojects and detemine if it has either a dev or a stable subproject.

To determine the subproject names we use:
`
$sub_project = str_replace( "$project_path/", , $set->path );
`

This patch updates the replace logic to use $project->path instead of the case insensitive $project_path, making sure the subproject name is determined correctly.

Attachments (1)

patch.diff​ (788 bytes ) - added by sdnunca 9 months ago.

Download all attachments as: .zip

Change History (2)

@sdnunca
9 months ago

#1 @Amieiro
9 months ago

  • Resolution → fixed
  • Status new → closed

Commited here. Thank you for the bugfix.

Note: See TracTickets for help on using tickets.