GitPHP 0.2.1
- October 9th, 2010
- Write comment
I’ve released GitPHP 0.2.1. This release fixes a number of the bugs that arose from the rewrite first released in 0.2.0, and also adds a number of features that I intended to add but didn’t make it into 0.2.0.
The biggest change is that my homebrew translation framework that appeared in 0.2.0 was ripped out and replaced with gettext. I apologize if you already started translating, but gettext is much easier to work with, I promise. I’ve provided a short starter HOWTO in doc/TRANSLATING. As always, you can send a translation to me for inclusion in the official release.
If you’re running gitphp from the git repo instead of the tarball, you will need to run util/msgfmt.sh from the gitphp base directory after cloning the repository to compile the gettext MO files, or else the translations won’t work. The tarball releases have this done already and will work out of the box.
Language can also be selected on the fly by users now, using a drop-down menu. The default setting for this for a first-time visitor is the browser’s preferred language if supported, followed by whatever’s specified in the gitphp config, followed by English as the final default. Check it out at the live copy.
Also, this is the first release of gitphp that provides another language besides English: gitphp is now available in French, thanks to Zaran.
The other notable enhancement is the ability for users to select arbitrary commits on the log or commit pages, and diff them. Each commit in the log or shortlog shows a “select for diff” link. Click this by a commit to select it. The selected diff will appear in the very top header of the log or shortlog, with a partial commit message (with the full commit tooltip), and the option to deselect it. The “select for diff” links by commits will now change to “diff with selected” – click this to do the diff. (The link by the currently selected commit will change to “deselect”) This selection persists across pages of the shortlog/log, so you can diff across two different pages. The selection will also persist when switching back and forth from log to shortlog and vice versa, although going to a non-log page will discard the selection. The implementation is original, but I’d like to thank Calen Pennington for some of the UI designs.
Here’s the full list of changes:
- GitPHP now uses gettext for internationalization. I’ve also provided a short howto in doc/TRANSLATING
- Language can now be changed on the fly by the user using a drop-down menu in the upper right. The initial default for this is the user’s preferred language from their browser. If there is no translation for the user’s language, it will fall back to the locale in the config, then to English as the final default. But of course, the user can always change the language whenever they want. The user’s language choice is remembered by a browser cookie.
- French translation, thanks to Zaran
- On the log and shortlog pages, arbitrary diffs can be selected and diffed. You can select one commit, then diff with any other. Your selected diff will persist across pages, in case you want to diff between two different pages. The selected diff, if there is one, will appear in the top header, above the log/shortlog. This selection will also persist when switching from the shortlog to the log and vice versa.
- New pieces of metadata can now be specified for a project using the advanced project array format (in projects.conf.php): description, owner, clone url, and push url. Specifying any of these for a project will override that data for that project only.
- Tree view and commit view now provide a “plain” link by blobs to go right to the plaintext view of that blob
- Added a file history link to the blob page
- To make things a little easier to track, the home text template that configures the header of the project list (templates/hometext.tpl) is no longer provided in the tarball. The system will show the default hometext, but you can create templates/hometext.tpl with your content to customize the header. Therefore, this is backwards compatible for everyone who already has a customized hometext.tpl template.
- The “projects” link in the upper left that takes you to the main project list can be customized. Please be advised that if you override this, you’re also hardcoding the language that it appears in.
- Fixed a bug where search wouldn’t work on git < 1.5.3
- Fixed a bug where some dates wouldn’t show up correctly on windows
- Fixed a bug where an exception would be thrown if no config file existed
- Fixed bugs where GitPHP would crash when an empty project with no commits was being loaded
- Fixed a bug in reading projects from a list file, where owners with multiple words in the name would only display the first word
- Fixed a bug on the commit page, where the history link by a deleted file wouldn’t work
- Fixed a bug where the javascript commit tooltip would appear out of the browser window for a commit close to the bottom of the page
- XHTML validation fixes, thanks to Christian Weiske
- Minor visual fix where source files in commit diffs were missing the “a/” prefix (but destinations files still had the “b/” prefix)
Get it on the GitPHP page.
As always, anything – bugs, enhancement requests, etc – can be reported on the Mantis bugtracker. I’d like to give a big thanks to the people that have been using the bugtracker already; it’s been a huge help in keeping me and my development organized.
I’ve also created a page for GitPHP on Ohloh, if you’re interested.