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

Fix make_locale to be more pythonic #1972

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

agilewalker
Copy link

I'm trying to build android app on Windows , but errors with make_locale becomes a show stopper.
Between line 24 and line 31 make_locale create a shell to execute a 'find' command to search all the files that needs to be translated. Although there is indeed a 'find' command on Windows, but it's totally different from the unix-like one.
This PR fix the problem by rewriting the relevant parts with pure os-agnostic python code.

@agilewalker
Copy link
Author

agilewalker commented Aug 23, 2020

Note to Android developer building on Windows: make_locale requires xgettext for windows to build.

@agilewalker agilewalker changed the title Fix make_locale to be more pythonic (and also able to execute on Windows) Fix make_locale to be more pythonic Aug 23, 2020
@cculianu
Copy link
Collaborator

Oh wow this is really cool. Thanks for this fix. Let me test it now and merge if I see no issues.

@cculianu cculianu added packaging Issues related to building/packaging and not the app itself. i18n & Translation Related to translation, locales, etc labels Aug 24, 2020
@cculianu
Copy link
Collaborator

This is great. I just tested it. It seems the translations end up in a different order in the comments only (which is not surprising) than with the stupid find method.. but that's ok. It finds everything, which is what we care about. Thanks for this! Merging.

@cculianu cculianu merged commit 6407ccf into Electron-Cash:master Aug 24, 2020
@EchterAgo
Copy link

This is great. I just tested it. It seems the translations end up in a different order in the comments only (which is not surprising) than with the stupid find method.. but that's ok. It finds everything, which is what we care about. Thanks for this! Merging.

There is one other change in behaviour, find does not follow symlinks, this does. Should not be a problem for most people, but I'll have to be a bit more careful with my setup.

@cculianu
Copy link
Collaborator

Oh that's good to know! Thanks for pointing that out @EchterAgo 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n & Translation Related to translation, locales, etc packaging Issues related to building/packaging and not the app itself.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants