Commit Graph

61 Commits

Author SHA1 Message Date
Hans-Christoph Steiner e2d7199f3f
png-pre-compress: use best of singleCrunch or zopflipng 2020-01-02 22:06:19 +01:00
Peter Dave Hello a7fa47e3e9 Compress PNG images losslessly with zopflipng 2020-01-02 20:19:35 +00:00
Hans-Christoph Steiner 6b7d82dba7
add translations from Android when they are missing from a locale 2019-11-21 18:07:23 +01:00
Hans-Christoph Steiner 103098d31c
map more Android string keys to F-Droid string keys
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.
2019-11-21 17:22:19 +01:00
Hans-Christoph Steiner aecf4fdc17
sync common works to the Android v9.0.0r50 sources 2019-11-21 16:06:34 +01:00
Hans-Christoph Steiner 984fe6ad2b
tools/check-string-maxlength.py: include limits from Android sources 2019-11-21 16:06:32 +01:00
Hans-Christoph Steiner 947945dc92
tools/check-format-strings.py: remove blank translations 2019-11-20 22:35:44 +01:00
PatOnTheBack fe92b4afc6 Remove Unused Import 2019-07-05 20:31:12 +00:00
PatOnTheBack 2c882741e7 Remove Unused `import re` 2019-07-05 20:30:46 +00:00
Hans-Christoph Steiner 39f23f6876 add required length limits to swap strings for the translators 2019-05-24 10:00:08 +02:00
Hans-Christoph Steiner 826d70f2c9 script to automatically cherry-pick complete translations from Weblate
This creates a branch 'merge_weblate' and cherry picks commits from Weblate
that contain 100% complete translations.
2019-05-10 16:30:26 +02:00
Hans-Christoph Steiner a71489a102 set max width on places where the translations get too long
closes #1678
2019-05-10 14:13:23 +02:00
Hans-Christoph Steiner 7ce7b46ed2 metadata: script to delete 0 size files and standardize whitespace 2019-02-21 00:21:55 +01:00
Hans-Christoph Steiner bb597537f2 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (428 of 428 strings)
2019-02-15 14:58:59 +00:00
Hans-Christoph Steiner 1ed99835a0 remove-unused-and-blank-translations.py: force Android/Weblate XML format
https://github.com/WeblateOrg/weblate/issues/1886
https://github.com/WeblateOrg/weblate/issues/2333
2019-02-15 14:46:34 +01:00
Hans-Christoph Steiner 3868b81587 sync up "Settings" translation with Android standard strings
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))
```
2018-12-21 17:07:41 +01:00
Hans-Christoph Steiner a24a98aaf2 script to run the steps for pulling translations from Weblate
Hopefully the need for this will go away soon, once we work with Weblate to
smooth out the workflow.

[skip ci]
2018-12-20 22:44:22 +01:00
Hans-Christoph Steiner 7f314d7781 gitlab-ci: default emulator test to F-Droid image
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.
2018-06-15 18:27:20 +02:00
Hans-Christoph Steiner 068e0d1a7e recompress screenshots using zopflipng, strip using exiftool
This makes them as small as possible.
2018-03-07 23:57:27 +01:00
Hans-Christoph Steiner 6bb8d5e92b a couple languages don't use "other" in plurals: be pl ru 2018-03-06 23:44:30 +01:00
Hans-Christoph Steiner 583dde51db Weblate (closes !642)
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)
2018-02-13 17:01:20 +01:00
Hans-Christoph Steiner 1e0200fa30 add standard pre-commit hook that does quick checks, e.g. l18n scripts 2018-02-06 00:17:43 +01:00
Hans-Christoph Steiner f4766a93c5 translation tools: detect missing "other" <item> from <plurals>
"other" is the only <item> that is required, or crashes are possible.
2017-09-12 17:38:59 +02:00
Hans-Christoph Steiner 15b27ef1f6 fix lint TypographyEllipsis programmatically 2017-09-04 23:12:35 +02:00
Hans-Christoph Steiner a27d2804f3 manually use `aapt singleCrunch` for reproducible builds
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
2017-09-04 22:20:55 +02:00
Hans-Christoph Steiner dc6eccc218 workaround Weblate bug for languages with no plurals
https://github.com/WeblateOrg/weblate/issues/520
2017-05-31 12:29:25 +02:00
Hans-Christoph Steiner 7c2125c248 only remove incomplete translations if saved in a git remote 2017-05-11 09:39:00 +02:00
Hans-Christoph Steiner 2ef9b279a8 remove all blank items from plurals 2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner 38403338da remove xmlns tools:ignore from translations
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.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner 3df626aed1 sync up translation scripts to use the same code
To keep these scripts simple and readible, it makes sense to keep them
as separate scripts.  But they should use the same approach as much as
possible.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner 082b6091fc move all translation scripts to tools/
I think we should just move all the scripts to tools/, app/tools is
confusing, not very visible, and non-standard.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner b99e95304e remove pull-trans.sh, weblate is merged via merge requests now
gitlab handles the squashing, then we have a publicly available history
of the unsquashed commits in the merge request.
2017-05-10 23:18:28 +02:00
Hans-Christoph Steiner 9d2e981d5e add script to remove incomplete translations
closes #858
2017-04-07 14:50:53 +02:00
Daniel Martí 5052266450 pull-trans: fix "Added translation" commits
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.
2016-06-08 23:25:54 +01:00
Daniel Martí 128d390e9c wait-for-emulator: don't prepend "unknown"
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
2016-04-29 20:49:19 +01:00
Daniel Martí 7bc130d81a wait-for-emulator: skip adb log messages
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
2016-04-29 20:46:25 +01:00
Daniel Martí 7a220077c5 pull-trans: do not revert changes in HEAD
Using .. instead of ... means that changes in HEAD not yet pushed (and
hence not in the weblate branch) will be reverted.
2016-01-06 18:03:46 +01:00
Daniel Martí c8f495ec16 Move wait-for-emulator out of F-Droid subdir
It doesn't specifically apply only to the client.
2015-10-01 19:50:37 -07:00
Daniel Martí 7e02518394 pull-trans: fix adding new files
Using find means that we limit ourselves to existing files.
2015-09-23 22:53:31 -07:00
Daniel Martí 6853f9a306 pull-trans: use team@ instead of admin@, typo fix 2015-09-17 19:37:42 -07:00
Daniel Martí 7440cf1b74 Add script to pull+squash from weblate. Fixes #140 2015-09-17 19:28:42 -07:00
Daniel Martí 06dd4c8dcb Move F-Droid project into subdir, keeping a root gradle project
Also improved .gitignore a tad
2014-12-09 15:36:07 +01:00
Ron Rieve 3e5f3d45a6 Create zips to install and remove F-Droid as system app
Adds a script zip-build.sh which creates CWM-flashable zips to install/update and remove F-Droid as system/privileged app.
2014-09-03 01:47:32 +02:00
Daniel Martí 0f98042520 Remove broken support for repo and Android.mk
* 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.
2014-05-20 18:39:26 +02:00
Daniel Martí 9bd33003a0 Add a script to fix format problems automatically 2014-04-25 10:22:42 +02:00
Daniel Martí 2cdb634865 Fixes #6: Spaces before ellipsis in German are OK 2014-04-10 15:23:19 +02:00
Daniel Martí edd2de49c3 Use HEAD instead of LAST_STABLE_TAG 2014-04-01 15:16:24 +02:00
Daniel Martí 19aa5eb7f7 Make fix-ellipsis remove weird spaces too 2014-03-22 13:20:36 +01:00
Daniel Martí 12a9a1cf29 New script: Update repo xml data with git repo/submodule data 2014-03-17 14:01:08 +01:00
Daniel Martí 5292acfef0 Add support for arrays in remove-unused-trans 2014-02-10 09:23:27 +01:00