mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 04:13:53 +01:00
Implemented script to find resources syntax bugs
This commit is contained in:
parent
e978c53b3b
commit
f4b76fcf11
5 changed files with 39 additions and 7 deletions
|
|
@ -60,7 +60,7 @@
|
|||
<item quantity="one">1 opplasting</item>
|
||||
<item quantity="other">%d opplastinger</item>
|
||||
</plurals>
|
||||
<string name="categories_not_found">Ingen kategorier som stemte overens med %1 funnet</string>
|
||||
<string name="categories_not_found">Ingen kategorier som stemte overens med %1$s funnet</string>
|
||||
<string name="categories_skip_explanation">Legg til kategorier for å gjøre bildene dine lettere å finne på Wikimedia Commons.
|
||||
|
||||
Begynn å skrive navnet på kategoriene.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<string name="uploading_started">ଅପଲୋଡ଼ ଆରମ୍ଭ ହେଲା!</string>
|
||||
<string name="upload_completed_notification_title">%1$s ଅପଲୋଡ଼ ହୋଇଗଲା!</string>
|
||||
<string name="upload_completed_notification_text">ନିଜର ଅପଲୋଡ଼ ଦେଖିବା ନିମନ୍ତେ ଟ୍ୟାପ କରନ୍ତୁ</string>
|
||||
<string name="upload_progress_notification_title_start">%1$ତମ ଅପଲୋଡ଼ ଆରମ୍ଭ କରୁଛି</string>
|
||||
<string name="upload_progress_notification_title_start">%1$sତମ ଅପଲୋଡ଼ ଆରମ୍ଭ କରୁଛି</string>
|
||||
<string name="upload_progress_notification_title_in_progress">%1$s ଅପଲୋଡ଼ ହୋଇଗଲା</string>
|
||||
<string name="upload_progress_notification_title_finishing">%1$s ଅପଲୋଡ଼ ସରୁଛି</string>
|
||||
<string name="upload_failed_notification_title">%1$s ଅପଲୋଡ଼ କରିବାରେ ବିଫଳ ହେଲୁ</string>
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@
|
|||
<string name="login_failed">Logowanie nie powiodło się!</string>
|
||||
<string name="authentication_failed">Błąd uwierzytelniania!</string>
|
||||
<string name="uploading_started">Wysyłanie rozpoczęte</string>
|
||||
<string name="upload_completed_notification_title">Przesłano %1$!</string>
|
||||
<string name="upload_completed_notification_title">Przesłano %1$s!</string>
|
||||
<string name="upload_completed_notification_text">Kliknij aby zobaczyć swój wysłany plik</string>
|
||||
<string name="upload_progress_notification_title_start">Rozpoczęto wysyłanie pliku : %1$</string>
|
||||
<string name="upload_progress_notification_title_in_progress">Wysyłanie %1$</string>
|
||||
<string name="upload_progress_notification_title_finishing">Zakończono wysyłanie pliku %1$</string>
|
||||
<string name="upload_progress_notification_title_start">Rozpoczęto wysyłanie pliku : %1$s</string>
|
||||
<string name="upload_progress_notification_title_in_progress">Wysyłanie %1$s</string>
|
||||
<string name="upload_progress_notification_title_finishing">Zakończono wysyłanie pliku %1$s</string>
|
||||
<string name="upload_failed_notification_title">Wysyłanie %1$s zakończone porażką</string>
|
||||
<string name="upload_failed_notification_subtitle">Kliknij aby zobaczyć</string>
|
||||
<string name="title_activity_contributions">Moje wysłane pliki</string>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<string name="login_failed">Не вдалося увійти!</string>
|
||||
<string name="authentication_failed">Помилка автентифікації!</string>
|
||||
<string name="uploading_started">Завантаження розпочато!</string>
|
||||
<string name="upload_completed_notification_title">Завантажено %1$!</string>
|
||||
<string name="upload_completed_notification_title">Завантажено %1$s!</string>
|
||||
<string name="upload_completed_notification_text">Торкніться, щоб переглянути Ваше завантаження</string>
|
||||
<string name="upload_progress_notification_title_start">Розпочинається завантаження %1$s</string>
|
||||
<string name="upload_progress_notification_title_in_progress">%1$s завантажується</string>
|
||||
|
|
|
|||
32
find-broken-strings-variables.sh
Executable file
32
find-broken-strings-variables.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#! /bin/sh
|
||||
# Spot malformed string replacement patterns in Android localization files.
|
||||
# First install Lint from the Android SDK
|
||||
|
||||
grep -R "%1$ s" commons/res/values*
|
||||
grep -R "%1$ d" commons/res/values*
|
||||
grep -R "%1" commons/res/values* | grep -v "%1\\$"
|
||||
|
||||
grep -RH '%' commons/res/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
|
||||
grep -v '%<' | # Same, at the end of the string
|
||||
#grep -v '% ' | # Same, at the beginning of the string
|
||||
grep -v '%で' | # Same, no spaces in Japanese
|
||||
grep -v '%s' | # Single string variable
|
||||
grep -v '%d' | # Single decimal variable
|
||||
grep -v '%[0-9][0-9]\?$s' | # Multiple string variable
|
||||
grep -v '%[0-9][0-9]\?$d' | # Multiple decimal variable
|
||||
grep -v '%1$.1f' | # ?
|
||||
grep -v '%.1f' |
|
||||
grep -v '%\\n' |
|
||||
grep -v '%20' # Ignore URL whitespace
|
||||
exit
|
||||
# Double-width percent sign
|
||||
grep -R '%' commons/res/values*
|
||||
|
||||
# Broken CDATA syntax
|
||||
grep -R "CDATA " commons/res/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