Page 1 of 1

CatComp ignores and overwrites existing translations -SOLVED

Posted: Mon Nov 07, 2011 8:16 am
by Bender
Hello again!

I'm getting an unexpected behavior with CatComp 53.1 under OS4.1u3. The steps to reproduce it are:

1. Get a valid .cd file and copy it to a temporary location. In my case I copied prefs.cd to RAM:

2. Validate the cd file with catcomp:

Code: Select all

7.RAM Disk:> catcomp prefs.cd
'prefs.cd' is a valid descriptor file
3. Create a .ct file:

Code: Select all

7.RAM Disk:> catcomp prefs.cd CTFILE prefs.ct
An empty prefs.ct file is created

4. Open prefs.ct and translate some strings, two or three are enough for now. Enter 0 as codeset to avoid an error on the next step. Save the file.

5. Now re-create the .ct file, but using the existing one as a starting point:

Code: Select all

7.RAM Disk:> catcomp prefs.cd prefs.ct CTFILE prefs.ct
6. Open the new prefs.ct file and you will see that your translations are gone and again, an empty file was created. It should have preserved all your current translations.

Can someone else reproduce this? If confirmed then it may cause someone to lose a huge amount of work. Lucky me I had a backup, otherwise I would be crying by now :(

I booted from the OS4.1u1 CD and did the same test. It worked as expected, current translations were preserved. I think it also worked OK under OS4.1u2.

Thanks!

Re: CatComp ignores and overwrites existing translations

Posted: Mon Nov 07, 2011 1:22 pm
by salass00
Bender wrote: 5. Now re-create the .ct file, but using the existing one as a starting point:

Code: Select all

7.RAM Disk:> catcomp prefs.cd prefs.ct CTFILE prefs.ct
I wasn't aware that you could do that with catcomp. I'll have to implement this feature in my ruby reimplemented version ASAP.

Re: CatComp ignores and overwrites existing translations

Posted: Mon Nov 07, 2011 11:20 pm
by nbache
Bender wrote: 5. Now re-create the .ct file, but using the existing one as a starting point:

Code: Select all

7.RAM Disk:> catcomp prefs.cd prefs.ct CTFILE prefs.ct
When I do this, I always create a separate file. Normally by renaming the old file to e.g. prefs.cdx before running the command. So I wouldn't have seen this "interesting" :roll: behaviour.
Can someone else reproduce this? If confirmed then it may cause someone to lose a huge amount of work. Lucky me I had a backup, otherwise I would be crying by now :(
I'm not going to have time to look into it for a week or so, so if anybody else could?
I booted from the OS4.1u1 CD and did the same test. It worked as expected, current translations were preserved. I think it also worked OK under OS4.1u2.
Which versions of CatComp were invoked by your two tests in update 3 and 1? Please double-check by doing a "which catcomp" and a "version <path>/catcomp file full" on that one, before issuing your test command. If that doesn't show differences, we may also need the locale.library version in each case, and maybe some others.

Best regards,

Niels

Re: CatComp ignores and overwrites existing translations

Posted: Tue Nov 08, 2011 7:01 am
by Bender
nbache wrote:Which versions of CatComp were invoked by your two tests in update 3 and 1? Please double-check by doing a "which catcomp" and a "version <path>/catcomp file full" on that one, before issuing your test command. If that doesn't show differences, we may also need the locale.library version in each case, and maybe some others.
That solved it :)

Turns out the OS4.1u1 CD includes a CatComp file in SYS:Utilities. It is version 51.9 (19.12.05). After installing updates 2 and 3, that CatComp file is not updated.

I installed the SDK in my Work: partition and wrongly assumed the CatComp I was executing was the one from SDK:C, which is version 53.1, when in reality I was using the old one from SYS:Utilities (path precedence I think).

So that's it. There's nothing wrong with CatComp 53.1 and OS4.1u3.

Maybe in update4 will SYS:Utilities/CatComp be updated to the latest version?

Thanks for your help Niels! :D

Re: CatComp ignores and overwrites existing translations -SO

Posted: Wed Nov 09, 2011 12:16 am
by nbache
Splendid!

Yeah, that looks like the unfortunate effect of someone having second thoughts about where CatComp should belong.

Then again, the AppDir: concept could be your saviour, once you have executed the correct CatComp once.

Best regards,

Niels