Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] NLS and JGit

Gunnar Wagenknecht <gunnar@xxxxxxxxxxxxxxx> wrote:
> Alex Blewitt schrieb:
> > What can we do in this case? Do we need to translate those as well, or  
> > just those in the EGit components? How do other standalone products  
> > (like ECF) handle this optional dependency on the NLS classes?
> 
> Do we know how many consumers we have for the AWT stuff? I'd like to
> here what's there preferred way.

NetBeans consumes the AWT stuff, as does the command line .pgm
package when it needs to prompt for a password.

Since .pgm is designed for stand-alone command line client usage
only, it might be reasonable there to link against the EPL NLS if
that code is very small and easily embedded.  That would help us
translate the command line interface, but that doesn't help the
AWT dialog box code implement translations.

Given that there's only about 5 strings in that AWT dialog box,
we may be able to translate that "by hand" through a ResourceBundle.

FWIW, I don't think any of the AWT package is used in EGit, as
AWT and SWT are dicy to glue together and Eclipse already has
the necessary UI elements.  So we might be able to avoid doing
translation work on the AWT package for now, and let those who really
do care (e.g. NetBeans developers) contribute to translation work
there if they need it.
 
> As for the core JGIT stuff, I agree that we should move translations up
> the stack, i.e. make use of exceptions and status codes as much as
> possible. This allows for more flexibility for clients higher up the
> stack (like EGit) when doing translations. Is that possible?

Agreed.  Our exceptions aren't detailed enough, but are trying
to go in that direction.  I don't want an interface as nasty to
use as CoreException/IStatus is, but we need to carry more data in
our exceptions that can help the caller pick the right translation
message and mix in things like file paths when appropiate.

-- 
Shawn.


Back to the top