Making WordPress.org

Opened 2 months ago

Closed 2 months ago

#8161 closed defect (bug) (fixed)

Wrong path used when determining project translation status.

Reported by: sdnunca's profile sdnunca Owned by:
Milestone: Priority: normal
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 2 months ago.

Download all attachments as: .zip

Change History (2)

@sdnunca
2 months ago

#1 @Amieiro
2 months ago

  • Resolution set to fixed
  • Status changed from new to closed

Commited here. Thank you for the bugfix.

Note: See TracTickets for help on using tickets.