Re: [PATCH 2/3] vc: Check for installed version control tools before use
- From: Peter Tyser <ptyser gmail com>
- To: Kai <kai willadsen gmail com>
- Cc: meld-list gnome org
- Subject: Re: [PATCH 2/3] vc: Check for installed version control tools before use
- Date: Tue, 17 Aug 2010 23:53:22 -0500
<snip>
>> I will change the strings to the following unless someone else advises
>> otherwise:
>> if vc._vc.call(["which", avc.CMD]):
>> err_str = _(" (%s Not Installed)" % avc.CMD)
>> elif avc.valid_repo():
>> if (self.vc is not None and
>> self.vc.__class__ == avc.__class__):
>> default_active = idx
>> else:
>> err_str = _(" (Invalid Repository)")
>>
>> self.combobox_vcs.get_model().append( \
>> [avc.NAME + err_str, avc, len(err_str) == 0])
>
> My bad - looking at this I realised that this also presumes word
> order. So in the end, you'd have to translate the whole lot and avoid
> the string concatenation all together. I'd just replace the first
> element of the last list with _("%s (%s)") % (avc.NAME, err_str), and
> remove the spaces and parentheses from the error strings themselves. I
> *think* that should be okay.
Thanks for the feedback Kai. I think what you describe above would
work for the error case, but it would print extra ()'s for the
non-error case too, eg "git ()" for a valid git repo. I used slightly
different logic in the updated patch series I just sent.
If there's a flaw in the logic of the latest patches, let me know. I
also wouldn't be offended in the least if you thought it was quicker
to fix yourself than try and explain it to me:)
Best,
Peter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]