diff --git a/commons/res/values-nb/strings.xml b/commons/res/values-nb/strings.xml index a086a4587..fe9313d68 100644 --- a/commons/res/values-nb/strings.xml +++ b/commons/res/values-nb/strings.xml @@ -60,7 +60,7 @@ 1 opplasting %d opplastinger - Ingen kategorier som stemte overens med %1 funnet + Ingen kategorier som stemte overens med %1$s funnet Legg til kategorier for å gjøre bildene dine lettere å finne på Wikimedia Commons. Begynn å skrive navnet på kategoriene. diff --git a/commons/res/values-or/strings.xml b/commons/res/values-or/strings.xml index fe7ec24b5..ec8face5f 100644 --- a/commons/res/values-or/strings.xml +++ b/commons/res/values-or/strings.xml @@ -14,7 +14,7 @@ ଅପଲୋଡ଼ ଆରମ୍ଭ ହେଲା! %1$s ଅପଲୋଡ଼ ହୋଇଗଲା! ନିଜର ଅପଲୋଡ଼ ଦେଖିବା ନିମନ୍ତେ ଟ୍ୟାପ କରନ୍ତୁ - %1$ତମ ଅପଲୋଡ଼ ଆରମ୍ଭ କରୁଛି + %1$sତମ ଅପଲୋଡ଼ ଆରମ୍ଭ କରୁଛି %1$s ଅପଲୋଡ଼ ହୋଇଗଲା %1$s ଅପଲୋଡ଼ ସରୁଛି %1$s ଅପଲୋଡ଼ କରିବାରେ ବିଫଳ ହେଲୁ diff --git a/commons/res/values-pl/strings.xml b/commons/res/values-pl/strings.xml index 9c3afaf7e..04d67adc9 100644 --- a/commons/res/values-pl/strings.xml +++ b/commons/res/values-pl/strings.xml @@ -12,11 +12,11 @@ Logowanie nie powiodło się! Błąd uwierzytelniania! Wysyłanie rozpoczęte - Przesłano %1$! + Przesłano %1$s! Kliknij aby zobaczyć swój wysłany plik - Rozpoczęto wysyłanie pliku : %1$ - Wysyłanie %1$ - Zakończono wysyłanie pliku %1$ + Rozpoczęto wysyłanie pliku : %1$s + Wysyłanie %1$s + Zakończono wysyłanie pliku %1$s Wysyłanie %1$s zakończone porażką Kliknij aby zobaczyć Moje wysłane pliki diff --git a/commons/res/values-uk/strings.xml b/commons/res/values-uk/strings.xml index 55351b953..2f6785e45 100644 --- a/commons/res/values-uk/strings.xml +++ b/commons/res/values-uk/strings.xml @@ -12,7 +12,7 @@ Не вдалося увійти! Помилка автентифікації! Завантаження розпочато! - Завантажено %1$! + Завантажено %1$s! Торкніться, щоб переглянути Ваше завантаження Розпочинається завантаження %1$s %1$s завантажується diff --git a/find-broken-strings-variables.sh b/find-broken-strings-variables.sh new file mode 100755 index 000000000..bd8d80a15 --- /dev/null +++ b/find-broken-strings-variables.sh @@ -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