Skip to content

Slowly prepare for french translations. #6

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

Merged
merged 1 commit into from
Oct 27, 2016

Conversation

JulienPalard
Copy link
Member

This patch will help me provide a cleaner patch to build french (and other translations) documentation. It's also a lot easier for me to test it now that I can change the used paths.

build_one was taking paths of checkout and destination and was
compiling them without knowing which version it was. As I'd like in a
near future also build translated documentations, I'd need to know
which version is being compiled. As it's possible, from the version
number to build the paths that was given, I think it's a good idea to
pass the version number instead of the various paths.

As I needed to allow the version to be given, and as I wanted to test
it in my home directory, I used argparse to hold the default values
for the various paths still allowing me to give paths to /tmp/ or my
home directory.

With no argument, or with only -q, the behavior is the same as
before, so salt scripts and crontabs need to be modified.

I "dropped" the highly-probably unused possibility to build the doc
given two paths, it was probably usefull to test the script, but as
the script also has a lot of hardcoded values, it was very hard to
test. It's now simplier to test, but I still have to add parameters to
skip purging fastly, chowning to another group than docs (that may not
exist while testing) or a flag to switch between git and
mercurial. But to keep the patch "simple" I still not implemented
them.

…t_path`.

`build_one` was taking paths of checkout and destination and was
compiling them without knowing which version it was. As I'd like in a
near future also build translated documentations, I'd need to know
which version is being compiled. As it's possible, from the version
number to build the paths that was given, I think it's a good idea to
pass the version number instead of the various paths.

As I needed to allow the version to be given, and as I wanted to test
it in my home directory, I used argparse to hold the default values
for the various paths still allowing me to give paths to /tmp/ or my
home directory.

With no argument, or with only `-q`, the behavior is the same as
before, so salt scripts and crontabs need to be modified.

I "dropped" the highly-probably unused possibility to build the doc
given two paths, it was probably usefull to test the script, but as
the script also has a lot of hardcoded values, it was very hard to
test. It's now simplier to test, but I still have to add parameters to
skip purging fastly, chowning to another group than docs (that may not
exist while testing) or a flag to switch between git and
mercurial. But to keep the patch "simple" I still not implemented
them.
Copy link
Member

@ewdurbin ewdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor, appreciate the update to argparse as well.

Thanks @JulienPalard

@ewdurbin ewdurbin merged commit cc85b06 into python:master Oct 27, 2016
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

Successfully merging this pull request may close these issues.

2 participants