mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Make correct_strings.sh automatically commit
This commit is contained in:
parent
ce90a36891
commit
984ba0724f
1 changed files with 16 additions and 0 deletions
|
@ -2,6 +2,17 @@
|
||||||
|
|
||||||
mydir="$(dirname "$(realpath "$0")")"
|
mydir="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
|
pushd "$mydir" > /dev/null
|
||||||
|
|
||||||
|
# Require clean git state
|
||||||
|
uncommitted=`git status --porcelain`
|
||||||
|
if [ ! -z "$uncommitted" ]; then
|
||||||
|
echo "Uncommitted changes are present, please commit first!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mydir="."
|
||||||
|
|
||||||
# Element -> SchildiChat
|
# Element -> SchildiChat
|
||||||
find "$mydir/vector/src/main/res" -name strings.xml -exec \
|
find "$mydir/vector/src/main/res" -name strings.xml -exec \
|
||||||
sed -i 's|Element|SchildiChat|g' '{}' \;
|
sed -i 's|Element|SchildiChat|g' '{}' \;
|
||||||
|
@ -18,3 +29,8 @@ find "$mydir/vector/src/main/res" -name strings.xml -exec \
|
||||||
# Requires manual intervention for correct grammar
|
# Requires manual intervention for correct grammar
|
||||||
sed -i 's|!nnen|wolpertinger|g' "$mydir/vector/src/main/res/values-de/strings.xml"
|
sed -i 's|!nnen|wolpertinger|g' "$mydir/vector/src/main/res/values-de/strings.xml"
|
||||||
sed -i 's|!n|schlumpfwesen|g' "$mydir/vector/src/main/res/values-de/strings.xml"
|
sed -i 's|!n|schlumpfwesen|g' "$mydir/vector/src/main/res/values-de/strings.xml"
|
||||||
|
|
||||||
|
git add -A
|
||||||
|
git commit -m "Automatic SchildiChat string correction"
|
||||||
|
|
||||||
|
popd > /dev/null
|
||||||
|
|
Loading…
Reference in a new issue