[izpack-devel] Re : Re : [izpack-users] Re : Tr : Localizingshortcuts

Loic lbndev at yahoo.fr
Fri Apr 27 12:25:22 CEST 2007


Hi Klaus,

You are probably right about the way this should be done. Sorry I haven't gotten far enough into izPack code to pick the ResourceManager at first. Thank you for the review and improvements.

I have tested your SVN version and confirm it works as expected (uses language files and properly fallbacks to defaults when needed).

The documentation I have written should not need to be affected by your chenges since the overall behavior is the same.

Thank you very much,

Loïc

----- 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

Hi Loïc,
now I have had a little bit time to look into the given patch.
It is not good that the shortcut config file can not be localized
until now. Thanks for the hint and for the patch.
Testing it I have seen, that there is already a methode to resolve
locale dependencies (ResourceManager::getInputStream).
This will be better because in near future I will change the locale
determining from
_ccc
to
_ll_CC
Additional I am not amused that the locale identifier ofthen is written
to the end of the file name. One result is, that syntax highlighting
will not start automatically then.
Therefore I have changed the patch to this behavior and checked in into
trunk.

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)

I have tested a little bit, but it will be good if you test also.

Fabrice, can you look that the docu will also be OK for the
changed internals? Thanks.


Cheers

Klaus


> -----Original Message-----
> From: izpack-devel-bounces at lists.berlios.de 
> [mailto:izpack-devel-bounces at lists.berlios.de] On Behalf Of miraodb
> Sent: Wednesday, April 25, 2007 4:24 PM
> To: izpack-devel at lists.berlios.de
> Subject: Re: [izpack-devel] Re : [izpack-users] Re : Tr : 
> Localizingshortcuts
> 
> 
> Hi,
> 
> I'm taking care of that. Thx for the docu update.
> 
> Cheers,
> Fabrice
> 
> ----- Original Message -----
> From: "Loic" <lbndev at yahoo.fr>
> To: <izpack-devel at lists.berlios.de>
> Sent: Wednesday, April 25, 2007 5:35 AM
> Subject: [izpack-devel] Re : [izpack-users] Re : Tr : 
> Localizing shortcuts
> 
> Hi Klaus (& list),
> 
> As promised, attached are the patches for the documentation, 
> related to my 
> patch on shortcutspecs posted yesterday.
> I am no expert in docbook so I updated both xml and html 
> files. Maybe you'll 
> want to use the xml file to regenereate the html one instead 
> of patching it 
> ?
> 
> Cheers,
> 
> Loïc
> P.S. : switching this thread to izpack-devel as the patches 
> seem to be best 
> suited here than on izpack-users. Sorry for cross-posting the 
> patch to both 
> lists yesterday, but I felt I needed to close my question 
> from the day 
> before there.
> 
> ----- Message d'origine ----
> De : "Bartz, Klaus" <Klaus.Bartz at coi.de>
> À : izpack-users at lists.berlios.de
> Envoyé le : Mardi, 24 Avril 2007, 12h26mn 45s
> Objet : Re: [izpack-users] Re :  Tr : Localizing shortcuts
> 
> Nachricht
> 
> 
> DIV {
> MARGIN:0px;}
> 
> 
> 
> Hi
> Loic,
> 
> then
> we are on the same side of the river :-)
> 
> English is also not my native language. May
> be about that I take words
> 
> more
> on an assay-balance as others. Sorry.
> 
> 
> 
> Cheers
> 
> 
> 
> Klaus
> 
> 
> 
> 
>   -----Original Message-----
> From:
>   izpack-users-bounces at lists.berlios.de
>   [mailto:izpack-users-bounces at lists.berlios.de] On Behalf Of
>   Loic
> Sent: Tuesday, April 24, 2007 12:10 PM
> To:
>   izpack-users at lists.berlios.de
> Subject: [izpack-users] Re : Tr :
>   Localizing shortcuts
> 
> 
> 
> 
>   Hi
>   Klaus,
> 
> Thank you for your reply.
> Sorry for not updating the
>   documentation. I will as soon as I can and post the patch.
> 
> From your
>   mail I understand that you took my mail as a personal 
> blame. I am sorry for
>   that, as it was everything but meant to be a blame for 
> anyone. IzPack is a
>   great product. I use it, I like it a lot, I recommend it to 
> other people. 
> When
>   I need something that's not in, I'll happily add it myself 
> if I can get 
> time
>   (and be allowed by my boss) to do it.
> 
> From your writing I understand
>   that I wrote "shame" where I should probably have put 
> "pity" or some other
>   word that would mean that I think this would be a great thing, as 
> everything
>   is localizable everywhere in izPack, but the shortcuts. 
> Sorry for the 
> language
>   slip. As you may know, English isn't my native language, so 
> I sometimes 
> pick
>   up words that aren't those which best reflect my feelings. Sorry for
>   that.
> 
> I hope you'll understand I never meant to hurt you or anyone
>   else, and tyhat I wasn't blaming izPack and its team in any way.
> 
> Thank
>   you for your understanding.
> 
> Loïc
> 
> 
>   ----- 
>   Message d'origine ----
> De : "Bartz, Klaus" <Klaus.Bartz at coi.de>
> À
>   : izpack-users at listsberlios.de
> Envoyé le : Mardi, 24 Avril 2007, 12h00mn
>   07s
> Objet : Re: [izpack-users] Tr : Localizing shortcuts
> 
> 
>   DIV {
> MARGIN:0px;}
> 
> 
>   Hi
>   Loic,
> 
>   thank you for creating a patch for a new feature for 
> IzPack. Sorry that
>   we have
> 
>   forgotten to write explicitly, that this feature do not exist for
>   ShortCuts.
> 
>   Unfortunately I see no patches for the
>   docu which has also to be addapted.
> 
>   Please review the converned IzPack
>   documentation and send us a secound patch,
> 
>   if
>   you like it.
> 
>   Documentation is a big problem in IzPack. From time to time 
> an IzPack
>   user
> 
>   developes a new nice, cool feature for IzPack and send us the patch,
>   but about the docu we
> 
>   have
>   to run after or made it self for a feature we self do not
>   need.
> 
>   Therefore: no docu, no patch.
> 
> 
> 
>   I am
>   a little bit sensitive if some one verbalize a feature request as
>   blame.
> 
>   If
>   you really mean, that if you use IzPack, you have to shame, 
> do not use 
> IzPack.
>   Else
> 
>   take
>   your one, two or three thousend Euro and by a 
> "professional" tool. There
> 
> 
>   you
>   cannot made a patch (there you have no sources and no build 
> file for the
>   engine), but
> 
>   sometimes they have a vote list where you can write into your
>   feature request and hope, that
> 
>   they
>   implement it some year later. Or do you really mean these 
> tools contains 
> all
>   thinks you
> 
>   need
>   and much more?
> 
> 
> 
>   Cheers
> 
> 
> 
>   Klaus
> 
> 
> 
> 
>     -----Original Message-----
> From:
>     izpack-users-bounces at lists.berlios.de
>     [mailto:izpack-users-bounces at lists.berlios.de] On Behalf Of
>     Loic
> Sent: Tuesday, April 24, 2007 11:14 AM
> To:
>     izPack-devel at lists.berlios.de
> Cc:
>     izPack-users at lists.berlios.de
> Subject: [izpack-users] Tr :
>     Localizing shortcuts
> 
> 
> 
> 
>     Hello,
> 
> I'll
>     answer my own question posted yesterday to the 
> izPack-users lists, which 
> is
>     reproduced below.
> As a matter of fact, I found out that the answer is
>     "no, shortcuts aren't localizable". Which is a shame.
> 
> Since I badly
>     need that, I went through the code from SVN and set up a 
> patch, which 
> you
>     will find attached.
> 
> What it does is :
> 
> 
>       Search for a os-specific, language specific spec file (like
>       Unix_shortcutSpec.xml_eng)
>       If not found, search for a language specific (but 
> OS-independent) spec
>       (like shortcutSpec.xml_eng)
>       If still not found, revert to the processing before the patch
>       (OS-specific, and if not found, generic spec file)
> Please
>     review it and merge it into SVN if you like it.
> I'd love to have a
>     patched standalone-compiler.jar in izPack's next release.
> 
> Thank
>     you,
> 
> Loïc
> 
> 
>     ----- 
>     Message transféré ----
> De : Loic <lbndev at yahoo.fr>
> À :
>     izpack-users at lists.berlios.de
> Envoyé le : Lundi, 23 Avril 2007, 15h58mn
>     43s
> Objet : Localizing shortcuts
> 
> 
> 
>     Hello,
> 
> I am using ant and IzPack standalone compiler version
>     3.10.1
> I have the following in my izPack XML install file
>     :
> 
> 
>     <locale>
>         <langpack
>     iso3="fra"/>
>         <langpack
>     iso3="eng"/>
>     </locale>
> 
>     <resources>
>         <res
>     src="FRLicence.txt"
>     id="LicencePanel.licence_fra"/>
> 
>     <res src="ENGLicence.txt"
>     id="LicencePanel.licence_eng"/>
> 
>     <res src="FRInfo.txt" id="InfoPanelinfo_fra"
>     />
>         <res src="ENInfo.txt"
>     id="InfoPanel.info_eng" />
> 
>     <res src="packsLang.xml_fra"
>     id="packsLang.xml_fra"/>
> 
>     <res src="packsLang.xml_eng"
>     id="packsLang.xml_eng"/>
> 
>     <res src="shortcutSpecxml" id="shortcutSpec.xml"
>     os="windows"/>
>         <res
>     src="unix_shortcutSpec.xml" id="Unix_shortcutSpec.xml"
>     os="linux"/>
>         <res
>     src="processpanelSpec-en.xml"
>     id="ProcessPanel.Spec.xml_eng"/>
> 
>     <res src="processpanelSpec-fr.xml"
>     id="ProcessPanel.Spec.xml_fra"/>
> 
>     </resources>
> 
> My problem is : I can't get IzPack to use an
>     "english language shortcuts" file (my default files, as 
> above, contain
>     shortcuts descriptions and captions in french). I have 
> tried adding 
> these
>     :
> 
>         <res
>     src="shortcutSpec-en.xml" id="shortcutSpec.xml_eng"
>     os="windows"/>
>         <res
>     src="unix_shortcutSpec-en.xml" id="Unix_shortcutSpec.xml_eng"
>     os="linux"/>
> 
> but it didn't seem to have any
>     effect.
> 
> LicencePanel localization works.
> InfoPanel localization
>     works.
> Packs localization works.
> ProcessPanel localization works,
>     too.
> 
> But shortcuts just don't. My shortcuts are still created with
>     french captions, while everything else is in english.
> 
> Is it possible
>     to localize shortcuts text, and if yes, how
>     ?
> 
> Thanks,
> 
> Loïc
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ______________________________________________________________
> _____________
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! 
> Découvez les tarifs 
> exceptionnels pour appeler la France et l'international. 
> Téléchargez sur http://fr.messenger.yahoo.com
> 
> 
> 
> > _______________________________________________
> > izpack-devel mailing list
> > izpack-devel at lists.berlios.de 
> > https://lists.berlios.de/mailman/listinfo/izpack-devel
> > 
> _______________________________________________
> izpack-devel mailing list
> izpack-devel at lists.berlios.de 
> https://lists.berlios.de/mailman/listinfo/izpack-devel
> 
_______________________________________________
izpack-devel mailing list
izpack-devel at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/izpack-devel







      
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-devel/attachments/20070427/623ffcd7/attachment.html 


More information about the izpack-devel mailing list