Opened 2 months ago
Closed 2 months ago
#8161 closed defect (bug) (fixed)
Wrong path used when determining project translation status.
| Reported by: |
|
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.
Commited here. Thank you for the bugfix.