Issue is : i have bunch of catalog files for which i do not have .ct files. I then add new entry in the main .CD file, and to have that new entry be visibly at all on all supported locales, i need to regenerate all catalog files or users on those locales which didn't have regenerated locale will see nothing new (right?)
Is there any way how to made .CT file if you have only .CD and .CATALOG file of some language ? (so to use that generated .CT file later to generate new catalogs with new entries being in english till transaltors will not translate it to their language)
I use latest FlexCat, and as far as i can see it has NEWCTFILE option, but that one seems about create default version from which all translation then come. But what i need, is to generate from .catalog a .ct file (so with translated entries) and then add my new one to regenerate catalogs as they was, just with new enry.
I simply use "catcomp <name>.cd CTFILE <name>.ct".
Obviously, the .cd is all in English.
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
@Rigo Issue is not to create simple (plain) .Ct file full of english entries. Point is to re-create .CT file from catalogs which is full of language's specific tranlations, so i have .CT with all translated stuff, and i add there just new entry in english and generate catalog, until native language speakers rebuild it (if ever) for their language. So catalog have all translations as before + new entry.
If, of course, new entry will not showups automatically in english even if language's catalog have nothing about ?
If, of course, new entry will not showups automatically in english even if language's catalog have nothing about ?
It depends of where exactly you add that new strings .. if you add them "in the middle" of the cd, this may create problem disordering the old and not-updated translations .. but if instead you add that new strings at the end of your cd file, then not-updated translation will end to use English for the missing strings
So if you are not sure to have all translation always updated, the suggest is to add every new strings always at the end of your .cd file
Using simplecat (GUI) seems easy. 1)Launch "SimpleCat GUI" 2)Import owb.cd 3)Import owb.catalog (maybe you can "add" all catalogs at once) 4)Export .CT of every language (previously imported in 3)
So if you are not sure to have all translation always updated, the suggest is to add every new strings always at the end of your .cd file
MUCH more than just a suggestion. You MUST add all new strings at the end (unless you handle the numbers explicitly with assigned numbers to all strings in the .cd file).
If you add anything in the middle, you WILL create havoc and chaos for all users of translations, until their translations have been updated to match.
@Javier Sadly seems both "simplecat" and "ctlg2ct" are amigaos code, and i can't just compile them as it to be used on cross-compiler.. Maybe flexcat can do the same (flexcat can be used on crosscompiler)
@nbache, samo79
That what i fear of :( Imagine i have odyssey.cd , which structured well. Then i start adding things more and more, and instead of .CD be structured the same logical and well as before, i will have needs add everything at bottom, that pretty bad looking.
Instead, if i will create from all the .catalogs new .ct files , and insert in all of them manually in the middle new string and recompile new catalogs, everything will works as expected, structured well, and translators later can use new .ct to translate new/remaining stuff which will be not at the end. Correct ?
Yep, because at the end every .ct files that will generate a final .catalog need to be passed from the original catalog descriptor (the .cd) If you add things in the middle of your .cd file (or in any place different than the last line) and then recompile old translation files with it, you cannot expect that final catalog translations will work correctly
So, or you add everything at the end of the .cd, less elegant but pretty functional. Or, in case you don't have specific translators that will co-work with you, just add manually that new strings on your own, by putting into each of that .ct files an english string as placehover
Aniway i can work on the italian translation of owb pretty fast, i'm sure also spanish, french, german etc could have a fast mantainer, problem may be with more "esotic" languages
If you add things in the middle of your .cd file (or in any place different than the last line) and then recompile old translation files with it, you cannot expect that final catalog translations will work correctly
If i will have all the .ct files generated from current catalogs, in which i manually (or by flexcat, if it can do that kind of merging) add on the same places as in CD file new entryies, and then recompile catalogs : i expect that final catalog will works correctly of course.
Quote:
Or, in case you don't have specific translators that will co-work with you, just add manually that new strings on your own, by putting into each of that .ct files an english string as placehover
Yes, that exactly what i want to do. Sure, i will need for every new entry change not only .cd , but all the .ct files i generate back from catalogs, but then everything will looks clean and structured well.
Quote:
Aniway i can work on the italian translation of owb pretty fast, i'm sure also spanish, french, german etc could have a fast mantainer, problem may be with more "esotic" languages
I need to be independent from all those waits based on who and how fast or not translate anything. That why i want to do it all like i describe, so when any translator will have time or interest, then they can update new .ct/.catalogs and send me back. But at least by the way i want to do, i will not worry about at all, and no problems with releases because someone need time to finish translations.
Just add them at bottom, you can add comments, example: owb.cd ... MSG_WEBVIEW_INTERRUPT_SCRIPT (//) Do you want to interrupt processing of the current script? ; MSG_WEBVIEW_JSACTION_TITLE (//) Javascript Alert ; ; new strings odyssey (2020.04.11) ;contextmenu strings MSG_CTXMENU_blabla (//) blahblah ... ; ;error strings MSG_ERROR_blehbleh (//) blehbleh ... ; ; misc strings MSG_MISC_bluhbluh (//) bluhbluh
So when you add them to odyssey sources and compile, when no updated catalog/translation exists then it will show those "blahblah, blehbleh..." You don't need to add them to .CT, translator should take care of it by using catcomp,flexcat,... or manually.
@Jabirulo Point is exactly about adding to the middle, and update all .ct files (which generate from catalogs). Because i do not want to mess original .CD file which structured well, by adding at bottom new stuff, which by logic should be somewhere in the middle.
For example i need to add few entres in Media prefs, so OWB.cd has tasty structured block for it in the middle. Then i want to add something else, etc ,etc. Imagine, normal previously file, start to be added at bottom with all sort of different messages, only because it's easer.
The best way there to generate .CT files from all catalogs, and add entry in the part i need in CD and in all new .CT files, and regenerate catalogs. Sure, that more boring, but in end all will looks cleaner. Also i will put .CT files to release version as well, so will be easer to handle by translators based on them, and not on some private .CT files only they has.
You can add in the middle, but as Niels pointed, it can "break" translations and show in odyssey the wrong string, 'cos you put in .CT in the wrong position by mistake.
So better and safer is to put at bottom with a comment where such string belongs. You "shouldn't" test/check if compiled catalog will be ok or not (it's job of the translator). Yes it's more work, but cleaner and won't break existing translation in case no one will update it.
And it can even crash the program in case translation buffer overflows or too loong for gadget X and is just the non/bad translation/catalog.
You mean it less work, not more. Because addint at bottom are easy, and i not need to regenerate .CT files and create new catalogs.
More work if i go my way by adding in the middle, then i need to create CT files and put everywhere all correctly (no mistake allowed there, eys), and regenerate catalogs.
Quote:
but cleaner
You mean not cleaner, but safer in case of mistake.
Quote:
and won't break existing translation in case no one will update it.
If i generate .CT files from catalogs, and then put all _correctly_ to all the same places as with .cd file, then all should be fine then ? More work and need to be carefull for sure..
Dunno, all that start to smeel like crap :) Never liked those boring and overcomplecated things with translations :)
@jabirulo "catmaker" are part of Ambient: just separate .c file which i build with no probs on cross compiler too and tested with odyssey and new entries - all fine.
/* a bit copy'n'paste from includes/macros/vapor.h, first 2
* don't work on empty lists
*/
#define FIRSTNODE(l) ((void *)(l)->head)
#define NEXTNODE(n) ((void *)((struct node *)n)->succ)
v = strtoul( bf, (char **)&endp, 16 );
if( endp != &bf[ 2 ] )
{
fprintf( stderr, "invalid hex number in line %d: %s\n", linecnt, p - 4 );
exit( 20 );
}
if( !v )
v = 0xff;
*d++ = v;
break;
case '0':
case '1':
case '2':
case '3': /* 255 in octal is 377, so first digit can only be 0-3. */
bf[ 0 ] = c;
bf[ 1 ] = *p++;
bf[ 2 ] = *p++;
bf[ 3 ] = '\0';
v = strtoul( bf, (char **)&endp, 8 );
if( endp != &bf[ 3 ] || v > 255 )
{
fprintf( stderr, "invalid octal number in line %d: %s\n", linecnt, p - 4 );
exit( 20 );
}
if( !v )
v = 0xff;
*d++ = v;
break;
default:
fprintf( stderr, "unknown format code in line %d: %s\n", linecnt, p - 2 );
exit( 20 );
}
else
{
*d++ = c;
}
}
*d = '\0';
Dunno, all that start to smeel like crap :) Never liked those boring and overcomplecated things with translations :)
Come on mate is not that complicated :) There are max 7-8 unmantained catalogs in owb, even if you will end to add strings manually to them it's no more than 5 minutes of extra work ... i don't think you will add new strings so often right ?
Aniway, later we can even decide to switch to Transifex, other projects like MUI or YAM prove its efficiency when many translations are involved and not all still mantained at the same level ;)