I've used dxgetttext with Delphi for several years, and it's been a real boon. But there is one parser function in ggdxgettext that really needs to be added. Consider this very common sort of code:
type
TValueDisplayFormat = (dfDecimal, dfHex, dfBinary);
const
ValueDisplayFormatNames: Array[TValueDisplayFormat] of String = ('Decimal', 'Hex', 'Binary');
{...}
Label1.Caption := _(ValueDisplayFormatNames[MyObject.DisplayFormat]);
ggdxgettext recognizes that the call to _() above references something it doesn't understand and throws a warning. While having it recognize that the reference is to a defined const array would be nice, that's not necessary - the type and const declarations may be (likely are) in some other file, and keeping track of that sort of thing across files is beyond the scope of the tool. But what it absolutely should do is to capture the strings in any declared const array of strings as translatable msgid's.
We use this type of construct heavily, and I see this sort of thing all the time in other people's code. Please consider adding this to the parser!! Thanks!
I've used dxgetttext with Delphi for several years, and it's been a real boon. But there is one parser function in ggdxgettext that really needs to be added. Consider this very common sort of code:
ggdxgettext recognizes that the call to _() above references something it doesn't understand and throws a warning. While having it recognize that the reference is to a defined const array would be nice, that's not necessary - the type and const declarations may be (likely are) in some other file, and keeping track of that sort of thing across files is beyond the scope of the tool. But what it absolutely should do is to capture the strings in any declared const array of strings as translatable msgid's.
We use this type of construct heavily, and I see this sort of thing all the time in other people's code. Please consider adding this to the parser!! Thanks!