1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Merge branch 'fix_strings'

This commit is contained in:
cketti 2013-12-06 03:33:28 +01:00
commit 25147754e9
24 changed files with 123 additions and 140 deletions

View File

@ -196,12 +196,7 @@ Si us plau, envia\'ns els errors, contribueix a millorar-lo a
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Compte \"<xliff:g id="account">%s</xliff:g>\" comprimida des de
<xliff:g id="oldSize">%s</xliff:g>
a
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Compte \"<xliff:g id="account">%s</xliff:g>\" comprimida des de <xliff:g id="oldSize">%s</xliff:g> a <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">S\'està compactant el compte \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">S\'està netejant el compte \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -200,12 +200,7 @@ Posílejte prosím chybová hlášení, přispívejte novými funkcemi a ptejte
<string name="abbrev_kilobytes">KiB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Účet \"<xliff:g id="account">%s</xliff:g>\" byl stlačen z
<xliff:g id="oldSize">%s</xliff:g>
na
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Účet \"<xliff:g id="account">%s</xliff:g>\" byl stlačen z <xliff:g id="oldSize">%s</xliff:g> na <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Stlačuji účet \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Čistím účet \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -196,12 +196,7 @@ Vær venlig at sende fejlrapporter, anmodning om nye funktioner, og spørgsmål
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Konto \"<xliff:g id="account">%s</xliff:g>\" nedbragt fra
<xliff:g id="oldSize">%s</xliff:g>
til
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Konto \"<xliff:g id="account">%s</xliff:g>\" nedbragt fra <xliff:g id="oldSize">%s</xliff:g> til <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Komprimerer konto \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Renser konto \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -187,21 +187,14 @@ Um Fehler zu melden, neue Funktionen vorzuschlagen oder Fragen zu stellen, besuc
<string name="status_loading_more_failed">Ladevorgang erneut starten</string>
<string name="load_more_messages_fmt">Bis zu
<xliff:g id="messages_to_load">%d</xliff:g> weitere abrufen</string>
<string name="load_more_messages_fmt">Bis zu <xliff:g id="messages_to_load">%d</xliff:g> weitere abrufen</string>
<string name="abbrev_gigabytes">GB</string>
<string name="abbrev_megabytes">MB</string>
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Konto \'<xliff:g id="account">%s</xliff:g>\' von
<xliff:g id="oldSize">%s</xliff:g>
auf
<xliff:g id="newSize">%s</xliff:g>
komprimiert
</string>
<string name="account_size_changed">Konto \'<xliff:g id="account">%s</xliff:g>\' von <xliff:g id="oldSize">%s</xliff:g> auf <xliff:g id="newSize">%s</xliff:g> komprimiert</string>
<string name="compacting_account">Konto \'<xliff:g id="account">%s</xliff:g>\' wird komprimiert</string>
<string name="clearing_account">Konto \'<xliff:g id="account">%s</xliff:g>\' wird bereinigt</string>

View File

@ -195,8 +195,7 @@
<string name="abbrev_kilobytes">Kb</string>
<string name="abbrev_bytes">b</string>
<string name="account_size_changed">Ο λογαριασμός \'<xliff:g id="account">%s</xliff:g>\' συμπυκνώθηκε από
<xliff:g id="oldSize">%s</xliff:g> σε <xliff:g id="newSize">%s</xliff:g></string>
<string name="account_size_changed">Ο λογαριασμός \'<xliff:g id="account">%s</xliff:g>\' συμπυκνώθηκε από <xliff:g id="oldSize">%s</xliff:g> σε <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Συμπύκνωση λογαριασμού \'<xliff:g id="account">%s</xliff:g>\'</string>
<string name="clearing_account">Καθαρισμός λογαριασμού \'<xliff:g id="account">%s</xliff:g>\'</string>

View File

@ -195,12 +195,7 @@ Por favor, envía los errores detectados, contribuye con nuevas funcionalidades
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Cuenta \"<xliff:g id="account">%s</xliff:g>\" reducida desde
<xliff:g id="oldSize">%s</xliff:g>
a
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Cuenta \"<xliff:g id="account">%s</xliff:g>\" reducida desde <xliff:g id="oldSize">%s</xliff:g> a <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Compactando cuenta \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Limpiando cuenta \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -189,20 +189,14 @@ Virheraportit, osallistuminen projektiin ja kysymykset: Mene osoitteeseen
<string name="status_loading_more_failed">Yritetään ladata uudelleen lisää viestejä</string>
<string name="load_more_messages_fmt">Lataa
     <xliff:g id="messages_to_load">%d</xliff:g> lisää</string>
<string name="load_more_messages_fmt">Lataa <xliff:g id="messages_to_load">%d</xliff:g> lisää</string>
<string name="abbrev_gigabytes">Gt</string>
<string name="abbrev_megabytes">Mt</string>
<string name="abbrev_kilobytes">kt</string>
<string name="abbrev_bytes">t</string>
<string name="account_size_changed">
Tilin \"<xliff:g id="account">%s</xliff:g>\" vanha koko
    <xliff:g id="oldSize">%s</xliff:g>
    on nyt
    <xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Tilin \"<xliff:g id="account">%s</xliff:g>\" vanha koko <xliff:g id="oldSize">%s</xliff:g> on nyt <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Tiivistetään tiliä \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Tyhjennetään tiliä \"<xliff:g id="account">%s</xliff:g>\"</string>
@ -788,12 +782,12 @@ Virheraportit, osallistuminen projektiin ja kysymykset: Mene osoitteeseen
</string>
<string name="folder_list_help_key">
      1 - Näytä vain 1. luokan kansiot\u000A
      2 - Näytä 1. ja 2. luokan kansiot\u000A
      3 - Näytä kaikki paitsi 2. luokan kansiot\u000A
      4 - Näytä kaikki kansiot\u000A
      Q - Palaa tileihin\u000A
      S - Muokkaa tilin asetuksia</string>
1 - Näytä vain 1. luokan kansiot\u000A
2 - Näytä 1. ja 2. luokan kansiot\u000A
3 - Näytä kaikki paitsi 2. luokan kansiot\u000A
4 - Näytä kaikki kansiot\u000A
Q - Palaa tileihin\u000A
S - Muokkaa tilin asetuksia</string>
<string name="folder_list_filter_hint">kansionimi sisältää</string>

View File

@ -221,12 +221,7 @@ de plus</string>
<string name="abbrev_kilobytes">ko</string>
<string name="abbrev_bytes">oct.</string>
<string name="account_size_changed">
Espace sur «\u00A0<xliff:g id="account">%s</xliff:g>\u00A0» passé de
<xliff:g id="oldSize">%s</xliff:g>
à
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Espace sur «\u00A0<xliff:g id="account">%s</xliff:g>\u00A0» passé de <xliff:g id="oldSize">%s</xliff:g> à <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Compactage du compte «\u00A0<xliff:g id="account">%s</xliff:g>\u00A0»</string>
<string name="clearing_account">Effacement du compte «\u00A0<xliff:g id="account">%s</xliff:g>\u00A0»</string>

View File

@ -195,12 +195,7 @@ Por favor, envía os erros detectados, contribúe con novas funcionalidas e preg
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Conta \"<xliff:g id="account">%s</xliff:g>\" reducida dende
<xliff:g id="oldSize">%s</xliff:g>
a
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Conta \"<xliff:g id="account">%s</xliff:g>\" reducida dende <xliff:g id="oldSize">%s</xliff:g> a <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Compactando conta \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Limpando conta \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -196,12 +196,7 @@ Hibajelentéseivel hozzájárul az újabb verziók tökéletesítéséhez, kérd
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
\"<xliff:g id="account">%s</xliff:g>\" fiók tömörítése
<xliff:g id="oldSize">%s</xliff:g>
helyett
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">\"<xliff:g id="account">%s</xliff:g>\" fiók tömörítése <xliff:g id="oldSize">%s</xliff:g> helyett <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Fiók tömörítése \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Fiók takarítása \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -188,20 +188,14 @@ Invia le tue segnalazioni, suggerisci nuove funzionalità e chiedi informazioni
<string name="status_loading_more_failed">Riprova a caricare altri messaggi</string>
<string name="load_more_messages_fmt">Scarica altri
<xliff:g id="messages_to_load">%d</xliff:g> messaggi</string>
<string name="load_more_messages_fmt">Scarica altri <xliff:g id="messages_to_load">%d</xliff:g> messaggi</string>
<string name="abbrev_gigabytes">GB</string>
<string name="abbrev_megabytes">MB</string>
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Account \"<xliff:g id="account">%s</xliff:g>\" ridimensionato da
<xliff:g id="oldSize">%s</xliff:g>
a
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Account \"<xliff:g id="account">%s</xliff:g>\" ridimensionato da <xliff:g id="oldSize">%s</xliff:g> a <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Compattazione account \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Rimozione account \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -197,11 +197,7 @@
<string name="abbrev_bytes">B</string>
<string name="account_size_changed"><!-- NEW: Note: part of 'account_size_changed' is untranslated -->
חשבון \"<xliff:g id="account">%s</xliff:g>\" נדחס ל
<xliff:g id="oldSize">%s</xliff:g>
to
<xliff:g id="newSize">%s</xliff:g>
</string>
חשבון \"<xliff:g id="account">%s</xliff:g>\" נדחס ל <xliff:g id="oldSize">%s</xliff:g> to <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">דחיסת חשבון</string>
<string name="clearing_account">מנקה חשבון \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -195,12 +195,7 @@ K-9 は大多数のメールクライアントと同様に、ほとんどのフ
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
アカウント \"<xliff:g id="account">%s</xliff:g>\" 現在
<xliff:g id="oldSize">%s</xliff:g>
から
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">アカウント \"<xliff:g id="account">%s</xliff:g>\" 現在 <xliff:g id="oldSize">%s</xliff:g> から <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">アカウント \"<xliff:g id="account">%s</xliff:g>\" を最適化しています</string>
<string name="clearing_account">アカウント \"<xliff:g id="account">%s</xliff:g>\" をクリアしています</string>

View File

@ -194,12 +194,7 @@ K-9 메일은 대부분의 무료 hotmail 계정을 지원하지 않으며, 다
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
\"<xliff:g id="account">%s</xliff:g>\" 계정이 차지하는 용량이
<xliff:g id="oldSize">%s</xliff:g>
에서
<xliff:g id="newSize">%s</xliff:g> 로 줄었습니다
</string>
<string name="account_size_changed">\"<xliff:g id="account">%s</xliff:g>\" 계정이 차지하는 용량이 <xliff:g id="oldSize">%s</xliff:g> 에서 <xliff:g id="newSize">%s</xliff:g> 로 줄었습니다</string>
<string name="compacting_account">계정 최적화 \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">계정 비우기 \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -195,12 +195,7 @@ Graag foutrapporten, bijdrage nieuwe functies en vragen stellen op
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Account \"<xliff:g id="account">%s</xliff:g>\" shrunk van
<xliff:g id="oldSize">%s</xliff:g>
naar
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Account \"<xliff:g id="account">%s</xliff:g>\" shrunk van <xliff:g id="oldSize">%s</xliff:g> naar <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Account \"<xliff:g id="account">%s</xliff:g>\" comprimeren</string>
<string name="clearing_account">Account \"<xliff:g id="account">%s</xliff:g>\" wissen</string>

View File

@ -206,8 +206,7 @@ Wszelkie zgłoszenia usterek, zapytania oraz nowe pomysły prosimy przesyłać z
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Objętość konta \"<xliff:g id="account">%s</xliff:g>\" zmniejszyła się z <xliff:g id="oldSize">%s</xliff:g> do <xliff:g id="newSize">%s</xliff:g></string>
<string name="account_size_changed">Objętość konta \"<xliff:g id="account">%s</xliff:g>\" zmniejszyła się z <xliff:g id="oldSize">%s</xliff:g> do <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Kompaktuję konto \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Czyszczę konto \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -195,9 +195,7 @@ Por favor, nos envie relatórios de bugs, contribua para novas melhorias e faça
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Conta \"<xliff:g id="account">%s</xliff:g>\" reduziu-se de <xliff:g id="oldSize">%s</xliff:g> para <xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Conta \"<xliff:g id="account">%s</xliff:g>\" reduziu-se de <xliff:g id="oldSize">%s</xliff:g> para <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Compactando conta \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Limpando conta \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -196,12 +196,7 @@ Prosím nahlasujte prípadné chyby, prispievajte novými funkciami a pýtajte s
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Účet \"<xliff:g id="account">%s</xliff:g>\" bol zmenšený z
<xliff:g id="oldSize">%s</xliff:g>
na
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Účet \"<xliff:g id="account">%s</xliff:g>\" bol zmenšený z <xliff:g id="oldSize">%s</xliff:g> na <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Zmenšujem účet \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Čistím účet \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -196,12 +196,7 @@ Vänligen skicka felrapporter, hjälp till med nya funktioner och ställ frågor
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Kontot \"<xliff:g id="account">%s</xliff:g>\" har krympt från
<xliff:g id="oldSize">%s</xliff:g>
till
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Kontot \"<xliff:g id="account">%s</xliff:g>\" har krympt från <xliff:g id="oldSize">%s</xliff:g> till <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Komprimerar konto \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Rensar konto \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -188,20 +188,14 @@ Lütfen hata raporlarınızı, istediğiniz yeni özellikleri ve sorularınızı
<string name="status_loading_more_failed">Birden fazla mesaj yüklemeyi deniyor</string>
<string name="load_more_messages_fmt">Boyuta kadar yükle
<xliff:g id="messages_to_load">%d</xliff:g> daha fazla</string>
<string name="load_more_messages_fmt">Boyuta kadar yükle <xliff:g id="messages_to_load">%d</xliff:g> daha fazla</string>
<string name="abbrev_gigabytes">GB</string>
<string name="abbrev_megabytes">MB</string>
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
\"<xliff:g id="account">%s</xliff:g>\" hesabı
<xliff:g id="oldSize">%s</xliff:g>
den
<xliff:g id="newSize">%s</xliff:g>\'e küçüldü
</string>
<string name="account_size_changed">\"<xliff:g id="account">%s</xliff:g>\" hesabı <xliff:g id="oldSize">%s</xliff:g> den <xliff:g id="newSize">%s</xliff:g>\'e küçüldü</string>
<string name="compacting_account">Hesap sıkıştırma \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Hesap temizleme \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -188,20 +188,14 @@ K-9 Mail це поштовий клієнт з відкритим вихідни
<string name="status_loading_more_failed">Спробуйте ще раз завантажити повідомлення</string>
<string name="load_more_messages_fmt">Завантажити ще
<xliff:g id="messages_to_load">%d</xliff:g> </string>
<string name="load_more_messages_fmt">Завантажити ще <xliff:g id="messages_to_load">%d</xliff:g> </string>
<string name="abbrev_gigabytes">ГБ</string>
<string name="abbrev_megabytes">МБ</string>
<string name="abbrev_kilobytes">кБ</string>
<string name="abbrev_bytes">Б</string>
<string name="account_size_changed">
Розмір \"<xliff:g id="account">%s</xliff:g>\" зменшився від
<xliff:g id="oldSize">%s</xliff:g>
до
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Розмір \"<xliff:g id="account">%s</xliff:g>\" зменшився від <xliff:g id="oldSize">%s</xliff:g> до <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Стискання скриньки \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Очищення скриньки \"<xliff:g id="account">%s</xliff:g>\"</string>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version='1.0' encoding='UTF-8'?>
<!--
When removing strings from the main file, please cleanup the translations.
The script tools/sync_translation.py will get rid of any surplus strings.
@ -201,12 +201,7 @@ Please submit bug reports, contribute new features and ask questions at
<string name="abbrev_kilobytes">KB</string>
<string name="abbrev_bytes">B</string>
<string name="account_size_changed">
Account \"<xliff:g id="account">%s</xliff:g>\" shrunk from
<xliff:g id="oldSize">%s</xliff:g>
to
<xliff:g id="newSize">%s</xliff:g>
</string>
<string name="account_size_changed">Account \"<xliff:g id="account">%s</xliff:g>\" shrunk from <xliff:g id="oldSize">%s</xliff:g> to <xliff:g id="newSize">%s</xliff:g></string>
<string name="compacting_account">Compacting account \"<xliff:g id="account">%s</xliff:g>\"</string>
<string name="clearing_account">Clearing account \"<xliff:g id="account">%s</xliff:g>\"</string>
@ -289,7 +284,7 @@ Please submit bug reports, contribute new features and ask questions at
<string name="message_view_show_pictures_action">Show pictures</string>
<string name="message_view_show_message_action">Show message</string>
<string name="message_view_show_attachments_action">Show attachments</string>
<string name="message_view_show_more_attachments_action">More&#8230;</string>
<string name="message_view_show_more_attachments_action">More</string>
<string name="message_view_fetching_attachment_toast">Fetching attachment.</string>
<string name="message_view_no_viewer">Unable to find viewer for <xliff:g id="mimetype">%s</xliff:g>.</string>
<string name="message_view_download_remainder">Download complete message</string>
@ -371,7 +366,7 @@ Please submit bug reports, contribute new features and ask questions at
<string name="account_setup_basics_password_hint">Password</string>
<string name="account_setup_basics_manual_setup_action">Manual setup</string>
<string name="account_setup_check_settings_title"></string>
<string name="account_setup_check_settings_title"/>
<string name="account_setup_check_settings_retr_info_msg">Retrieving account information\u2026</string>
<string name="account_setup_check_settings_check_incoming_msg">Checking incoming server settings\u2026</string>
<string name="account_setup_check_settings_check_outgoing_msg">Checking outgoing server settings\u2026</string>

11
tools/fix_all_strings.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
SCRIPT=$(readlink -f $0)
SCRIPTPATH=`dirname $SCRIPT`
PROJECTROOT=`dirname $SCRIPTPATH`
cd $PROJECTROOT
find res/values* -name "strings.xml" -type f ! -wholename "res/values-fr-rCA/strings.xml" -exec ./tools/fix_strings.py {} \;
cd -

76
tools/fix_strings.py Executable file
View File

@ -0,0 +1,76 @@
#!/usr/bin/env python
# Rewrite a strings file to get rid of line break/whitespace combinations that get stripped when building with Gradle.
#
# Example:
# <string name="account_size_changed">
# Account \"<xliff:g id="account">%s</xliff:g>\" shrunk from
# <xliff:g id="oldSize">%s</xliff:g>
# to
# <xliff:g id="newSize">%s</xliff:g>
# </string>
#
# will be rendered as
#
# Account "account" shrunk from10MB to1MB
#
# when built with Gradle, but displays fine when built with Ant.
#
#
# Written for use with K-9 Mail (https://github.com/k9mail/k-9)
# Licensed under the WTFPL (http://www.wtfpl.net/about/)
import sys
import re
from lxml import etree
def fix_text(element):
if element.text is not None:
element.text = re.sub(r'^\n\s*([^\s])', "\\1", element.text)
element.text = re.sub(r'\n\s*$', " ", element.text)
def fix_tail(element, is_last):
if element.tail is not None:
if is_last:
replacement = ""
else:
replacement = " "
element.tail = re.sub(r'^\n\s*([^\s])', " \\1", element.tail)
element.tail = re.sub(r'\n\s*$', replacement, element.tail)
def cleanup_string_elements(elements):
for element in elements:
if element.tag is None:
continue
tag = element.tag
children = element.getchildren()
if tag in ["string", "item"]:
if len(children) > 0:
fix_text(element)
for child in children:
if isinstance(child.tag, basestring):
fix_text(child)
fix_tail(child, child == children[-1])
elif tag == "plurals":
cleanup_string_elements(children)
if len(sys.argv) < 2:
print "Usage: fix_strings.py <strings file>"
print "Example: fix_strings.py res/values/strings.xml"
exit(1)
strings_file = sys.argv[1]
parser = etree.XMLParser(strip_cdata=False)
strings = etree.parse(strings_file, parser=parser)
cleanup_string_elements(strings.getroot().getchildren())
strings.write(strings_file, xml_declaration=True, encoding="UTF-8", pretty_print=True)