Am Monday 06 August 2012 22:57:42 schrieb Martin:
> On 06/08/2012 21:39, Rainer Stratmann wrote
>
> > Can you explain it more?
> > I want not search through the sourcecode, because it makes it less easy.
>
> How does an address like $040012a help you find the source?

If I have a list with all caller adresses then I know which one was already 
called and I can faster search this if only handle the adress (speed reason).

> > All I need is all caller adresses of p1 in the program.
> > Or an incremented counter at compiletime.
> > Both seems impossible by now.
> >
> > If p1 is called then I can see which snippet was not yet called.
> > If the compilerincremented counter at the end is 500, then I need 500
> > snippet entries and I can see which entry already was called by the
> > program during execution.
>
> I am still trying to understand what exactly you try to archive.

I am sure you mean achieve :-)

> What I understand sofar:
>
> -  your program has a fixed amount of text snippets in a given language
yes
>    QUESTION: are those snippets unique? Or can there be 2 individual
> snippets, that have the same text, but must be treated as different?
both, I will able to handle it p1, p_unique, and so on.
> -  you want to implement a method that translates them
yes
> - you want to ensure this method was called exactly (or is it at least?)
> once, for each snippet.
No.
I want to register a call.
I (fast) search through the adress-table every time. If the adress is in the 
table then I have already the translated pchar at array nr x. If not I have 
to translate the string and add the caller adress to the table and the pchar 
to the translated string.
Further on I can do with the table and string snippets what I want. If I have 
an Idea in the future I can implement. For example adding date and time of 
changes and so on.
>
> For some reason that I do not understand yet, you need a unique
> identifier for each snippet.
> Well if the text of the snippets is unique, then you can use the text
> itself.
> So instead of using $040012a as token, you can use 'hello world'
see above.
>
> ----------
> That is, I still do not see, why you go this way at all.
> You must have a list of all translations somewhere, and somehow you
> translate each snippet.
I want the text to stay in the sourcecode and not want to have some kind of 
excel-list.
> For updating translations, you can 
> 1) add each snippet that has no translation to a list
> 2) mark each translation, once it was used, and when the app finishes
> list all translations that where not used.
For that I have to call every s() in the program, because I do not have a 
fixed list.
To know if every s() in the program was called it would be good to know every 
presence of s().
I tried also a kind of excel list with unique identifyer for each snippet, but 
for me it seems not flexible enough and much work instead of putting s() 
around every snippet.
>
> ---
> Or explain again what you try to do?
The translation should be done by a web based interface from the inhabitant of 
every country (simplicity, less work for me). So I need a registration and I 
need to be flexible. Snippets can change, and so on. It would be good to save  
the older snippets if one has changed... All this can be implemented. Date & 
Timestamp...
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to