XcstringsAdapter class
The file-first adapter (decision D0/D13): the translation catalog the
project already owns is the truth, not the calls in the source. init
writes a config pointing at it, sync uploads it and writes the translated
one back, and doctor grades the file rather than a runtime wiring the
stack has no way to use.
Constructors
- XcstringsAdapter()
-
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 - The two settings that make a config file-first, reported as a step so the pick is in the transcript rather than only in the written file.
-
detect(
String root) → bool -
An Xcode project AND a catalog to sync. Both halves are load-bearing: a
.xcodeprojalone is every Flutter app (ios/Runner.xcodeproj), and a lone.xcstringsis a file any tool may have dropped. -
doctorChecks(
{required String root, required String sourcePath, required Easyi18nConfig config, required DoctorFindings findings}) → Future< void> -
Read-only, offline and free (the
StackAdaptercontract): every answer comes from the config and the catalog on disk. -
initSteps(
InitContext context, Easyi18nConfig config) → void -
Nothing to scaffold: the catalog is the project's own file and the only
derived state is the core's
.easyi18n/cache. Reporting the catalog is the whole step list — a re-run ofinitsays whether the configured path still resolves, which is what an idempotent second run is for. -
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 -
File-first is Mode A by construction: Mode B is the Dart runtime SDK
(
context.tr(),Easyi18nScope, OTA bundles), which an Xcode target cannot call. Honouring--mode bhere would write a config whose only effect is to turn off the coverage gradingdoctordoes for Mode A. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
catalogsIn(
String root) → List< String> -
Every catalog under
roota sync could own, relative to it, best pick first:kXcstringsCatalogNamebefore any other name, then the shallowest, then alphabetical. -
xcodeProjectIn(
String root) → String? -
The
.xcodeproj/.xcworkspacebundle at the root ofroot, or null. Only the top level: the copies inside a Flutter app live underios/andmacos/, and finding one of those would claim every Flutter project.