Skip to content

Instantly share code, notes, and snippets.

@shyang
Created May 5, 2012 17:25
Show Gist options
  • Save shyang/2604183 to your computer and use it in GitHub Desktop.
Save shyang/2604183 to your computer and use it in GitHub Desktop.
Get the localized strings of "Current Location" used by Google Maps on iOS
#! /usr/bin/env python3
'''Get the localized strings of "Current Location" used by Google Maps on iOS'''
# cd /private/var/stash/Applications/Weather.app
# find . -name Localizable.strings -exec plutil -convert json "{}" \;
# find . -name Localizable.strings | xargs python3 currentLocations.py
import sys
import json
import re
for f in sys.argv[1:]:
lang = re.findall('/([^/]*)\.lproj', f)[0]
with open(f) as fp:
d = json.load(fp)
print('"Current_Location" = "' + d['Current_Location'] + '";')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment