3

I am using GNU GetText for Delphi (http://dxgettext.po.dk/download https://sourceforge.net/projects/dxgettext/ with corrections for Windows 10 dxgettext and Windows 10) for extraction of translation .po files from Delphi source code (.pas and *.dfm files). Usually GetText grabs the texts from SQL queries as well, splits them into individual strings. The *.po file becomes messy and I am not sure whether translation will not be applied for the (undesirable) modification of SQL texts as well.

E.g. I am not using sole word "where" in captions in my program, but GetText extracts "where" occurences from alomst every SQL query text.

So - how can I ask GetText, that e.g. it does not extract text from TIBQuery.SelectSQL?

I am aware of the API functions like procedure TP_GlobalIgnoreClass (IgnClass:TClass);, but I guess that these functions acts only in runtime. But I would like to apply ignore to *.po file already.

TomR
  • 2,696
  • 6
  • 34
  • 87
  • 2
    You could also use a `ggexclude.cfg`, using `[exclude-form-class]` or `[exclude-form-class-property]`. See https://stackoverflow.com/a/19450949/3836111 for that files documentation. – Sebastian Proske Aug 28 '18 at 13:44
  • Where can I get more information about ggexclude.cfg? Is it some feature of dxgettext that is not mentioned in the dxgettext manual (that is quite extensive - 100 pages)? Google gives nothing. – TomR Aug 28 '18 at 15:44
  • 1
    There isn't much documentation to be found other than the in-file one that can be found in the answer I linked. It should be placed in the root folder of your generation process. IIRC you don't have to do anything else but place this file to make it work - but I'd have to check that again (can't atm) – Sebastian Proske Aug 28 '18 at 15:51
  • "It should be placed in the root folder of your generation process" - it is sufficient to know, now I can experiment further. Thanks! – TomR Aug 28 '18 at 15:52
  • Or you could grab the source code of the dxgettext tool and modify it. If you do that, I am willing to review the changes and post them to the repository (I still have write access.). The source is located here: https://sourceforge.net/p/dxgettext/code/HEAD/tree/trunk/dxgettext/dxgettext/ – dummzeuch Aug 29 '18 at 13:11

0 Answers0