Open ocean90 opened 5 years ago
Should we try to expose all possible versions via the API?
Good point. Only the latest version which match the requested version actually. Examples:
https://api.wordpress.org/translations/themes/1.0/?slug=twentyseventeen&version=1.0 (only 1.0) https://api.wordpress.org/translations/themes/1.0/?slug=twentyseventeen&version=1.8 (1.0-1.8, depending on availability)
That means we should make the version number a part of the file name or put them into folders like on WordPress.org. The latter is probably easier
Either way, I think we should add a CLI command to remove old files that can be run when upgrading. It would basically do half of what uninstall.php
does.
Either way, I think we should add a CLI command to remove old files that can be run when upgrading
We could extend wp traduttore cache clear
for that.
For running the complete uninstall routine there is wp plugin uninstall
.
Only the latest version which match the requested version actually. Examples:
Hmm, sounds like we need to store a list of language packs per project in gp_meta or something. Otherwise we have no idea what kind of files there are on the server.
Issue Overview Since #133 the version of the theme/plugin is used for the version field in the API. But the actual download URL is still the same for all versions.
Expected behavior The path to the language pack includes the version of the language pack.
Additional context WP.org API: https://api.wordpress.org/translations/themes/1.0/?slug=twentynineteen