I hereby claim:
- I am jeppeleth on github.
- I am jeppeleth (https://keybase.io/jeppeleth) on keybase.
- I have a public key ASA6DAMkGUk4G0wq8agDWO5JW5qxOJV9vfGgkGtW3gdtHwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
CMD=$1 | |
if [[ $ADB == "" ]]; then | |
ADB=adb | |
fi | |
if [[ $CMD != "on" && $CMD != "off" ]]; then | |
echo "Usage: $0 [on|off] [hhmm]" >&2 | |
exit |
from :http://www.entropy.ch/blog/Developer/2010/04/15/Git-diff-for-Localizable-strings-Files.html
First, add this to the project’s .git/info/attributes file:
*.strings diff=localizablestrings
Unfortunately you do have to add it to every project, there doesn’t seem to be a global attributes configuration file
Second, add this to your ~/.gitconfig file:
#!/bin/bash | |
sp="/-\|" | |
sc=0 | |
spin() { | |
printf "\b${sp:sc++:1}" | |
((sc==${#sp})) && sc=0 | |
} | |
endspin() { | |
printf "\r" | |
} |
#!/usr/bin/env ruby | |
# gist: https://gist.github.com/3217498 | |
# This script can be called from an Xcode 'Run Script' build phase at the | |
# beginning of the build process, like this: | |
# | |
# ${PROJECT_DIR}/LocalizeStringsFromAndroid.rb ${PROJECT_NAME} | |
# | |
# This script should be placed in the same directory as your .xcodeproj |
#!/usr/bin/ruby | |
# based on https://github.com/tmurakam/cashflow/blob/0a01ac9e0350dfb04979986444244f8daf4cb5a8/android/convertStrings.rb | |
# support comments and Converter such as "%@", "%d", "%0.1f"... | |
# in your directory : ./main.rb Localizable.strings | |
file = File.open("strings.xml", "w"); | |
file.puts "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | |
file.puts "<resources>" |
#! /usr/bin/python | |
import argparse | |
import os.path | |
import glob | |
parser = argparse.ArgumentParser( | |
formatter_class=argparse.RawDescriptionHelpFormatter, | |
description='''\ | |
Replacing values in arrays.xml with @string/ links. Generates three new files for each locale: |
import org.codehaus.groovy.runtime.StackTraceUtils | |
int[] sdksAvailable() { | |
def sdks = new ByteArrayOutputStream() | |
exec { | |
commandLine 'android', 'list' | |
standardOutput = sdks | |
} | |
sdks = sdks | |
// get the output |
#if($field.modifierStatic) | |
static ## | |
#end | |
$field.type ## | |
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project)))) | |
#if ($field.boolean && $field.primitive) | |
#if ($StringUtil.startsWithIgnoreCase($name, 'is')) | |
#set($name = $StringUtil.decapitalize($name)) | |
#else | |
is## |