AndroidAdapter class
The Android file-first adapter (decision D0/D13, #2285): the base
res/values/strings.xml is the truth. sync uploads it plus each
values-<qualifier>/strings.xml under its language, and pull writes the
translated values-<qualifier>/ files into the same res/, never onto the
base. No extractor: the strings already live in resources.
Constructors
- AndroidAdapter()
-
const
Properties
Methods
-
agentsMdSection(
Easyi18nConfig config) → String -
The stack's own section of the
AGENTS.mdblock: Markdown, one trailing newline. -
configDefaults(
String root, String mode, void report(InitStep)) → StackConfigDefaults -
modeis what resolveMode returned. -
detect(
String root) → bool -
A Gradle or manifest marker AND a base resources file. A
strings.xmlalone is a file any tool may have dropped; a Flutter app carries both halves underandroid/, and the order of the adapters keeps it Flutter. -
doctorChecks(
{required String root, required String sourcePath, required Easyi18nConfig config, required DoctorFindings findings}) → Future< void> -
Read-only, offline and free (the
StackAdaptercontract). -
initSteps(
InitContext context, Easyi18nConfig config) → void -
nextCommand(
Easyi18nConfig config) → String -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveMode(
String root, String? flagMode, void report(InitStep)) → String - Mode B is the Dart runtime SDK, which an Android app cannot call.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
localeOfValuesDir(
String name) → String? -
The locale a
values-<qualifiers>directory name holds (values-zh-rTWiszh-TW,values-b+zh+Hantiszh-Hant), or null when it names none (values,values-night). The server reads the same rule from the file name it is sent. -
sourcesIn(
String root) → List< String> -
Every
res/values/strings.xmlunderroot, relative with forward slashes, best pick first: amainsource set, then the shallowest, then by path. The order never comes fromlistSync. -
targetsIn(
String resDir) → List< ({File file, String lang})> -
Every
values-<locale>/strings.xmlinresDir, by language. -
translatableKeys(
String content) → int? -
The
<string>and<plurals>resources ofcontenta sync imports (nottranslatable="false"), or null without a<resources>root.