Searching For String Literals

前端 未结 6 1073
情书的邮戳
情书的邮戳 2020-12-09 17:21

In the quest for localization I need to find all the string literals littered amongst our source code. I was looking for a way to script this into a post-modification source

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 17:49

    To find all Text="textonly" instances use the following Regular Expression when searching:

    (Text=)(")([a-z])
    

    This is help for finding Text="*" but excluding text that's already been converted to use resource files:

    Text="<%$ Resources:LocalizedText, KeyNameFromResourceFile%>"
    

    Also (>)([a-z]) can be used to find literals between tags like so:

    HeaderText

提交回复
热议问题