M8: localisation groundwork - resource the file-kind labels, pseudo-locale check
This commit is contained in:
@@ -12,10 +12,10 @@ no advertising or tracking SDKs.
|
||||
|
||||
## Status
|
||||
|
||||
**M7 — on-device validation: done.** Run on a real Xiaomi M2101K7AG (Android 12/MIUI). The
|
||||
permission flows, real-storage browsing, the text editor's read/write path and the
|
||||
storage-usage screen were all exercised on hardware, and two real defects were found and
|
||||
fixed. See [docs/EDGE_CASE_TESTING.md](docs/EDGE_CASE_TESTING.md).
|
||||
**M8 — localisation groundwork: done.** Every user-visible string is in resources with real
|
||||
plurals, the audit's one genuine miss (the details sheet showing an enum name) is fixed, and
|
||||
the debug build's pseudo-locale makes the check mechanical. See the README's *Localisation*
|
||||
section.
|
||||
|
||||
## Tech stack
|
||||
|
||||
@@ -99,6 +99,60 @@ access"** through Play's Permissions Declaration Form, and have the core purpose
|
||||
in its store description. [PRIVACY.md](PRIVACY.md) is written to match the shipped
|
||||
permissions.
|
||||
|
||||
## Localisation
|
||||
|
||||
All user-visible text lives in `app/src/main/res/values/strings.xml`, with real `<plurals>`
|
||||
wherever a count can be one, and the screen and the progress notification resolve their
|
||||
labels through `text/TextRes.kt` so the two cannot drift apart. **English is currently the
|
||||
only locale.**
|
||||
|
||||
Adding a language is then a file, not a refactor:
|
||||
|
||||
```
|
||||
app/src/main/res/values-de/strings.xml # same keys, translated values
|
||||
```
|
||||
|
||||
Deliberately **not** localised, and why:
|
||||
|
||||
- **Byte units** ("KB", "MB") — symbols, not words, and every file manager and the system
|
||||
Settings app show them the same way.
|
||||
- **The timestamp pattern** (`yyyy-MM-dd HH:mm`) — a fixed, sortable format; the zone is
|
||||
passed in explicitly rather than assumed.
|
||||
|
||||
### Checking that nothing was missed
|
||||
|
||||
Two things are easy to get wrong: a literal typed into a composable, and showing an enum
|
||||
constant directly (`FileKind.name` puts untranslatable English on screen — the details
|
||||
sheet used to do exactly that). The mechanical check is the pseudo-locale:
|
||||
|
||||
```bash
|
||||
./gradlew :app:assembleDebug
|
||||
# Settings > System > Languages > English (XA), then launch the debug build.
|
||||
```
|
||||
|
||||
The debug build type sets `isPseudoLocalesEnabled = true`, so every string that came from
|
||||
`strings.xml` renders accented and bracketed (`[Îmàgé]`). **Anything that looks normal is a
|
||||
string that never went through resources.** The release build is unaffected.
|
||||
|
||||
One caveat: **Google Play's automatic translation translates your store listing, not the app
|
||||
UI.** Translated UI text has to be supplied in `values-<locale>/`.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- **"Open with" and Share only work in the all-files mode.** A SAF path is relative to the
|
||||
granted tree rather than a filesystem path, so it cannot be handed to `FileProvider`.
|
||||
- **RAR and 7z are refused**, not supported — they need native code, which this project
|
||||
deliberately does not ship.
|
||||
- **Archive extraction does not restore original timestamps or permissions**, and there is
|
||||
no archive encryption or password support.
|
||||
- **Cancellation happens between entries**, so a single very large file finishes before a
|
||||
stop is honoured.
|
||||
- **View state is not persisted across process death** (`SavedStateHandle` is not wired up).
|
||||
- **Long-press multi-select could not be driven from adb** on the MIUI test device, so the
|
||||
compress/extract buttons want a manual pass (see
|
||||
[docs/EDGE_CASE_TESTING.md](docs/EDGE_CASE_TESTING.md)).
|
||||
- The display name is still the working title — decided before the first upload (M10).
|
||||
|
||||
## Licence
|
||||
|
||||
Proprietary — all rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user