Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #13 from DinosaurDad/master

Support for .h files, and support for UIBarButtonItem customView
  • Loading branch information...
commit d163573aaf886814e6145c51ff9ebf228fd7a831 2 parents ff35139 + fe0ff72
@wbyoung wbyoung authored
View
4 Framework/Scripts/actions/create
@@ -95,7 +95,7 @@ def create_strings(config):
if os.path.exists(source):
sources.append(source)
for file in os.listdir(source):
- if file.endswith('.m'):
+ if file.endswith('.m') or file.endswith('.h'):
mod = os.path.getmtime(os.path.join(source, file))
if not latest or mod > latest: latest = mod
@@ -107,7 +107,7 @@ def create_strings(config):
sys.stdout.write('Generating %s strings for source files\n' % (config.lang,))
if not os.path.exists(resources): os.mkdir(resources)
localizable.ensure_dir()
- find_args = [ 'find' ] + sources + [ '-name', '*.m', '-print0', ]
+ find_args = [ 'find' ] + sources + [ '-name', '*.m', '-or', '-name', '*.h', '-print0', ]
find_results = subprocess.check_output(find_args).split("\0")
genstrings_args = [ 'genstrings', '-s', LOCALIZE_SYMBOL, '-o', os.path.dirname(localizable.path()) ] + find_results
subprocess.check_output(genstrings_args)
View
4 Framework/Source/iOS/FRUIAutomaticLocalization.m
@@ -261,6 +261,10 @@ - (void)localizeObject:(id)object {
// localize subviews
[self localizeObject:[localizeSubviews allObjects]];
}
+ else if ([object isKindOfClass:[UIBarButtonItem class]]) {
+ [self localizeTitle:object];
+ [self localizeObject:[object customView]];
+ }
else if ([object isKindOfClass:[UIBarItem class]]) {
[self localizeTitle:object];
}
Please sign in to comment.
Something went wrong with that request. Please try again.