Open PatrizioG opened 1 year ago
see https://github.com/perpetualKid/GetText.NET/wiki/Extractor-Intro last chapter
The Extractor will automatically export all literal string assignments from .Text/HeaderText/ToolTipText properties, which are typically saved in the (Form1).Designer.cs files
Is the issue that the " - " string is unnecessarily extracted and stored in the .pot file?
Exactly, that's the problem. Is there a way to perform recognition of those properties only on *.Designer.cs files?
right now it's hardcoded to extract strings from any of the listed properties. While I would not like to limited extraxting these form .designer.cs files only (there are often cases in Winform development where such properties are set in regular .cs files also), I concur to make it configurable/explicit option (via extra cli parameter) whether such strings should be extracted.
Given though this is irritating but otherwise harmless, not sure if an enhancement will justify a new version to be released. Is this causing any blocking issues in your workflow?
Don't worry, is not urgent. I have currently made a workaround within the parser to check those properties only on files with the extension *.Designer.cs. Thank you for your helpfulness
@perpetualKid We have a similar problem where the Extractor extracts all Text
properties even for invisible items and so on.
Would it be possible to add some kind of attribute or other indicator that this particular control, like this toolStripLabel
, should be ignored by the Extractor? Thanks!
@perpetualKid We have a similar problem where the Extractor extracts all
Text
properties even for invisible items and so on. Would it be possible to add some kind of attribute or other indicator that this particular control, like thistoolStripLabel
, should be ignored by the Extractor? Thanks!
certainly possible, code contributions are welcome
GetText.Extractor version: 1.8.7+bff42fb416
In our code we concatenate strings in this way:
lblArtCode.Text += " - " + ds.Current.Name;
and the correct call to extract is:
localizer.TextTranslator("Correct call to my localization method");
Calling
GetText.Extractor -as TextTranslator
erroneously add the string" - "
to messages.pot