[izpack-devel] [izpack-users] Problems with localizing shortcuts.

Loïc lbndev at yahoo.fr
Sun Jan 20 18:47:39 CET 2008


Christian,

Happy to see it works for you.
Now what is strange is that this patch has been committed a long time 
ago. Not quite the fix you got, but an improved version by Klaus Bartz.
However, I just checked out latest SVN and notice the same thing. I have 
no clue why it has disappeared from SVN again (yes, again, it already 
happened back in april).

Crossposting to izpack-devel for correction.
Here is an extract from Klaus' mail, along with the correct patch. 
Julien, can you commit this ?

----- Message d'origine ----
De : "Bartz, Klaus" <Klaus.Bartz at coi.de>
À : izpack-devel at lists.berlios.de
Envoyé le : Vendredi, 27 Avril 2007, 11h54mn 35s
Objet : Re: [izpack-devel] Re : [izpack-users] Re : Tr : Localizingshortcuts

[... snip ...]

Modified: 
izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanel.java
===================================================================
--- 
izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanel.java    2007-04-24 
14:50:54 UTC (rev 1818)
+++ 
izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanel.java    2007-04-27 
09:34:36 UTC (rev 1819)
@@ -756,11 +756,12 @@

         try
         {
-            input = 
parent.getResource(TargetFactory.getCurrentOSPrefix() + SPEC_FILE_NAME);
+            input = ResourceManager.getInstance().getInputStream(
+                    TargetFactory.getCurrentOSPrefix() +
+ SPEC_FILE_NAME);
         }
         catch (ResourceNotFoundException rnfE)
         {
-            input = parent.getResource(SPEC_FILE_NAME);
+            input =
+ ResourceManager.getInstance().getInputStream(SPEC_FILE_NAME);
         }

         if (input == null)

----- Fin du message d'origine ----

Thanks everyone,

Loïc

Christian-Josef Schrattenthaler a écrit :
>
> Hi Loïc!
>
>  
>
> I did it!
>
>  
>
> I used my Newsreader to search in the Mailinglist (news.gmane.org -> 
> gmane.comp.java.izpack.user), and there I found your posting from 
> 24.04.2007/11:14. I changed the code of the actual trunk under 
> src/lib, package com.izforge.izpack.panels, file ShortcutPanel.java from:
>
>  
>
> *** Original ***
>
> try
>
> {
>
> input = parent.getResource(TargetFactory.getCurrentOSPrefix() + 
> SPEC_FILE_NAME);
>
> }
>
> catch (ResourceNotFoundException rnfE)
>
> {
>
> input = parent.getResource(SPEC_FILE_NAME);
>
> }
>
> if (input == null)
>
> ****************
>
>  
>
> to
>
>  
>
> *** Changes ***
>
> try
>
> {
>
> // Find os-&-language-specific spec
>
> input = parent.getResource(TargetFactory.getCurrentOSPrefix() + 
> SPEC_FILE_NAME + "_" + idata.localeISO3);
>
> }
>
> catch (ResourceNotFoundException rnfe)
>
> {
>
> try
>
> {
>
> // Not found ? Try generic OS but language-specific
>
> input = parent.getResource(SPEC_FILE_NAME + "_" + idata.localeISO3);
>
> }
>
> catch (ResourceNotFoundException rnfe2)
>
> {
>
> // Still not found ? Maybe generic language but OS-specific ?
>
> try
>
> {
>
> input = parent.getResource(TargetFactory.getCurrentOSPrefix() + 
> SPEC_FILE_NAME);
>
> }
>
> catch (ResourceNotFoundException rnfe3)
>
> {
>
> // Can't find anything specific : falling back to default
>
> input = parent.getResource(SPEC_FILE_NAME);
>
> }
>
> }
>
> }
>
> if (input == null)
>
> ****************
>
>  
>
> Than I did the Ant Build, changed the files in my IzPack installation, 
> and created a new installation of my testapplication. Now the shortcut 
> system is working well.
>
>  
>
> I don't know how, but I think we have to tell this to the developers 
> of IzPack!?
>
>  
>
> Greetings & thanks,
>
> Christian.
>
>  
>
> *Von:* izpack-users-bounces at lists.berlios.de 
> [mailto:izpack-users-bounces at lists.berlios.de] *Im Auftrag von 
> *Christian-Josef Schrattenthaler
> *Gesendet:* Sonntag, 20. Jänner 2008 08:49
> *An:* izpack-users at lists.berlios.de
> *Betreff:* Re: [izpack-users] Problems with localizing shortcuts.
>
>  
>
> Hi Loïc!
>
>  
>
> At first: Thank you for your help!
>
>  
>
> I downloaded the newest trunk from the svn, and built it under eclipse 
> over ant as you described. After that I replaced the old IzPack 
> Installation files with the new files from my build.
>
>  
>
> Than I made a new installation form my testapplication. The same 
> result as before. The shurtcuts are always in english.
>
>  
>
> Any idea?
>
>  
>
> Greatings,
>
> Christian.
>
>  
>
> *Von:* izpack-users-bounces at lists.berlios.de 
> [mailto:izpack-users-bounces at lists.berlios.de] *Im Auftrag von *Loïc
> *Gesendet:* Samstag, 19. Jänner 2008 21:04
> *An:* izpack-users at lists.berlios.de
> *Betreff:* Re: [izpack-users] Problems with localizing shortcuts.
>
>  
>
> Open <sourcedir>/src/build.xml in Eclipse.
> The Ant view will show up : use it to compile what you need (either 
> the installer => target "dist" and/or the standalone compiler for 
> inclusion into your own Ant buildfile => target 
> "build.standalone-compiler").
> Full instructions are in the comments at the beginning of build.xml
>
> Christian-Josef Schrattenthaler a écrit :
>
> Hi Loïc!
>  
> No, I used the official version from the Website.
>  
> Now I downloaded the newest trunk (1990) over Subclipse as new project into
> my eclipse.
>  
> Painful, but I don't know what to do now. I looked on the files, but there
> are some files missing. For example the 'compile.jar'.
>  
> Please can you, or anybody else, tell me, how to create an installer for
> this version, so that I can change my installed version, with the version of
> the SVN?
>  
> Thnaks,
> Christian.
>  
> -----Ursprüngliche Nachricht-----
> Von: izpack-users-bounces at lists.berlios.de <mailto:izpack-users-bounces at lists.berlios.de>
> [mailto:izpack-users-bounces at lists.berlios.de] Im Auftrag von Loïc
> Gesendet: Samstag, 19. Jänner 2008 14:12
> An: izpack-users at lists.berlios.de <mailto:izpack-users at lists.berlios.de>
> Betreff: Re: [izpack-users] Problems with localizing shortcuts.
>  
> Christian-Josef Schrattenthaler a écrit :
>   
>
>     Hi!
>
>      
>
>     I want to localize my shortcuts, but it does not work.
>
>      
>
>     I have the following entries in my install.xml
>
>      
>
>     <res src="IzPack/shortcutSpec.xml" id="shortcutSpec.xml" />
>
>     <res src="IzPack/shortcutSpec_deu.xml" id="shortcutSpec.xml_deu" />
>
>      
>
>     Both files have the same content, expect the one has englisch texts and
>
>         
>
> the
>   
>
>     other has german texts.
>
>      
>
>     If I do the installation, always the englisch texts are used.
>
>      
>
>     Do you have any hints for me?
>
>       
>
>         
>
>  
> Are you using the latest izPack from svn ? This has just been fixed some 
> time ago.
>  
> Have a nice weekend,
>  
> Loïc
>  
>  
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-devel/attachments/20080120/82233d5c/attachment-0001.html 


More information about the izpack-devel mailing list