wordpress - Sublime Text regex: replace Strings with Gettext -


I made a mistake in writing a template page in Wordpress and so I put regular string everywhere instead of Gettext call. Now I should change all the strings in these specific constructs with Gettext calls.

Example:

  displayDataRow ($$ fuelTypePacksName, 'model-tech-wheels', 'wheels'); DisplayDataRow ($$ fuelTypePacksName, 'model-tech-curb-weight', __ ('wheels', 'ager'));  

I have not learned regex yet, sorry: (

< P> It is not clear what you want to change, but the pattern to find string

  '[^'] * ' 

Therefore, if the example You want to change the "Hello World" with the GetText ("Hello World")

  Find: ('[^ '] *' Replaces: GetText (\ 1)  

Basically, thirty-five added around the pattern means "whatever your Keep it there ", and \ 1 means" replace with the first thing you got.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -