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))
```
fdroid/fdroidclient#1569fdroid/fdroidclient#887
```python
import glob
import os
import re
locale_pat = re.compile(r'.*values-([a-zA-Z-]*)/strings.xml')
translation_pat = re.compile(r'.*name="corpus_name_websearch_nearby">([^<]*).*')
for f in glob.glob('/tmp/Velvet/res/values-*/strings.xml'):
m = locale_pat.search(f)
if m:
locale = m.group(1)
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'main_menu__swap_nearby">[^<]+</string', 'main_menu__swap_nearby">' + word + '</string', data))
```
This gives a lot more flexibility to the user to cover bandwidth, power,
and privacy issues related to network traffic. The current implementation
does not represent these prefs as well as it should. For example, it does
not force the traffic over the preferred network type if the other type is
set to "never". Instead it just tracks the "unmetered" status of the
active network, and acts based on that.
closes#1381
Lots of languages really need the <plurals> tags to make sense, so
this also makes lint exit with an error when it finds strings that
should be <plurals>
closes#883
Now that we've moved the first screen to "Latest", we always want to do
our best to show something there. This preference is pretty redundant in
light of this.
Left some more unused strings which are a bit more general purpose and
perhaps should wait until after a stable release to remove. The
rationale for this is that we may want to revert to part of the old
terminology in certain places, and don't want to have to ask everyone to
translate everything again.
Translators:
Ajeje Brazorf Sardinian
Alberto Moshpirit Spanish
Andreas Nordal Norwegian Bokmål
Clara Chido Shona
Enol P Asturian
E T Turkish
ezjerry liao Chinese (Traditional)
Licaon Kter Romanian
naofum Japanese
Nebojsa Tausanov Macedonian
Nutchanon Wetchasit Thai
Osoitz Basque
Sylvia van Os Dutch
Tawanda Mugari Shona
Verdulo Esperanto
Verdulo Polish
Yaron Shahrabani Hebrew
YFdyh000 Chinese (Simplified)
zmni Indonesian
Translators:
Adrià García-Alzórriz Catalan
Daniel Martí Catalan
Enol Puente Asturian
ezjerry liao Traditional Chinese
Jonatan Swedish
Miss Min Persian
Nutchanon Wetchasit Thai
Sergio Oller Catalan