Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Customized Macro? #21

Open
coneybeare opened this issue Mar 11, 2014 · 10 comments
Open

Customized Macro? #21

coneybeare opened this issue Mar 11, 2014 · 10 comments

Comments

@coneybeare
Copy link

I use a special macro which has the same argument order as NSLocalizedString(key, comment)... how can I tell Lin to use my custom macro (_ls(key, comment)) instead?

@jasonhotsauce
Copy link
Contributor

@coneybeare Yeah, it's a very useful feature request.

@amarcadet
Copy link

+1 for that feature

Would be great to have a way to configure custom macros that be recognized along with standard NSLocalizedString* macros.

@jasonhotsauce
Copy link
Contributor

I will try to make this feature this weekend.

@jasonhotsauce
Copy link
Contributor

I created this feature in my fork. But not sure if it fits your needs. It basically asks you to input your own regx to detect the command. Maybe it's not so convenient to some of you. So please let me know how you think it should work. @amarcadet @coneybeare

@coneybeare
Copy link
Author

Couldn't you just do it as a defaults write command?

@jasonhotsauce
Copy link
Contributor

Explain more please? What do you mean by defaults write?

@coneybeare
Copy link
Author

You can use the defaults command line tool in terminal to set any NSUserDefaults item. Why not just set the macro string that way, then you read it in the plugin?

On Tue, Mar 25, 2014 at 8:58 AM, Wenbin Zhang [email protected]
wrote:

Explain more please? What do you mean by defaults write?

Reply to this email directly or view it on GitHub:
#21 (comment)

@jasonhotsauce
Copy link
Contributor

I prefer to have it as part of the plugin so you don't actually have to leave Xcode and use command line tool. I created UI to allow you to input macro string regx and store that in NSUserDefaults. That's the basic idea. But now I think not everybody is very familiar with regx and it might not be very convenient? Or maybe I think too much.

@jasonhotsauce
Copy link
Contributor

@coneybeare You can try it out from my fork? And also maybe you might come up with some better ideas.

@coneybeare
Copy link
Author

I won't be able to for a few weeks. I really think anybody who works with Xcode will be comfortable on the command line, so my idea is to just let somebody edit it that way. It seems the easiest to maintain

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants