Slowly prepare for french translations. #6
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 wascompiling 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 asbefore, 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.