CatComp ignores and overwrites existing translations -SOLVED

Have a question about our Software Developer Kit? Ask them here.
Post Reply
User avatar
Bender
Posts: 10
Joined: Sat Jun 18, 2011 1:45 am
Location: Querétaro, México

CatComp ignores and overwrites existing translations -SOLVED

Post 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!
Last edited by Bender on Tue Nov 08, 2011 7:02 am, edited 1 time in total.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: CatComp ignores and overwrites existing translations

Post 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.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: CatComp ignores and overwrites existing translations

Post 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
User avatar
Bender
Posts: 10
Joined: Sat Jun 18, 2011 1:45 am
Location: Querétaro, México

Re: CatComp ignores and overwrites existing translations

Post 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
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: CatComp ignores and overwrites existing translations -SO

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