Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slugs are backslashes on Windows instead of underscore #291

Open
Daltz333 opened this issue Apr 25, 2020 · 9 comments
Open

Slugs are backslashes on Windows instead of underscore #291

Daltz333 opened this issue Apr 25, 2020 · 9 comments

Comments

@Daltz333
Copy link

This breaks compatibility with UNIX/Linux machines when working on a cross-platform project.

@Daltz333
Copy link
Author

Example Transifex Client config on MacOS

[main]
host = https://www.transifex.com
lang_map = es_MX: es, fr_CA: fr, he_IL: he, tr_TR: tr

[frc-docs.build_gettext_404]
file_filter = source/locale/<lang>/LC_MESSAGES/404.po
source_file = build/gettext/404.pot
source_lang = en
type = PO

Example when running tx config on Windows

[frc-docs.build_gettext\docs\software\wpilib-tools\smartdashboard\test-mode-and-live-window\pid-tuning-with-smartdashboard]
file_filter = source/locale/<lang>/LC_MESSAGES/docs/software/wpilib-tools/smartdashboard/test-mode-and-live-window/pid-tuning-with-smartdashboard.po
source_file = build/gettext/docs/software/wpilib-tools/smartdashboard/test-mode-and-live-window/pid-tuning-with-smartdashboard.pot
source_lang = en
type = PO

@Daltz333
Copy link
Author

This may be a bug in the underlying python-slugify project? Either way it's quite problematic.

@pankav
Copy link

pankav commented Apr 29, 2020

Hello @Daltz333 ,

Thank you for your reply.
Could you please describe how did you achieve to create the following tx config file in windows?

[frc-docs.build_gettext\docs\software\wpilib-tools\smartdashboard\test-mode-and-live-window\pid-tuning-with-smartdashboard] file_filter = source/locale/<lang>/LC_MESSAGES/docs/software/wpilib-tools/smartdashboard/test-mode-and-live-window/pid-tuning-with-smartdashboard.po source_file = build/gettext/docs/software/wpilib-tools/smartdashboard/test-mode-and-live-window/pid-tuning-with-smartdashboard.pot source_lang = en type = PO

Also, could you please explain why it is necessary to include the backslash character \ in the resource name?

Thank you in advance,
Panagiotis

@Daltz333
Copy link
Author

Daltz333 commented Apr 29, 2020

I ran the following command on my windows machine
tx config mapping-bulk --project frc-docs --file-extension '.pot' --source-file-dir build/gettext --source-lang en --type PO --expression 'source/locale/<lang>/LC_MESSAGES/{filepath}/{filename}.po' --execute

@Daltz333
Copy link
Author

Daltz333 commented Apr 29, 2020

It shouldn't be necessary, we don't want backslashes at all. This was auto-generated, and when running the command on UNIX vs Windows, we get two duplicate resources because of this.

@pankav
Copy link

pankav commented May 4, 2020

Hi @Daltz333 ,
Thank you for your feedback. I would like to inform you that for the time being what you are looking for is not supported. However, I will forward your request to our engineers to see how this can be addressed on our end. Once I have an update on this I will let you know.

Kind regards,
Panagiotis

@pankav pankav closed this as completed May 4, 2020
@nelefth nelefth reopened this May 7, 2020
@diegobz
Copy link
Contributor

diegobz commented Jun 8, 2020

@Daltz333 Could you try forcing an upgrade of python-slugify to its latest 4.x version and tell us if the issue persists, please?

@Daltz333
Copy link
Author

Daltz333 commented Jun 9, 2020

My machine is currently being upgraded and new parts come Thursday so I can hopefully check then

@diegobz
Copy link
Contributor

diegobz commented Jun 16, 2020

@Daltz333 0.13.10 just got released which bumps the version of python-slugify. Let us know if the problem is still happening on Windows for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants