These strings are part of the install/uninstall UI which is originally
sourced from Android itself. So the translations should stay in sync with
Android's.
fdroid/fdroidclient#1569
```python
import glob
import os
import re
locale_pat = re.compile(r'.*values-([a-z][a-z][a-zA-Z-]*)/strings.xml')
translation_pat = re.compile(r'.*name="settings_label"[^>]*>"?([^"<]*).*')
for f in glob.glob('/home/hans/code/android.googlesource.com/packages/apps/Settings/res/values-[a-z][a-z]*/strings.xml'):
m = locale_pat.search(f)
if m:
locale = m.group(1)
if locale.endswith('-nokeys'):
continue
#print(locale)
with open(f) as fp:
m = translation_pat.search(fp.read())
if m:
word = m.group(1)
print(locale, '\t', word)
fdroid = '/home/hans/code/fdroid/client/app/src/main/res/values-' + locale + '/strings.xml'
if os.path.exists(fdroid):
with open(fdroid) as fp:
data = fp.read()
with open(fdroid, 'w') as fp:
fp.write(re.sub(r'menu_settings">[^<]+</string', 'menu_settings">' + word + '</string', data))
```
This also only runs one emulator test by default, then runs 3 SDK
levels for final commits. The single default test is the optimized
F-Droid system image included in the Docker image.
Squashed commit of the following:
commit f6f528d67e
Author: Hans-Christoph Steiner <hans@eds.org>
Date: Tue Feb 13 16:24:53 2018 +0100
remove android xml quoting
commit d7251cc209
Author: anonymous <>
Date: Tue Feb 13 14:23:12 2018 +0000
Translated using Weblate (German)
Currently translated at 99.7% (409 of 410 strings)
commit 60f449e154
Author: Andreas Kleinert <Andy.Kleinert@gmail.com>
Date: Tue Feb 13 14:22:48 2018 +0000
Translated using Weblate (German)
Currently translated at 99.7% (409 of 410 strings)
commit b16f2f6f58
Author: Hans-Christoph Steiner <hans@guardianproject.info>
Date: Tue Feb 13 15:03:19 2018 +0000
Translated using Weblate (Hebrew)
Currently translated at 100.0% (410 of 410 strings)
commit 66601011e3
Author: Hans-Christoph Steiner <hans@eds.org>
Date: Tue Feb 13 16:15:52 2018 +0100
check for invalid mixing for format stringsj
commit cdf2e70632
Author: Danial Behzadi <dani.behzi@ubuntu.com>
Date: Tue Feb 13 10:46:48 2018 +0000
Translated using Weblate (Persian)
Currently translated at 100.0% (410 of 410 strings)
commit e7e37ad42c
Author: ezjerry liao <ezjerry@gmail.com>
Date: Mon Feb 12 15:26:00 2018 +0000
Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (410 of 410 strings)
commit 0850c89e29
Author: nautilusx <mail.ka@mailbox.org>
Date: Sat Feb 10 14:32:57 2018 +0000
Translated using Weblate (German)
Currently translated at 99.2% (407 of 410 strings)
commit 52d6426b2a
Author: Kristjan Räts <kristjanrats@gmail.com>
Date: Sun Feb 11 12:25:23 2018 +0000
Translated using Weblate (Estonian)
Currently translated at 100.0% (410 of 410 strings)
commit a308ae180d
Author: Allan Nordhøy <epost@anotheragency.no>
Date: Sat Feb 10 00:37:43 2018 +0000
Translated using Weblate (Norwegian Bokmål)
Currently translated at 99.2% (407 of 410 strings)
commit fb44f4cd22
Author: jschwender <joachim.schwender@web.de>
Date: Fri Feb 9 21:08:25 2018 +0000
Translated using Weblate (German)
Currently translated at 99.2% (407 of 410 strings)
commit 450a30bbc1
Author: Julien Lepiller <roptat@lepiller.eu>
Date: Fri Feb 9 13:31:44 2018 +0000
Translated using Weblate (French)
Currently translated at 99.0% (406 of 410 strings)
commit 309f8b3527
Author: Yunyang Liu <ensigma96@gmail.com>
Date: Fri Feb 9 12:50:13 2018 +0000
Translated using Weblate (Chinese (Simplified))
Currently translated at 97.0% (398 of 410 strings)
commit b4d2fbe00e
Author: Rivo Zängov <rivozangov@gmail.com>
Date: Fri Feb 9 10:13:12 2018 +0000
Translated using Weblate (Estonian)
Currently translated at 98.5% (404 of 410 strings)
commit 6ec7f71640
Author: Luiz Fernando Ranghetti <elchevive@opensuse.org>
Date: Sat Feb 10 02:58:33 2018 +0000
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (410 of 410 strings)
commit c8af9171ac
Author: Ldm Public <ldmpub@gmail.com>
Date: Fri Feb 9 13:17:30 2018 +0000
Translated using Weblate (French)
Currently translated at 99.0% (406 of 410 strings)
commit 04005a0277
Author: Julien Lepiller <roptat@lepiller.eu>
Date: Fri Feb 9 13:16:05 2018 +0000
Translated using Weblate (French)
Currently translated at 99.0% (406 of 410 strings)
commit 5af1c4d24d
Author: monolifed <monolifed@gmail.com>
Date: Thu Feb 8 12:25:29 2018 +0000
Translated using Weblate (Turkish)
Currently translated at 100.0% (410 of 410 strings)
commit 4c56b77259
Author: Osoitz <oelkoro@gmail.com>
Date: Fri Feb 9 10:59:06 2018 +0000
Translated using Weblate (Basque)
Currently translated at 100.0% (410 of 410 strings)
commit 7d73c299ce
Author: Ajeje Brazorf <lmelonimamo@yahoo.it>
Date: Wed Feb 7 20:24:39 2018 +0000
Translated using Weblate (Sardinian)
Currently translated at 99.5% (408 of 410 strings)
commit b002726689
Author: Felipe Rodrigues <bidu.pub@gmail.com>
Date: Wed Feb 7 13:41:04 2018 +0000
Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.7% (409 of 410 strings)
commit 0207c99f39
Author: azumukupoe <azumukupoe1999@gmail.com>
Date: Wed Feb 7 13:19:06 2018 +0000
Translated using Weblate (Japanese)
Currently translated at 100.0% (410 of 410 strings)
commit 439b5eeee8
Author: monolifed <monolifed@gmail.com>
Date: Thu Feb 8 12:19:09 2018 +0000
Translated using Weblate (Turkish)
Currently translated at 100.0% (410 of 410 strings)
commit f3921bb42d
Author: Yaron Shahrabani <sh.yaron@gmail.com>
Date: Wed Feb 7 08:08:20 2018 +0000
Translated using Weblate (Hebrew)
Currently translated at 100.0% (410 of 410 strings)
commit 74c0eb25e6
Author: Verdulo <tomek@disroot.org>
Date: Wed Feb 7 18:04:14 2018 +0000
Translated using Weblate (Polish)
Currently translated at 100.0% (410 of 410 strings)
commit 272b00b8df
Author: Viktar Vauchkevich <victorenator@gmail.com>
Date: Tue Feb 6 14:06:00 2018 +0000
Translated using Weblate (Belarusian)
Currently translated at 98.2% (403 of 410 strings)
commit b28a9e57dd
Author: Takumi Shoji <azumukupoe1999@gmail.com>
Date: Wed Feb 7 13:06:00 2018 +0000
Translated using Weblate (Japanese)
Currently translated at 100.0% (410 of 410 strings)
commit 56422c2d9e
Author: Sérgio Marques <smarquespt@gmail.com>
Date: Tue Feb 6 11:56:27 2018 +0000
Translated using Weblate (Portuguese (Portugal))
Currently translated at 98.0% (402 of 410 strings)
commit cd4ab7fdb3
Author: Licaon Kter <licaon.kter@protonmail.com>
Date: Tue Feb 6 09:05:10 2018 +0000
Translated using Weblate (Romanian)
Currently translated at 95.8% (393 of 410 strings)
commit ca68defd60
Author: Ldm Public <ldmpub@gmail.com>
Date: Tue Feb 6 07:38:41 2018 +0000
Translated using Weblate (French)
Currently translated at 98.2% (403 of 410 strings)
commit d0931b98aa
Author: Verdulo <tomek@disroot.org>
Date: Tue Feb 6 19:35:39 2018 +0000
Translated using Weblate (Esperanto)
Currently translated at 100.0% (410 of 410 strings)
commit bf7173ca6b
Author: Nathan Follens <nathan@email.is>
Date: Tue Feb 6 11:29:34 2018 +0000
Translated using Weblate (Dutch)
Currently translated at 100.0% (410 of 410 strings)
commit cdb4adc18c
Author: Yaron Shahrabani <sh.yaron@gmail.com>
Date: Tue Feb 6 09:06:28 2018 +0000
Translated using Weblate (Hebrew)
Currently translated at 100.0% (410 of 410 strings)
commit 93dcc2a0ad
Author: Sveinn í Felli <sv1@fellsnet.is>
Date: Tue Feb 6 07:41:40 2018 +0000
Translated using Weblate (Icelandic)
Currently translated at 100.0% (410 of 410 strings)
commit 5b359ea0fd
Author: ezjerry liao <ezjerry@gmail.com>
Date: Tue Feb 6 01:45:45 2018 +0000
Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (410 of 410 strings)
commit 254dc5f0ad
Author: anonymous <>
Date: Fri Feb 2 16:09:15 2018 +0000
Translated using Weblate (German)
Currently translated at 100.0% (402 of 402 strings)
commit 44b823af42
Author: Licaon Kter <licaon.kter@protonmail.com>
Date: Fri Feb 2 07:34:53 2018 +0000
Translated using Weblate (Romanian)
Currently translated at 96.7% (389 of 402 strings)
commit 0069bef97b
Author: Viktar Vauchkevich <victorenator@gmail.com>
Date: Wed Jan 31 19:20:15 2018 +0000
Translated using Weblate (Belarusian)
Currently translated at 100.0% (402 of 402 strings)
commit 92042d4908
Author: Марс Ямбар <mjambarmeta@gmail.com>
Date: Tue Jan 30 17:04:37 2018 +0000
Translated using Weblate (Ukrainian)
Currently translated at 97.7% (393 of 402 strings)
commit 0555d77687
Author: Xuacu Saturio <xuacusk8@gmail.com>
Date: Tue Jan 30 20:22:42 2018 +0000
Translated using Weblate (Asturian)
Currently translated at 100.0% (402 of 402 strings)
commit 2e9a284da7
Author: Luca D'Amico <damico.luca91@live.it>
Date: Mon Jan 29 16:40:19 2018 +0000
Translated using Weblate (Italian)
Currently translated at 100.0% (402 of 402 strings)
commit 7640aa3613
Author: yamabiko <dragonfly@cryptolab.net>
Date: Mon Jan 29 16:38:41 2018 +0000
Translated using Weblate (Italian)
Currently translated at 100.0% (402 of 402 strings)
commit ffc447abaf
Author: Luca D'Amico <damico.luca91@live.it>
Date: Mon Jan 29 16:38:27 2018 +0000
Translated using Weblate (Italian)
Currently translated at 99.7% (401 of 402 strings)
commit 248e7df90d
Author: yamabiko <dragonfly@cryptolab.net>
Date: Mon Jan 29 16:38:20 2018 +0000
Translated using Weblate (Italian)
Currently translated at 99.7% (401 of 402 strings)
commit ce561bd4ef
Author: Luca D'Amico <damico.luca91@live.it>
Date: Mon Jan 29 16:36:47 2018 +0000
Translated using Weblate (Italian)
Currently translated at 99.2% (399 of 402 strings)
commit 06d21c188e
Author: yamabiko <dragonfly@cryptolab.net>
Date: Mon Jan 29 16:36:14 2018 +0000
Translated using Weblate (Italian)
Currently translated at 99.2% (399 of 402 strings)
commit 2afc5deb08
Author: リー <meluten@gmail.com>
Date: Sun Jan 28 12:15:27 2018 +0000
Translated using Weblate (German)
Currently translated at 100.0% (402 of 402 strings)
commit 28ebd01fba
Author: Yunyang Liu <ensigma96@gmail.com>
Date: Fri Jan 26 14:58:52 2018 +0000
Translated using Weblate (Chinese (Simplified))
Currently translated at 98.2% (395 of 402 strings)
PNG crunching is not a deterministic process, especially the way aapt does
it. This makes the F-Droid builds not reproducible. The easy solution to
this is to pre-crunch the PNGs and commit them to git. It also makes the
final APK a tiny amount smaller, for whatever reason.
https://medium.com/@duhroach/smaller-pngs-and-android-s-aapt-tool-4ce38a24019d
XML namespaces are a massive pain to deal with in, and they are totally
unneeded in the translation files. xmlns:tools is only needed in the
source file to ignore some lint warnings.
The weblate commits now take two forms:
Translated using Weblate ($LANG)
Added translation using Weblate ($LANG)
Adapt the regex to reflect both, avoiding the latter form from screwing
everything up.
This way, error lines like this one:
Waiting for emulator to start: unknown: error: no devices found
Become:
Waiting for emulator to start: error: no devices found
Otherwise, we'd interpret this as "booting", which is wrong:
$ adb -e shell getprop init.svc.bootanim
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: no devices found
* The repo instructions are just a duplicate of the simple git submodules
* The Android.mk build instructions don't work and will never support what
e.g. gradle does
Anyone wanting to bundle F-Droid in a ROM can build it with git and gradle,
and then including the resulting apk.