Re: [Kati-devel] XML Editor
Status: Pre-Alpha
Brought to you by:
nemcs
|
From: Francisco J. G. C. <mul...@gm...> - 2008-11-10 20:26:58
|
OK, i'll try to apply your remarks. I send you the patch now. On Mon, 2008-11-10 at 19:48 +0100, Csaba Nemes wrote: > On Mon, Nov 10, 2008 at 6:32 PM, Francisco Javier Garrote Cruz > <mul...@gm...> wrote: > > Hi, > > I have been away for a couple weeks but have been working on the XML > > Editor multilanguage support. > > This is what I have done. The "main" of the program calls a frame that > > has a list where you can select the language you what to use (default > > English). The select works. I have translated the Title of the program > > and the two menus to see if it works. > > I have also created a class: > > "public static String KLanguage (int language, String Bundle, String > > field)" > > Which can be used by developers instead of a string to set labels, > > menus,... all you have to do is: > > > > JMenuItem prog = new JMenu(KLanguage.KLanguage( Kati.location, > > "KatiMenu", "Program")); > > > > "Kati.location == is a array with the different languages. The language > > is selected when you assign a value to > > "public static int location = 0;" //in the Kati.java > > > > "KatiMenu" == Bundle used. > > > > "Program == is the key word that will contain the real string depending > > on the language selected. > > > > Please let me know how to send you the source code so you can take a > > look at it. > Please try to send me a diff. > http://www.linuxfromscratch.org/blfs/edguide/chapter03.html#ch03-diff > > It's very probable that i will accept your patch, because i really > need your help. ;) > But i have some remarks: > > 1. The "language selection" frame you created should be the part of > the "program settings" frame. > But there's no program settings frame so far. ;) I don't want to > select language at every startup. > Can we skip this frame, and can kati start with the default language? > To test your code > i will change the language, and recompile it. ;) > Latter we (maybe you) will make a project settings and there you can > implement the "language selection". > > 2. The following example should be a little bit simpler: > JMenuItem prog = new JMenu(KLanguage.KLanguage( > Kati.location,"KatiMenu", "Program")); > JMenuItem prog = new JMenu(kLang.getTransaltion("KatiMenu.Program")); > We will use it very often. So its worth to keep it simple. > > KLanguage kLang = KLanguage(language); should be somewhere in the > Kati, but before KWindows creation. ;) > Fisrt we should set language by hand. Latter as i mentioned from the > project settings. > > I hope that i didn't scary you with the tons of remarks. I dont want > to cut your freedom, just to make your debut perfect! ;) > > Take care, > > Frank > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & win great prizes > > Grand prize is a trip for two to an Open Source event anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Kati-devel mailing list > > Kat...@li... > > https://lists.sourceforge.net/lists/listinfo/kati-devel > > > > > |