View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004938 | JEDI VCL | 00 JVCL Components | public | 2009-09-16 02:38 | 2009-12-18 12:08 |
Reporter | delphaber | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | open | ||
Platform | Core2Duo 2Ghz,2GB RAM,128MB GPU | OS | Windows XP Professional 32Bit | OS Version | Turbo Delphi PRO |
Product Version | Daily / GIT | ||||
Target Version | 3.40 | Fixed in Version | 3.40 | ||
Summary | 0004938: JvProgramVersionCheck Form not being translated if exe is compiled with runtime packages | ||||
Description | Hi, the form saying there's a new version available won't be translated in my language(italian). It happens when I compile my project with run time packages. I've added italia jvcl.mo into "locale/it/LC_MESSAGES/" and added this code to an unit I initialize before others: bindtextdomain('jvcl', ParamStr(0) + 'locale'); But this didn't work. If I DO NOT include that code AND I DO NOT compile with run time packages, the form got translated. I attached a demo based on jvcl examples. | ||||
Tags | No tags attached. | ||||
2009-09-16 02:39
|
JvProgramVersionCheck.zip (148,806 bytes) |
|
Two things: 1. The call is actually AddDomainForResourceString('jvcl'); and not "bindtextdomain" 2. The fact that it does not work with packages is because you did not select "USE_DXGETTEXT" in the installer. Once selected, you must REBUILD the packages Please verify all this and let us know how it goes. |
|
Hi Obones, I already use "dxgettext support". This time I've checked also "Build packages" and installed jvcl (today svn) as usual. I've changed bindtextdomain ---> AddDomainForResourceString('jvcl'), but I'm still having problems. That form will be translated only if I do NOT compile with run time packages. I've tried also to copy my "locale" folder to Borland BPL folder (where jvcl bpls are), but that doesn't work. Thank you in advance. |
|
Hum, I'm seeing this as well. The main application gets the translation, but not the JVCL forms. Weird... |
2009-10-06 09:12
|
4938.zip (263,005 bytes) |
|
Apparently JvGnuGetText is not correctly initialized when an application has designtime packages. The SupportPackages parameter of the function HookIntoResourceStrings has to be set to true when an application is compiled with runtime packages. However, this flag must be false when the package is loaded in the IDE but I don't know how to flag this situation. I'm attaching a patch to this report that shows how to get things alright using the following steps: - uninstall the JVCL, - patch JvGnuGetText with the supplied patch, - open the JVCL package group in the IDE, - build every thing (do not install), - open the demo application attached to this report (4938.zip), - the IDE will complain it is not able to find some JVCL component, hit "cancel", - execute the application --> the application is translated when it is compiled with runtime packages (as well as when it is not compiled with runtime packages) |
2009-10-17 18:28
|
4938.patch (960 bytes)
Index: JvGnugettext.pas =================================================================== --- JvGnugettext.pas (revision 12557) +++ JvGnugettext.pas (working copy) @@ -424,10 +424,11 @@ // because it makes this unit independent of the SyncObjs unit (**************************************************************************) -{$ifdef CLR} uses - System.Globalization, System.Diagnostics, System.Windows.Forms; -{$endif} + {$ifdef CLR} + System.Globalization, System.Diagnostics, System.Windows.Forms, + {$endif} + JclSysUtils; type TTP_RetranslatorItem = class @@ -3588,7 +3589,7 @@ {$ENDIF DELPHI2009OROLDER} HookLoadStr := THook.Create(@SysUtils.LoadStr, @SysUtilsLoadStr); HookFmtLoadStr := THook.Create(@SysUtils.FmtLoadStr, @SysUtilsFmtLoadStr); - HookIntoResourceStrings(AutoCreateHooks, False); + HookIntoResourceStrings(AutoCreateHooks, IsCompiledWithPackages and not IsRunningInTheIDE); {$endif} finalization |
|
one precision: the patch references a function named "IsRunningInTheIDE", this function does not exist and we have to find an easy way to get this flag. Just remove "and not IsRunningInTheIDE" before the compilation of JvCoreD**R.bpl. but remember: do not run the patched JvGnuGetText within the IDE... |
|
Thank you! I'm going to try this patch this evening. Thank you for your support ^^ |
|
:/ Sorry, I haven't find time to test it. Plus today JCL fails to compile (i've reported it :) ) I'll write here (I hope) soon :) |
|
The JCL compile errors are fixed. |
|
That Worked! Thank you so much! So basically I have to ship the patched JvCoreD10R.bpl to my clients, right? |
|
Or maybe I should ship all jvcl run time bpls (compiled with patch) |
|
Just the JvCore should be enough |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-09-16 02:38 | delphaber | New Issue | |
2009-09-16 02:39 | delphaber | File Added: JvProgramVersionCheck.zip | |
2009-09-22 16:23 | obones | Note Added: 0016137 | |
2009-09-22 16:23 | obones | Status | new => feedback |
2009-09-26 18:14 | delphaber | Note Added: 0016195 | |
2009-10-05 14:54 | obones | Note Added: 0016767 | |
2009-10-05 14:54 | obones | Status | feedback => confirmed |
2009-10-06 09:12 | obones | File Added: 4938.zip | |
2009-10-17 18:27 | outchy | Note Added: 0016779 | |
2009-10-17 18:28 | outchy | File Added: 4938.patch | |
2009-10-17 18:30 | outchy | Note Added: 0016780 | |
2009-10-17 18:35 | delphaber | Note Added: 0016781 | |
2009-10-25 18:56 | delphaber | Note Added: 0016822 | |
2009-10-25 19:47 | AHUser | Note Added: 0016824 | |
2009-10-25 22:36 | delphaber | Note Added: 0016826 | |
2009-10-25 22:42 | delphaber | Note Added: 0016827 | |
2009-12-18 12:08 | obones | Note Added: 0017009 | |
2009-12-18 12:08 | obones | Status | confirmed => resolved |
2009-12-18 12:08 | obones | Fixed in Version | => 3.40 - not yet released |
2009-12-18 12:08 | obones | Target Version | => 3.40 - not yet released |