The default behaviour is now not to localize the output, only the help
text and error messages (all the user interaction).
The way localized messages are fetched in the modules has been modified
as well; to allow for the ability to enable and disable the localization.
Just like in many GNU tools, it is now possible to pass an optional
boolean to some of the flags of gitinspector in the form;
--flag[=BOOL]
This gives us the ability to override options set via git-config.
For example; say we did the following:
git-config --global inspector.timeline true
We could then override this setting when running gitinspector by supplying:
./gitinspector.py --timeline=false
Implementing this was not a trivial task, as no command-line parser in
Python supports this by default (getopt, optparse, argparse). In order to
properly handle optional boolean arguments; some clever patching had to
be done to the command-line in combination with a callback function that
can handle boolean strings. To maintain compatibility with Python 2.6,
this was implemented using optparse (instead of argparse).
This function moves most of the logic of handling comments into the
comment module itself, thus avoiding duplicated code and allowing for
a cleaner solution.
In contrast to the -x/--exclude option that can be given on the command
line, --exclude can not be set multiple times when used with git-config.
Luckily, the same behavior can be attained by using the pipe ("|")
character. Ie, specifying the following on the command line:
-x "hello.txt" -x "goodbye.txt"
is the same thing as:
-x "hello.txt|goodbye.txt"
when sent to git-config or the command line.
All long options that can be set in gitinspector (with the exception of
--version and --help) can be configured using git-config. This is only the
first step towards the support of git-config. The reading of the command
line also needs to be changed to support overriding settings from
git-config before this is fully usable. Also; support for --exclude is
not yet included.
If we wanted to enable the timeline across all repositories when running
gitinspector we could do;
git-config --global inspector.timeline true
For local settings (per repository); the --local option can of course be
used when calling git-config.
The currency sorter of the plugin supports €, $ and £. Unfortunately,
the "€" (euro) sign can cause problems with certain character maps,
something which means we might as well remove support for it as
gitinspector is not using any currency sorting anyway.
Even though it is supported, LaTex is not part of the default file
extensions used during analysis. To include LaTex files in the statistical
analysis, the extension (.tex) needs to be supplied to gitinspector using
the -f flag.
This format behaves the same as the old "html" output. Consequently, the
ordinary "html" output now hot-links the JQuery script to
ajax.googleapis.com. This results in a generated file with roughly half
the stitching code compared to previously.
The gettext.install() functions supplies a way to force it to return
unicode which helps with compatibility between Python 2 & 3. To make it
work properly when merging those returned string with strings in the
different modules of gitinspector we also had to do some changes to make
sure all string literals are in unicode.
The name of the author is now highlighted in the table whenever a pie
piece in the pie chart is hovered over. Currently, it does not work the
other way around (because of a limitation in the flot library).