[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

Marco van de Voort marcov at stack.nl
Wed Aug 15 16:19:04 CEST 2012


In our previous episode, Rainer Stratmann said:
> > Limitations, not problems. Compared to the Delphi internal translation
> > systems. Yours has the same, by design.
> 
> Which limitations?

see below

> > If your source (main) language has a word with two meanings, how will you
> > translate to a language where there is a word for each meaning?
> 
> You mean 2 words spread over the program?

yes.

> Then I can put an additional identifier like already mentioned.
> ls( '~ID1~word' );
> ls( '~ID2~word' );
> In this case ID1 or ID2 is the identifier instead of 'word'.

> But in all cases 'word' is the result of the translation of the original 
> language.
> 
> > IIRC dxgettext has only solutions for that when you recognize this early
> > and add special code. This means that sometimes you can't simply ship a
> > translation, but also have to
> 
> In my case it can also be possible that there are not all words translated 
> yet. Then the original text is shown or englich one. The translation can be 
> made later. That is (also) an advantage.

No it can't, since if two the same texts translate to a different texts in
another language, you need to add the identifiers and rebuild,
distribute/migrate etc.

ITE doesn't have this limitation, since the fully qualified identifier is what
uniquely identifies the text, not the content. The editor has some features
so that you don't have to translate something as "settings" twice.

Moreover, ITE support widening and moving of components. (essentially
anything published in forms is editable without recompilation)
 
> > (dx)gettext also has support for stuff like multiples, textdomains. Some of
> > it is not very well supported in the editor (gorm) though.
> 
> I will use a browser as editor. So the utf8 (and unicode?) converting is
> made automatically by the browser.  I have some code for converting ascii
> <-> utf8.

What do you assume about the codepage of literals? Do you pass the right -Fc
parameters for that?
 
> > It comes with source scanner tools to harvest strings from the code.
> 
> Another step more that means more work and less easiness (less
> userfriendly).

Explain. You need to scan some way too.

How do you handle combining translations btw? (e.g. general framework and
customer specific part on top of that?)
 



More information about the fpc-pascal mailing list