I made an application with Delphi 6. After that I extracted a .pot file with all the strings to translate. The problem is that there are strings that don't have to be tranlated, and if translated will generate problems.
Une of this is TDBGrid.Columns[x].FiedlName
I tryed to put this lines into the ggexclude.cfg file, but they doesn't work.
# exclude all occurences of the specified class
# and property in all DFM files in or below the
# path where "ggexclude.cfg" is in
[exclude-form-class-property]
TDBGrid......FieldName
TDBGrid.....FieldName
TDBGrid....FieldName
TDBGrid...FieldName
TDBGrid..FieldName
TDBGrid.FieldName
item.FieldName
TDBGrid.Columns.FieldName
TDBGrid.Columns.TDBGridColumns
TDBGrid.Columns.TDBGridColumns.FieldName
TDBGrid.Columns.Item.FieldName
TColumn.FieldName
TDBGridColumns.FieldName
FieldName
*.FieldName
I think that the problem is that within the .dfm file the parser doesn´t understand that they are part of a TColumn object
inherited DBGTable: TDBGrid
Height = 309
DataSource = DMUsers.DSUser
Columns = <
item
Expanded = False
FieldName = 'USER'
Visible = True
end
item
Expanded = False
FieldName = 'CODE'
Width = 31
Visible = True
end
item
Expanded = False
FieldName = 'NAME'
Width = 244
Visible = True
end>
end
Does anybody have a workarround?
I can't trust the automatic ignore.pot, because there are some strings that cause false possitives.
The documentation to the ggexclude.cfg-File states that you cannot access items, that are part of a collection:
So the workaround would be to exclude the whole Columns-Collection:
But this way you will lose Title.Caption too.
The only other workaround I see, would be to modify dxgettext. The following would be nice to have IMHO:
Edit: I wanted to link to the ggexclude.cfg-documentation, but I cannot find it online right now. So I feel free to post the documentation as it is saved in my own ggexclude.cfg-file - but without any guarantee:
You should probably try running
Then open up the autogenignore.po and find the special way it has declared all your fieldname excludes (Thats the job of msgmkignore). Every time you auto-generate it you then have to review the auto-generated exclusion rules. It seems you're trying to generate all your exclusion rules by hand. It looks to me like you'd be better off taking the auto-generated includes and reviewing them by hand to exclude all the database field names and column names.
You obviously can't hand the entire job of "ignores" to the msgmkignore tool, as you state in your question, but you can use your brain, plus this tool, and combine those results.