toolstack / gp-auto-extract

A plugin for GlotPress that automatically extracts strings from remote source repo.
http://glot-o-matic.com/gp-auto-extract
6 stars 5 forks source link

Bad source file reference path when extracting from GitHub #1

Closed brazabr closed 7 years ago

brazabr commented 7 years ago

I installed this plugin and setup it to extract the source files from GitHub repositories.

When the originals are extracted, every reference to the source file has a prefix with the repository name + tag/branch.

For example: If I type something like this: https://github.com/user/repo/archive/0.3.0.zip Every source file reference includes a repo-0.3.0/ prefix to the %file% template tag when building the link to the source file which makes an invalid link (404 on GitHub).

The system works fine if I import the originals from the POT file.

According to our discussion on Slack, the problem is related to the starting folder to extract translations after downloading the archive: https://github.com/toolstack/gp-auto-extract/blob/master/gp-auto-extract.php#L130-L151

toolstack commented 7 years ago

@brazabr I've committed a fix to the master branch, give it a try and let me know if it resolves the problem for you.

brazabr commented 7 years ago

@toolstack Yes, I tested now and it is working. It worked both on new project as well as updating the existing one.

toolstack commented 7 years ago

Ok, I'll do a release later today on it.

toolstack commented 7 years ago

Resolved with version 0.7 release.