nek023 / Lin

Xcode plugin that provides auto-completion for NSLocalizedString.
http://questbe.at/lin/
MIT License
1.23k stars 97 forks source link

Support for all NSLocalizedString macros #17

Closed westfeld closed 9 years ago

westfeld commented 11 years ago

In NSBundle.h there are more macros defined for the handling of localized strings:

#define NSLocalizedString(key, comment) \
            [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]
#define NSLocalizedStringFromTable(key, tbl, comment) \
            [[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:(tbl)]
#define NSLocalizedStringFromTableInBundle(key, tbl, bundle, comment) \
            [bundle localizedStringForKey:(key) value:@"" table:(tbl)]
#define NSLocalizedStringWithDefaultValue(key, tbl, bundle, val, comment) \
            [bundle localizedStringForKey:(key) value:(val) table:(tbl)]

The feature request would be to expand this plugin to support the following:

hsarret commented 11 years ago

I will do that, will let you know

hsarret commented 11 years ago

Done, will be available as soon as @questbeat reviewed and hopefully accepted pull request

hsarret commented 11 years ago

Available, please pull @westfeld and let us know if it's ok for you

hsarret commented 11 years ago

Is it working @westfeld ? Cheers

westfeld commented 11 years ago

Thanks for your quick reply. I tested the modifications and it is now responding to the other macros as well, however what I am observing is the following:

I have a workspace with different projects in it. If I start typing NSLocalizedStringFromTableInBundle it gives me a wrong list in the pop up:

  1. all .strings files in the whole workspace from all projects are parsed and displayed
  2. the table, which is basically the name of the .strings file, is not respected by the completion macro.

P.S: I have the option "Parse .strings files outside project's path" turned off