mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-25 21:03:56 +02:00
Updated path
This commit is contained in:
parent
ac22b147e5
commit
339dcdb805
1 changed files with 8 additions and 6 deletions
|
|
@ -2,11 +2,13 @@
|
|||
# Spot malformed string replacement patterns in Android localization files.
|
||||
# First install Lint from the Android SDK
|
||||
|
||||
grep -R "%1$ s" res/values*
|
||||
grep -R "%1$ d" res/values*
|
||||
grep -R "%1" res/values* | grep -v "%1\\$"
|
||||
VALUES=app/src/main/res/values
|
||||
|
||||
grep -RH '%' res/values* |
|
||||
grep -R "%1$ s" $VALUES*
|
||||
grep -R "%1$ d" $VALUES*
|
||||
grep -R "%1" $VALUES* | grep -v "%1\\$"
|
||||
|
||||
grep -RH '%' $VALUES* |
|
||||
sed -e 's/%/\n%/g' | # Split lines that contain several expressions
|
||||
grep '%' | # Filter out lines that do not contain expressions
|
||||
grep -v ' % ' | # Lone % character, not a variable
|
||||
|
|
@ -23,10 +25,10 @@ grep -RH '%' res/values* |
|
|||
grep -v '%20' # Ignore URL whitespace
|
||||
exit
|
||||
# Double-width percent sign
|
||||
grep -R '%' res/values*
|
||||
grep -R '%' $VALUES*
|
||||
|
||||
# Broken CDATA syntax
|
||||
grep -R "CDATA " res/values*
|
||||
grep -R "CDATA " $VALUES*
|
||||
|
||||
# Android SDK Lint (does not detect most syntax errors)
|
||||
lint --check StringFormatInvalid commons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue