This file contains hidden or 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
#!/bin/bash | |
# Thom Ritterfeld 2016 | |
# This script is intended to use inside an Xcode project's build steps. It creates a InfoPlist.strings file that are used by the system to localize Info.plist values. | |
# Define localize keys values, the values are the ones that need to be placed inside InfoPlist.strings. | |
# For example in Localizable.strings you defined: "location_in_use_desc" = "we want to know where you work"; | |
# This script will add "NSLocationWhenInUseUsageDescription" = "we want to know where you work"; into InfoPlist.strings. | |
# To define these keys define the key of Localizable.strings into localizable_keys and the key for InfoPlist.strings into info_plist_keys. | |
# Use the same positions, because of lack of good dictionary support. For the sample: | |
# declare -a localizable_keys=("location_in_use_desc") |
This file contains hidden or 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
def _operations_list_to_string(self,operations): | |
""" (list | str) -> str | |
The function returns a plain string of the inner lists | |
>>> _operations_list_to_string(['a','+',[['b','+','d'],'*','c']]) | |
'(a+((b+d)*c))' | |
""" | |
if type(operations) == list: | |
result = '(' | |
for operation in operations: |