- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我用Delphi 6制作了一个应用程序。之后,我提取了一个 .pot 文件,其中包含所有要翻译的字符串。问题是有些字符串不需要翻译,如果翻译就会产生问题。
其中之一是 TDBGrid.Columns[x].FiedlName
我尝试将这些行放入 ggexclude.cfg 文件中,但它们不起作用。
# 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
我认为问题在于 .dfm 文件中解析器不理解它们是 TColumn 对象的一部分
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
有人有解决方法吗?
我不能信任自动ignore.pot,因为有些字符串会导致误报。
最佳答案
ggexinclude.cfg-File 的文档指出您无法访问属于集合一部分的项目:
A special case are collections in forms (like TDBGridColumns in a TDBGrid [...]) You can exclude only the whole collection, but not certain properties of a collection.
因此解决方法是排除整个列集合:
TDBGrid.Columns
但是这样你也会失去 Title.Caption。
我看到的唯一其他解决方法是修改 dxgettext。恕我直言,以下内容会很高兴:
[always-exclude-property]
FieldName
编辑:我想链接到 ggexclude.cfg 文档,但我现在无法在线找到它。因此,我可以随意发布文档,因为它保存在我自己的 ggexclude.cfg 文件中 - 但没有任何保证:
# Text in square brackets, like "[exclude-dir]", is called a "section".
# Each line that is not empty, not a comment and not a section holds
# exactly 1 "value".
# All lines below a section are scanned for values belonging to that
# section until the next section starts. You can use the same section
# several times. It will all be added up.
[exclude-dir]
# This section prevents a whole folder and all it's subfolder from being scanned.
# Each value is exactly one folder. On Windows, it's not case-sensitive.
# You can use relative or absolute paths. No wildcards allowed.
# example:
# subfolder
# these are valid values as well:
# another\folder
# another\folder\
# Windows: D:\yet\another\folder
# Linux: /home/zaphod/projects/subfolder/
# You don't have to worry about the path delimiters, both "/" and "\"
# can be used. They are converted to "/" internally
[exclude-file]
# This section prevents a whole file from being scanned.
# Each value is exactly one file. On Windows, it's not case-sensitive.
# You can use relative or absolute paths. Wildcards allowed.
# example:
# Unit4.dfm
# Using the wildcard ".*" for a file extension means that the following
# matching Delphi-files will be excluded: dfm, xfm, pas, inc, rc, dpr:
# Unit5.*
# If Unit3 is already excluded by the [exclude-dir] above, because it
# is located in a subfolder of "subfolder", listing it here therefore
# has not further effect:
# subfolder\subfolder\Unit3.dfm
# you can use absolute paths as well, like this:
# on Windows: D:\test\Unit.pas
# on Linux: /home/zaphod/projects/MainForm.*
[exclude-form-class-property]
# This section prevents a certain property of a class to
# be excluded from scanning in all forms of the folder and subfolders
# where "ggexclude.cfg" is located.
# The format for a value is "Classname.Properyname". It's not case-sensitive. No wildcards allowed.
# Classname is obvious, the propertyname has to be written the way it
# is written in the form file. If you're in doubt about how a certain property
# has to be stored here, just copy and paste the line from the DFM file here and
# put the classname before that.
# For simple strings the property name is one word:
# TLabel.Caption
# ...and for TStrings it's like this:
# TListbox.Items.Strings
# TMemo.Lines.Strings
# TQuery.SQL.Strings
# TEdit is listed in the [exclude-form-class]-section below which means
# that the whole class will be excluded. Listing TEdit.Text here therefore
# has no further effect
# TEdit.Text
# A special case are collections in forms (like TDBGridColumns in a TDBGrid,
# TParams in a TQuery or TActionManager.ActionBars). You can exclude only
# the whole collection, but not certain properties of a collection. That
# means as well that in the case of nested collections (see TActionManager.ActionBars
# in the sample unit "nestedcollections.dfm"), everything that appears below
# the collection with the highest level will be ignored.
# Note that some collections are saved with another name than their propertyname.
# For example: "TQuery.Params" will be saved as "ParamData" in the form file.
# TQuery.ParamData
# TDBGrid.Columns
# TActionManager.ActionBars
# these lines won't work:
# TDBGrid.Columns.Title.Caption
# TActionManager.ActionBars.ContextItems
# ("ContextItems" is a nested collection, which can hold another nested collection and so on)
[exclude-form-class]
# This section prevents a whole class to
# be excluded from scanning in all forms of the folder and subfolders
# where "ggexclude.cfg" is located.
# The format for a value is just "Classname". It's not case-sensitive.
# A wildcard "*" can be used optionally.
# A special case are collections, see [exclude-form-class-property] for that
# Here, everything of TEdit in DFM/XFM-files will be ignored. Remember:
# other classes derived from TEdit have to listed seperatly in order to
# exclude their properties as well. Inheritance is not recognized by dxgettext:
# TEdit
# Visual containers like TPanel or TScrollbox have to be treated slightly different.
# If you have a TPanel with a TLabel on it, writing "TPanel" would only
# exclude the properties of TPanel itself. If you want to exclude
# everything contained in a TPanel, use the wildcard "*" at the end, like this:
# TPanel*
# The following only excludes the properties of TScrollbox itself, but not the controls
# contained in Scrollboxes (except other classes explicitly listed here, like
# TEdit above):
# TScrollbox
[exclude-form-instance]
# This section prevents a certain instance (=object) of a class in a certain form file to
# be excluded from scanning.
# Each value is exactly one file with one instance. The format is
# "filename:instancename". On Windows, the "filename" part is not
# case-sensitive. You can use relative or absolute paths.
# Note that if the instance is something like a container or menu,
# everything belonging to that will be excluded.
# Note also that a frame on a form might contain a component with the
# same name as a component on the form. They would both be excluded.
# Unit6.dfm:Popupmenu
# Unit6.dfm:Label5
关于delphi - 如何在.pot文件中排除DBGrid.Column.FieldName,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6294173/
我有一个名为“members”的数据库表。分配给成员的是一个职位。 职位 来自部门。我有 Departments,然后是那些中的 Sub-Departments 和 Sub-Departments 中
我正在尝试为 Solr 搜索应用过滤器标记 Tagging_and_excluding_Filters . 挑战在于同时应用多个标记(对于单个页面上的多个选择选项)。例如 q=mainquery&fq
我知道这个问题已经被问过很多次了,我已经尝试了所有建议,并阅读了有关不同选择器等的所有内容,但没有任何对我有用 给出以下 HTML 片段: link
是否有直接的 LINQ 语法来查找集合 B 中不存在的集合 A 的成员?在 SQL 我会写这个 SELECT A.* FROM A LEFT JOIN B ON A.ID = B.ID WHERE B
我试图排除并在现有xpath中包括以下xpath,但不太确定如何做到这一点 //exclude -> //*[@id="ires"]/ol/li[6]/div/a[1]/img //include
我有 30 个站点,我需要在其中 24 个站点上回显某些内容。我怎样才能排除其他人?该代码不起作用,因为我认为它的逻辑是假的:) $currentsite = get_bloginfo('wpurl'
我需要对目标文件夹进行检查,并检查文件是否来自今天,并且超过5kb 下面的命令根据使用今天的日期存在的文件来提供bool值,但是我还要添加-gt5kb之类的排除项 我尝试使用-Exlcude,但不确定
我编入索引的Elasticsearch文档包含许多字段。我一直在使用match_all查询来获取结果。我想从match_all中排除一些字段,这可能吗? 最佳答案 在Elasticsearch中,您可
我正在为我的 DAO 编写一些测试,因为很多测试使用保存到我的数据库中的测试对象,所以我使用注释 @Before 和 @Before 创建了 setup() 和teardown() 方法@After
我编写了一个程序来解决以下问题: Implement a diffusion limited aggregation simulation on a toroid plane where seeds
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
很多时候我必须运行这个查询: select * from users where name is not null and name != '' 有没有更好的方法来做到这一点。我需要更多的性能,任何建
如果检测到某个操作系统,是否有一种简单的方法可以排除某些代码? 我设计了一个运行良好的网站(它是一个 sidescroller),当使用滚轮(向上/向下)时,它会左右滚动。但是,如果您使用的是 Mac
我应该如何排除“IN”子句中的值? $Graduates = "45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,6
很明显,如果一个 Mysql 表的全文索引包含一个出现在 50% 的数据行中的关键字,该关键字将被匹配查询忽略 因此,如果我有一个包含 50 个条目的全文索引“content”的表其中 27 个条目在
我有下面的循环。 我需要提取所有不包含字母 p 的名称 (lskey),但我的尝试不起作用。 for(var i = 0; i "); } } 如果有人能回答,我将不胜感激。 最佳答案 如此接
我正在尝试查找 FTP 服务器上根目录的总大小。但是,我无权访问根目录中的其中一个目录。 我想用这个函数对根目录的大小求和: size = 0 for filename in ftp.nlst("."
我有以下正则表达式来匹配 html 链接: 有点效果。除了不是真的。因为它在 编辑: 这将使它只抓取引号而不是 之后的所有内容 最佳答案 我认为您的正则表达式没有按照您的意愿行事。 这会非贪婪地捕
我在提出异常方面遇到困难,例如: import csv o = open('/home/foo/dummy.csv', 'r') # Empty file! reader = csv.reader(o
关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。 这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topi
我是一名优秀的程序员,十分优秀!