Conversation

Build fails for language files

(overview of excerpts from articles in conversation)

Newsgroup: embarcadero.public.cppbuilder.localization

# Lines
wrote on 26-Jan-2013:

Hi,
I am trying to use the ITE in C++Builder XE3 for the first time and have created a small project which builds and runs correctly. I added a new language to it (German) and opened the Form and RC files in the translation editor and entered some translations there. When I try to build the project I get the following error message.
{code}
Checking project dependencies...
Building BPAlert_DEU.bdsproj (, Win32)
63
  
Bruce Petty replied on 19-Apr-2013:

Hi,
  I'm having the same problem.
  I've followed the instructions that Delphi provided to use the translation tools. Everything works fine, until I get to the point of compiling the program. If I compile only the English, then it works fine. However if I do a Build All Projects then the compiler gives an error.
  The compiler I'm using is the newly-downloaded Trial version of RAD Studio XE3 (although I'm only using the C++ Builder portion of it - and the Trial version only appears to come as the Architect version).
  The program is just a simple Hello World program. I started by creating a VCL forms project and placed one TLabel on the form with the Caption=Hello World.
48
    
Ciaran Manning replied on 19-Apr-2013:

Hi Bruce,
    I found the answer after filing a bug report. It turns out that there is a bug in this part of Rad Studio that means it is unable to handle paths with spaces in them which is particularly troublesome because the default project path includes a space. If you change your "RAD Studio" folder to "RADStudio" then the compile should run correctly.
    Regards
    Ciaran
    (snip)
66
      
Bruce Petty replied on 29-Apr-2013:

Hi Ciaran!
      Thank you so much for responding. I did not expect anyone to respond. I had tried Embarcadero and they wanted $300 to tell me how to get around their bug.
      I first tried to translate a Hello World program with XE and then used the trial XE3 and got the same response. Your work-around worked! It did allow the build without failure however after doing a Project->Language->Set Active to change the language and then the Build All Projects, the program which Runs still shows only English. I put other words in for both the Form Caption and a single TLabel caption.
      During some of the early discussion with Embarcadero they gave me a link to:
      http://cc.embarcadero.com/item/26954
51
        
Bruce Petty replied on 29-Apr-2013:

Ciaran,
        By the way, I've tried the trial XE4 and they've apparently changed that part of the program so that just changing the folder name so it has no spaces is apparently not sufficient anymore. When running Build All Projects now on XE4 (with RAD Studio changed to RADStudio) it fails but no longer shows any kind of reason for the failure.
        Bruce
        
        
14
        
Ciaran Manning replied on 29-Apr-2013:

Hi Bruce,
        I discovered that when you change the active language in the IDE it creates (or modifies) two registry keys in HKEY_CURRENT_USER/Software/Embarcadero/Locales. The keys are named after the path and filename of your project so in my case they are called C:\Users\Ciaran\Documents\RADStudio\Projects\ITE-Test\.\Win32\Release\Project1.exe and C:\Users\Ciaran\Documents\RADStudio\Projects\ITE-Test\Win32\Release\Project1.exe These both seem to point to the same folder so I don't know why one has a (redundant)
        "./" in the path. When I set my active language to French the contents of both of these is "FRA" and when I change it ti English the contents are "en-GB".
        The catch seems to be that it takes while for the IDE to realise that the path to the project has changed since when I looked at this after first changing my active language to French I found two entries as above with FRA as the locale BUT with a space in "RAD Studio". When I ran the program it showed the English version of the form. When I changed it back to English and then Back to French again I ended up with the correct registry entries and the program now displays the Frence version if I run it i
        n the IDE.
173
          
Bruce Petty replied on 30-Apr-2013:

Ciaran,
          Thank you so much for your very helpful suggestions! Because of them I now have it working on the trial XE3, XE4, and even back on the original XE. Since it works with XE, I won't need to buy the newer compiler. I don't understand why Embarcadero has allowed these same errors to go through so many versions without fixing them.
          All of my tests have just been with a small Hello World program but I have a lot of confidence now that they will work with the larger program that must be translated.
          I can see the icon stating that you've provided a complete answer for me but I don't know how to mark it.
          Bruce
25
            
Ciaran Manning replied on 30-Apr-2013:

Glad to help Bruce.
            I think that because I posted the original question in the thread that I can't be awarded any points for providing the answer to my own question. Still we both know more than we did before so that's reward enough.
            Ciaran
            
            
10
              
Bruce Petty replied on 06-May-2013:

I may have had a false sense of excitement. Everything I've tested to date was on a simple "Hello World" program. However when I try to do the translation on my complete program, it shows three E1026 errors.
              File not found: 'vcl\DBLOGDLG.dfm'
              File not found: 'CPOCII_DS.res'
              File not found: 'Text.res'
              I found something on the internet about the first error. I found the DBLOGDLG.dfm file in Quality Central Report #: 95442 and followed the suggested work-around but it doesn't seem to work. I've read a little about the .res files but do not understand the problem.
29
                
Bruce Petty replied on 06-May-2013:

For the vcl\DBLOGDLG.dfm error, the problem was mine. I have several languages to translate into and had not copied the DBLOGDLG.dfm file into all of them.
                Two errors left. Concerning the CPOCII_DS.res error, the CPOCII_DS.rc file does not contain anything. I'm not sure when it was created. I've tried just removing the CPOCII_DS.rc file. The compiler would not allow me to remove it after the language was added so I removed the language and then was able to remove the CPOCII_DS.rc file and now have added the language back in.
                The text.res file was there but had been placed by the linker into the specified output file (debug). Then while it was doing the translation portion it apparently couldn't remember where it was placed. I put a copy of the text.res file in the project's root folder and the linker was able to finish.
                So at this point I have a completed project, I think.
                Nope. It still doesn't work. I noticed that I was not able to select Project->Languages->Set Active (the selection was grayed out). So I closed the IDE and reopened it. All of the other languages can still be seen in the project group but both Remove and Set Active are grayed out. When I tried to again Build All Projects, both the CPOCII_DS.res and text.res errors reappeared.
71
                  
Ciaran Manning replied on 07-May-2013:

Hi Bruce,
                  Glad that it appears to be working for you now. I haven't yet done any more than a similar "Hello World" program myself so al least I now know what to watch out for when I try translating my current development project.
                  Regards
                  Ciaran
                  
10
                    
Bruce Petty replied on 21-May-2013:

Hi Ciaran,
                    Back to problems again.
                    In both the Hello World program and my complete program I'm using both dfm files and a text.rc file. The text.rc file replaces some labels actively in the program by using LoadStr() commands. The Hello World program shows both the results from the dfm files and text from the text.rc files correctly on the forms.
                    I have the full program completed and have put in all of the translations. However when I run the program now it only shows the forms which had DFM files with the translations.
                    Nothing from the text.rc file seems to be coming through in any of the languages. I've tried removing all of the languages and putting them all back (that helped with some of the compiler/linker problems) but it didn't help with this.
82
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Tue, 05 Nov 2024 11:31:41 UTC
Copyright © 2009-2024
HREF Tools Corp.