transifex/transifex-client — pull request #17 by cboos (2012-10-28 18:09:32+00:00)
Title: Add support for slashes in file_filter even on Windows.

Hello Transifex developers,

In our project, we added the `.tx/config` file to the repository.

The file looks like this:
```
[main]
host = https://www.transifex.com

...
[trac.trunk-messages-pot]
file_filter = trac/locale//LC_MESSAGES/messages.po
source_file = trac/locale/messages.pot
source_lang = en
...
```
However the `file_filter` is not effective on Windows, where `tx` expects `\`. Not surprisingly, if we would change that to `\`, the `tx` clients on Linux would fail...

IMO, best thing would be to also support `/` as a path separator on Windows, which is common practice anyway.

All test cases still pass (on the 0.8 variant of the patch, as the tests couldn't be run on the 0.7.x branch for some reason), and I verified that a `.tx/config` file containing `\` still works on Windows, so the proposed change is backward compatible for Windows-only people.

The only possible downside of the patch is that a `\` in the `file_filter` will also be replaced by a `/` on Linux. I don't think this can be a problem in practice, but if this is really an issue, then maybe we can do the `\` -> `/` replacement on Windows only.