Catcheck &Catcomp

This forum is for discussion of the AmigaOS 4.x localization. This includes translation errors as well as proposals for improved translations, and other topics related to localization.

Catcheck &Catcomp

Postby JosDuchIt » Sat Jan 11, 2014 2:13 pm

I don't find any standard describing how a .CT file generated with catcomp from a .cd file must be filled in

To begin with: in the .CT file i find
## version $VER: XX.catalog XX.XX (XX.XX.20XX)
## codeset X
## language X

the cd file has a version string, if this is the one i should use , why doesn't catcomp fills in that version?


14.Stock:KeyMapSwitcher> catcheck KeymapSwitcher_docky.cd Catalogs/french/KeymapSwitcher_docky_FR.ct
KeymapSwitcher_docky.catalog: objet non trouvé
KeymapSwitcher_docky.cd 1245 9-Jan-2014 14:52:00 - 1.1, 27-Nov-2013 (language unknown)
KeymapSwitcher_docky.ct 1134 10-Jan-2014 11:24:07 - X (version, date unknown)
KeymapSwitcher_docky.ct, line 1, pos 29: Missing or incorrect version string.
KeymapSwitcher_docky.ct: Translation has no version.
KeymapSwitcher_docky.ct, string MSG_DOCKY_MODE: No text in translation.
KeymapSwitcher_docky.ct, string MSG_DOCKY_POPUP: No text in translation.
KeymapSwitcher_docky.ct, string MSG_DOCKY_WINDOW: No text in translation.
KeymapSwitcher_docky.ct, string MSG_DOCKY_SETTINGS: No text in translation.
KeymapSwitcher_docky.ct, string MSG_OK_GAD: No text in translation.
KeymapSwitcher_docky.ct, string MSG_ERROR_NO_INPUTPREFS: No text in translation.
KeymapSwitcher_docky.ct, string MSG_ERROR_SCANNING: No text in translation.
....all lines the same error

KeymapSwitcher_docky_FR.cd: objet non trouvé
KeymapSwitcher_docky_FR.ct: objet non trouvé
KeymapSwitcher_docky_FR.catalog: objet non trouvé
KeymapSwitcher_docky_FR (): Description load error. Translation load error. Catalog load error.

I can't see what is wrong with the translated lines i did put in the .ct file

## version $VER: XX.catalog XX.XX (XX.XX.20XX)
## codeset X
## language X
;
MSG_DOCKY_MODE
Mode
; Mode
;
MSG_DOCKY_POPUP
Contextuel
; PopUp
;
MSG_DOCKY_WINDOW
Fenêtre
; Window
;
MSG_DOCKY_SETTINGS
Réglages...
; Settings...
;
MSG_OK_GAD
OK
; OK
;
Last edited by JosDuchIt on Sun Jan 12, 2014 6:49 pm, edited 1 time in total.
JosDuchIt
 
Posts: 280
Joined: Sun Jun 26, 2011 6:47 pm

Re: Catcheck

Postby MichaelMerkel » Sat Jan 11, 2014 3:15 pm

JosDuchIt wrote:I don't find any standard describing how a .CT file generated with catcomp from a .cd file must be filled in

To begin with: in the .CT file i find
## version $VER: XX.catalog XX.XX (XX.XX.20XX)
## codeset X
## language X

the cd file has a version string, if this is the one i should use , why doesn't catcomp fills in that version?
...

i think the standard should be to use the version number and start with revision 0. so if the cd file has v3.11 and wou do the vers first version of the ct file i would either start with "3.0" or use the same version "3.11" as the cd file.

regarding your errors - i'd first fill in the XXX's and then try again (language and codeset - maybe "french" and "0")

regards...
michael
Michael Merkel :lol:
(Member of Amiga Freunde Pfalz)
User avatar
MichaelMerkel
Beta Tester
Beta Tester
 
Posts: 312
Joined: Mon Dec 20, 2010 3:08 pm
Location: Germany

Re: Catcheck

Postby JosDuchIt » Sat Jan 11, 2014 5:11 pm

@Michael

I made the modifications
## version $VER: KeymapSwitcher_docky_FR.catalog 1.1 (27.11.2013)
## codeset 0
## language french

then
>catcheck KeyMapSwitcher_docky.cd KeyMapSwitcher_docky_FR.ct
and got the same results :(

catcheck is asking for a catalog, but i have no new catalog, only the previous one generated from the previous french .ct file
I don't see why catcheck asks for it all the info is in the new .cd and .ct files ???
JosDuchIt
 
Posts: 280
Joined: Sun Jun 26, 2011 6:47 pm

Re: Catcheck

Postby nbache » Sun Jan 12, 2014 4:18 am

@JosDuchIt:

You should use the same major version as the cd file, then start the revision of your specific ct file from .1 within that. (Never use 0, neither in version nor in revision. Everything starts at 1.) So in your case, I'd give the first revision of your ct file 1.1 (which happens to be the same as the .cd one in this case).

The catalog name (which you have made KeymapSwitcher_docky_FR.catalog) usually has the same first part as the cd file, i.e. don't add the _FR. It wouldn't make sense if the catalogs had different filenames for different languages, the idea is that the program can ask Locale to load it by a common name without knowing which language the user has set, and then Locale finds the correct file down in the relevant language subdirectory of the catalogs dir.

The codeset numbers can be found in the file SYS:L/CharSets/character_sets, search for the string "MIBenum" and find the charset you want, then use that MIBenum. Latin-1 (ISO-8859-1) is 0, Latin-9 (ISO-8859-15, which you want if you would like to use the euro symbol, is 111).

Language is the name of your language; this name should always be in english in OS4 (contrary to the old standard in OS3.x and before).

The rest of your errors are probably just consequential errors because of the above ones.

And finally: In your Documentation drawer you should be able to find more information about the OS4 Locale subsystem than you will ever want (:-D) in the following files:

Charsets.doc
Fonts.doc
Keyboards.doc
Keymaps.doc

There's also a doc file for Catcomp somewhere in the SDK, I believe, but right now I can't find it. There's a small example of localizing a HelloWorld program, though, which can also help.

Oh, BTW, Catcheck is for checking all three files (cd, ct and catalog) against each other, once you have produced the final catalog with CatComp. So you first translate your ct, then compile it against the cd to produce a catalog, and finally you can check the lot with Catcheck.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1189
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: Catcheck

Postby JosDuchIt » Sun Jan 12, 2014 11:35 am

@nbache, very clear thank you

catcomp.doc is in SDK:Documentation/Tlls/locale

and that was i think all i needed ( edit: but it was not see below)

SDK:Examples/CatComp/ is usefull too
Last edited by JosDuchIt on Sun Jan 12, 2014 5:32 pm, edited 2 times in total.
JosDuchIt
 
Posts: 280
Joined: Sun Jun 26, 2011 6:47 pm

Re: Catcheck

Postby JosDuchIt » Sun Jan 12, 2014 1:10 pm

I tried to produce a newer .ct file from an older doing
catcomp NewApp.cd OldApp.ct CTFILE NewApp.ct //NewApp.ct does not exist
eg


9.Stock:KeyMapSwitcher> catcomp KeymapSwitcher_docky.cd KeymapSwitcher_docky_IT.ct CTFILE KMSIT.ct
WARNING: string for token 'MSG_DOCKY_POPUP' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 18
WARNING: string for token 'MSG_OK_GAD' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 30
WARNING: string for token 'MSG_PREFS_TITLE_KEYMAP' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 58
WARNING: string for token 'MSG_COMMODITY_HK1' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 90
9.Stock:KeyMapSwitcher>


That looked promising , a KMSIT.ct file was created, but :( it did not contain the italian translation of KeymapSwitcher_docky_IT.ct in fact
.Stock:KeyMapSwitcher> catcomp KeymapSwitcher_docky.cd CTFILE KMS2IT.ct produces exactly the same .ct file file

I tried also
9.Stock:KeyMapSwitcher> catcomp KeymapSwitcher_docky.cd CTFILE KeymapSwitcher_docky_IT.ct KMSIT4.ct
ERROR: objet non trouvé
//No KMSIT4 file was created
9.Stock:KeyMapSwitcher> catcomp KeymapSwitcher_docky.cd CTFILE KMSIT5.ct KeymapSwitcher_docky_IT.ct
WARNING: string for token 'MSG_DOCKY_POPUP' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 18
WARNING: string for token 'MSG_OK_GAD' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 30
WARNING: string for token 'MSG_PREFS_TITLE_KEYMAP' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 58
WARNING: string for token 'MSG_COMMODITY_HK1' matches string in descriptor
file 'KeymapSwitcher_docky_IT.ct' line 90
// an "empty" KMSIT5.ct file was created
9.Stock:KeyMapSwitcher> n '




What would the correct command be? (as this obviously seems to be the problem ?

From catcomp.doc

CTFILE/K Specifies the name of the catalog translation file to produce.
This option only requires a catalog descriptor file be provided, then the catalog translation file will be blank.
When you also specified a source translation file, the version string, language, codeset and strings of the source translation file will be copied to the new translation file.

How???
JosDuchIt
 
Posts: 280
Joined: Sun Jun 26, 2011 6:47 pm

Re: Catcheck &Catcomp

Postby nbache » Mon Jan 13, 2014 1:33 am

That's strange, it works for me here for ages.

I use the command like this (after renaming my previous .cd and .ct files to "example.cdx" and "example.ctx" and copying the new .cd file to "example.cd"):

Catcomp example.cd example.ctx CTFILE example.ct COMMENTS

- and that gives me the updated .ct file with all my old translations (those that are still used, at least) and with the English versions as comments below each translated one (highly recommended always; that's the COMMENTS switch).

Do you have the latest Catcomp, the one matching your documentation? Maybe an old one is lurking somewhere in the path? Try doing a "Which Catcomp all" to check that.

Or have you simply forgotten to copy the new .cd file into the directory?

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1189
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: Catcheck &Catcomp

Postby JosDuchIt » Mon Jan 13, 2014 10:25 am

@nbache
I do note you add a COMMENTS line
, which i did not use, i'll try that
Edit:
i did find out i was using an old version of catcomp sitting in sys:utilities V 53.1 of the SDK works as mentioned, it does not even need the COMMENTS argument


Could you also post the commandline(s) you use most for catcheck ?
The doc's template and the real one are not identical
CATNAME/M,CDDIR,CTDIR,CATDIR,ALL/S,STATUS/K,DUMPSTRING/K,DUMP/S,DUMPCT/K:n (doc ) versus
CATNAME/M,CDDIR,CTDIR,CATDIR,ALL/S,CD/K,CT/K,CATALOG=CAT/K,STATUS/K,FAILEDONLY/S,DUMPSTRING/K,DUMP/S,DUMPCT/K: (real)
and the doc gives a number of examples (not specifying a dir) that just don't work
The one which i think i should use to be sure (all files in current directory)

catcheck example CD example.ct CT example.ct CAT example.catalog
did crash

OK it seems that it has to be

catcheck CD eample.cd CT example.ct CAT example.catalog


Thanks for your help
JosDuchIt
 
Posts: 280
Joined: Sun Jun 26, 2011 6:47 pm

Re: Catcheck &Catcomp

Postby nbache » Tue Jan 14, 2014 1:13 am

JosDuchIt wrote:@nbache

i did find out i was using an old version of catcomp sitting in sys:utilities
Ah! Good.

V 53.1 of the SDK works as mentioned, it does not even need the COMMENTS argument
Correct, the COMMENTS argument is just what I always use and recommend, because it leaves the original texts in the .ct as comments, so it's easier to see what you translate.

Could you also post the commandline(s) you use most for catcheck ?
[...]
OK it seems that it has to be

catcheck CD eample.cd CT example.ct CAT example.catalog
Yep, that's correct (well, except for the missing x in the first filename ;-)). If all three files have the same basename (the part before the "."), you should also be able just to use "Catcheck example".

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1189
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: Catcheck &Catcomp

Postby JosDuchIt » Sat Jan 18, 2014 12:24 pm

I am trying to use catcheck from a script and a Gui4Cli gui. I is isnot easy as often catcheck givzes an error code of 10, while also pointing to usefull info

Amiga OS 4:S/ARexx> Catcheck CD BetterString_mcp.cd
BetterString_mcp.cd: BetterString_mcp.cd: objet non trouvé
: : l'objet est de type incorrect
: : l'objet est de type incorrect
BetterString_mcp (): Description load error. Translation load error. Catalog load error.
8.Amiga OS 4:S/ARexx>

and i do want
- to present that info to the user directly not being interrupted by the "error"
- being able to take script action in function of the obtained error inf, so seing it only in a sheel is not sufficient.

I came up with the code below
launched from CLI
REXX:>RX LaunchCatcheck.rexx
Code: Select all

/* LaunchCatcheck.rexx  launch */
OPTIONS RESULTS
OPTIONS FAILAT 20
ADDRESS COMMAND
say "hello"
Catcheck CD 'sys:Locale/catalogs/BetterString_mcp.cd'  > 'env:.Local_CatCheckResult'

/* 'Notepad env:.Local_CatCheckResult' * / *  resulted in lines t  0 \n Commande Inconnue. Notepad was opened the file existed in env; but the file was not loaded in Notepad */
/* Notepad 'env:.Local_CatCheckResult' * / * idem */



It would be nice if catcheck was not that touchy, but i wouldlbe glad with a solution to the above script
JosDuchIt
 
Posts: 280
Joined: Sun Jun 26, 2011 6:47 pm

Next

Return to Localization

Who is online

Users browsing this forum: No registered users and 1 guest