Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / translate / src / main / res / xml / data_extraction_rules.xml
data_extraction_rules.xml46 lines · 2.2 KiBRaw
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | Translate. Audited state: |
| 4 | * externalFilesDir/nllb600/ — the NLLB-200-distilled-600M translation model: |
| 5 | nllb600.maml and tokenizer.bin (NllbModel.FILES). An earlier version stored |
| 6 | SMaLL-100 under externalFilesDir/small100/; NllbModel.deleteRetired removes |
| 7 | those files on first run, so no exclude is needed for them. |
| 8 | * filesDir/datastore/translate_settings.preferences_pb — last used source and |
| 9 | target language (TranslateSettings). |
| 10 | * filesDir/datastore_default.preferences_pb — per-file download progress. |
| 11 | |
| 12 | The model is excluded from cloud backup: the weights are far past the |
| 13 | ~25 MB Auto Backup quota, and exceeding that quota fails the backup for the |
| 14 | whole app, which would take the language preferences down with it. It is also |
| 15 | fully regenerable — NllbModel downloads it mirror-only from |
| 16 | data.maproj.org with SHA-256 pinning, and InitialModelDownloadChecker in |
| 17 | MainActivity re-fetches it automatically on first launch. |
| 18 | |
| 19 | It is kept for device transfer. D2D has no quota and runs over a direct local |
| 20 | link, so carrying the already-downloaded model across saves the user a |
| 21 | multi-hundred-megabyte re-download on a brand new phone. This matches the |
| 22 | approach already taken in maps for its offline map data. |
| 23 | |
| 24 | Language preferences are tiny and back up in both directions. |
| 25 | --> |
| 26 | <data-extraction-rules> |
| 27 | <cloud-backup> |
| 28 | <include domain="root" path="." /> |
| 29 | <include domain="file" path="." /> |
| 30 | <include domain="database" path="." /> |
| 31 | <include domain="sharedpref" path="." /> |
| 32 | <include domain="external" path="." /> |
| 33 | <!-- Downloaded NLLB-200 weights: over the cloud quota and re-fetchable |
| 34 | with hash pinning. --> |
| 35 | <exclude domain="external" path="nllb600" /> |
| 36 | </cloud-backup> |
| 37 | <device-transfer> |
| 38 | <include domain="root" path="." /> |
| 39 | <include domain="file" path="." /> |
| 40 | <include domain="database" path="." /> |
| 41 | <include domain="sharedpref" path="." /> |
| 42 | <!-- Model included: no quota on D2D, and it spares the user a large |
| 43 | re-download. --> |
| 44 | <include domain="external" path="." /> |
| 45 | </device-transfer> |
| 46 | </data-extraction-rules> |