Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-01

Is there a tool to list all the string literals in your application?

9 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank Church

Is there a tool to list all the string literals in your application?

I want to list all the strings in my app and save them in a file or look up table from which I can change them or translate them to a different language if necessary.

Is there some app to do that?

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110104/7e8e6cd1/attachment.html>

Reply by email

ik
to Frank Church

On linux you have a command named "strings"

$ strings <app>

Ido

LINESIP - Opening the source for communication
http://www.linesip.com
http://www.linesip.co.il

2011/1/4 Frank Church

Show quoted text 22 lines
Is there a tool to list all the string literals in your application? I want to list all the strings in my app and save them in a file or look up table from which I can change them or translate them to a different language if necessary. Is there some app to do that? -- Frank Church ======================= http://devblog.brahmancreations.com -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110104/613170f9/attachment.html>

Reply by email

Frank Church
to ik

2011/1/4 ik

Show quoted text 7 lines
On linux you have a command named "strings" $ strings <app> Ido

Is there some Lazarus/FPC related app to do that?

I am interested in one that parses the source code rather than the executable.

Can some development related utility find all the string literals and print out their line numbers?

Show quoted text 39 lines
LINESIP - Opening the source for communication http://www.linesip.com http://www.linesip.co.il 2011/1/4 Frank Church > > Is there a tool to list all the string literals in your application? > > I want to list all the strings in my app and save them in a file or look > up table from which I can change them or translate them > to a different language if necessary. > > Is there some app to do that? > > -- > Frank Church > > ======================= > http://devblog.brahmancreations.com > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110104/81932811/attachment.html>

Reply by email

ik
to Frank Church

If you are using resourcestring, then FPC extract an rst file for that. If you wish to have all of the strings extracted, then there is none that I know of.

Ido

LINESIP - Opening the source for communication
http://www.linesip.com
http://www.linesip.co.il

2011/1/4 Frank Church

Show quoted text 76 lines
2011/1/4 ik On linux you have a command named "strings" > > $ strings <app> > > Ido > > Is there some Lazarus/FPC related app to do that? I am interested in one that parses the source code rather than the executable. Can some development related utility find all the string literals and print out their line numbers? > LINESIP - Opening the source for communication > http://www.linesip.com > http://www.linesip.co.il > > > > > 2011/1/4 Frank Church > >> >> Is there a tool to list all the string literals in your application? >> >> I want to list all the strings in my app and save them in a file or look >> up table from which I can change them or translate them >> to a different language if necessary. >> >> Is there some app to do that? >> >> -- >> Frank Church >> >> ======================= >> http://devblog.brahmancreations.com >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- Frank Church ======================= http://devblog.brahmancreations.com -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110104/59d375d4/attachment-0001.html>

Reply by email

David Emerson
to Frank Church: 2011/1/4 ik Is there some Lazarus/FPC related app to do that? I am interested in one that…
I am interested in one that parses the source code rather than the executable. Can some development related utility find all the string literals and print out their line numbers?

sed -n "/'/=" source.pas

sed -n "/'/{=;p}" source.pas

sed -n "/'/{=;s/[^']*\('[^']*'\)[^']*/||| \1 /gp}" source.pas

I could go on and on...

http://www.grymoire.com/Unix/Sed.html

Have fun. Sed is like the antithesis of elegance.

~David.

Reply by email

Martin
to Frank Church: Is there a tool to list all the string literals in your application? I want to list all…
Frank Church wrote
Is there a tool to list all the string literals in your application?

What about "code explorer"? It has a secion code observer, which has unnamed constants.
It's not only strings, true, it's other types too. But it is easy to distinguish the strings.

Also it only shows strings that are not constants. But if you have any constants, with sting data, you just need to also look at your constant sections.

Martin

Reply by email