Created
May 5, 2012 17:25
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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