Stand up the Tanemaki monorepo and the first end-to-end vertical slice of Block 1 (offline, encrypted inventory): add a seed → see it in a categorized, searchable list → it persists → reopen and it's still there. Architecture (state management like G1nkgo, adapted to Tane's reality): - flutter_bloc (Cubit-first), but the encrypted Drift DB is the single source of truth; cubits stream from repositories (no hydrated_bloc/Hive, which would write plaintext at rest). - get_it composition root; go_router; slang i18n (ES/EN, Weblate-friendly JSON). Workspace & core: - pub workspace: packages/commons_core (pure Dart) + apps/app_seeds (Flutter). - commons_core primitives: UUIDv7 IdGen, Hybrid Logical Clock, Quantity value type (+ plant-aware QuantityKind), IdentityService root-seed stub. Data & security: - Drift schemaVersion=1 with all 10 Block-1 tables + common CRDT columns (HLC updated_at, last_author, tombstones); Movement append-only. - SQLCipher via an injectable executor that refuses to open a plaintext DB; DB key + root seed in the OS keystore (separate secrets). - Exported drift_schema_v1.json + migration scaffold. Tests (near-TDD; nothing merges without tests): - commons_core units (24), Drift migration test, "no plaintext at rest" security guard (runs where SQLCipher is present, skips otherwise), repository, widget, full quick-add flow, file-reopen persistence, and a no-hardcoded-strings i18n guard. GitLab CI: format + analyze + test + coverage. Follow-on Block-1 stories (item detail/edit, species catalog, germination UI) and all of Block 2 remain out of scope.
157 lines
6.1 KiB
Dart
157 lines
6.1 KiB
Dart
///
|
|
/// Generated file. Do not edit.
|
|
///
|
|
// coverage:ignore-file
|
|
// ignore_for_file: type=lint, unused_import
|
|
// dart format off
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:intl/intl.dart';
|
|
import 'package:slang/generated.dart';
|
|
import 'strings.g.dart';
|
|
|
|
// Path: <root>
|
|
class TranslationsEs extends Translations with BaseTranslations<AppLocale, Translations> {
|
|
/// You can call this constructor and build your own translation instance of this locale.
|
|
/// Constructing via the enum [AppLocale.build] is preferred.
|
|
TranslationsEs({Map<String, Node>? overrides, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver, TranslationMetadata<AppLocale, Translations>? meta})
|
|
: assert(overrides == null, 'Set "translation_overrides: true" in order to enable this feature.'),
|
|
$meta = meta ?? TranslationMetadata(
|
|
locale: AppLocale.es,
|
|
overrides: overrides ?? {},
|
|
cardinalResolver: cardinalResolver,
|
|
ordinalResolver: ordinalResolver,
|
|
),
|
|
super(cardinalResolver: cardinalResolver, ordinalResolver: ordinalResolver) {
|
|
super.$meta.setFlatMapFunction($meta.getTranslation); // copy base translations to super.$meta
|
|
$meta.setFlatMapFunction(_flatMapFunction);
|
|
}
|
|
|
|
/// Metadata for the translations of <es>.
|
|
@override final TranslationMetadata<AppLocale, Translations> $meta;
|
|
|
|
/// Access flat map
|
|
@override dynamic operator[](String key) => $meta.getTranslation(key) ?? super.$meta.getTranslation(key);
|
|
|
|
late final TranslationsEs _root = this; // ignore: unused_field
|
|
|
|
@override
|
|
TranslationsEs $copyWith({TranslationMetadata<AppLocale, Translations>? meta}) => TranslationsEs(meta: meta ?? this.$meta);
|
|
|
|
// Translations
|
|
@override late final _Translations$app$es app = _Translations$app$es._(_root);
|
|
@override late final _Translations$inventory$es inventory = _Translations$inventory$es._(_root);
|
|
@override late final _Translations$quickAdd$es quickAdd = _Translations$quickAdd$es._(_root);
|
|
@override late final _Translations$quantityKind$es quantityKind = _Translations$quantityKind$es._(_root);
|
|
}
|
|
|
|
// Path: app
|
|
class _Translations$app$es extends Translations$app$en {
|
|
_Translations$app$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
|
|
|
final TranslationsEs _root; // ignore: unused_field
|
|
|
|
// Translations
|
|
@override String get title => 'Tanemaki';
|
|
}
|
|
|
|
// Path: inventory
|
|
class _Translations$inventory$es extends Translations$inventory$en {
|
|
_Translations$inventory$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
|
|
|
final TranslationsEs _root; // ignore: unused_field
|
|
|
|
// Translations
|
|
@override String get title => 'Inventario';
|
|
@override String get searchHint => 'Buscar semillas';
|
|
@override String get empty => 'Aún no hay semillas. Toca + para añadir la primera.';
|
|
@override String get uncategorized => 'Sin categoría';
|
|
}
|
|
|
|
// Path: quickAdd
|
|
class _Translations$quickAdd$es extends Translations$quickAdd$en {
|
|
_Translations$quickAdd$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
|
|
|
final TranslationsEs _root; // ignore: unused_field
|
|
|
|
// Translations
|
|
@override String get title => 'Añadir una semilla';
|
|
@override String get labelField => 'Nombre';
|
|
@override String get labelRequired => 'Ponle un nombre';
|
|
@override String get addPhoto => 'Añadir foto';
|
|
@override String get quantity => '¿Cuánta?';
|
|
@override String get more => 'Añadir más…';
|
|
@override String get save => 'Guardar';
|
|
@override String get cancel => 'Cancelar';
|
|
}
|
|
|
|
// Path: quantityKind
|
|
class _Translations$quantityKind$es extends Translations$quantityKind$en {
|
|
_Translations$quantityKind$es._(TranslationsEs root) : this._root = root, super.internal(root);
|
|
|
|
final TranslationsEs _root; // ignore: unused_field
|
|
|
|
// Translations
|
|
@override String get aFew => 'unas pocas';
|
|
@override String get some => 'algunas';
|
|
@override String get plenty => 'muchas';
|
|
@override String get handful => 'un puñado';
|
|
@override String get pinch => 'una pizca';
|
|
@override String get jar => 'un tarro';
|
|
@override String get packet => 'un sobre';
|
|
@override String get cob => 'una mazorca';
|
|
@override String get head => 'una cabezuela';
|
|
@override String get pod => 'una vaina';
|
|
@override String get ear => 'una espiga';
|
|
@override String get fruit => 'un fruto';
|
|
@override String get bulb => 'un bulbo';
|
|
@override String get tuber => 'un tubérculo';
|
|
@override String get seedHead => 'una cabeza de semillas';
|
|
@override String get bunch => 'un manojo';
|
|
@override String get grams => 'gramos';
|
|
@override String get count => 'unidades';
|
|
}
|
|
|
|
/// The flat map containing all translations for locale <es>.
|
|
/// Only for edge cases! For simple maps, use the map function of this library.
|
|
///
|
|
/// The Dart AOT compiler has issues with very large switch statements,
|
|
/// so the map is split into smaller functions (512 entries each).
|
|
extension on TranslationsEs {
|
|
dynamic _flatMapFunction(String path) {
|
|
return switch (path) {
|
|
'app.title' => 'Tanemaki',
|
|
'inventory.title' => 'Inventario',
|
|
'inventory.searchHint' => 'Buscar semillas',
|
|
'inventory.empty' => 'Aún no hay semillas. Toca + para añadir la primera.',
|
|
'inventory.uncategorized' => 'Sin categoría',
|
|
'quickAdd.title' => 'Añadir una semilla',
|
|
'quickAdd.labelField' => 'Nombre',
|
|
'quickAdd.labelRequired' => 'Ponle un nombre',
|
|
'quickAdd.addPhoto' => 'Añadir foto',
|
|
'quickAdd.quantity' => '¿Cuánta?',
|
|
'quickAdd.more' => 'Añadir más…',
|
|
'quickAdd.save' => 'Guardar',
|
|
'quickAdd.cancel' => 'Cancelar',
|
|
'quantityKind.aFew' => 'unas pocas',
|
|
'quantityKind.some' => 'algunas',
|
|
'quantityKind.plenty' => 'muchas',
|
|
'quantityKind.handful' => 'un puñado',
|
|
'quantityKind.pinch' => 'una pizca',
|
|
'quantityKind.jar' => 'un tarro',
|
|
'quantityKind.packet' => 'un sobre',
|
|
'quantityKind.cob' => 'una mazorca',
|
|
'quantityKind.head' => 'una cabezuela',
|
|
'quantityKind.pod' => 'una vaina',
|
|
'quantityKind.ear' => 'una espiga',
|
|
'quantityKind.fruit' => 'un fruto',
|
|
'quantityKind.bulb' => 'un bulbo',
|
|
'quantityKind.tuber' => 'un tubérculo',
|
|
'quantityKind.seedHead' => 'una cabeza de semillas',
|
|
'quantityKind.bunch' => 'un manojo',
|
|
'quantityKind.grams' => 'gramos',
|
|
'quantityKind.count' => 'unidades',
|
|
_ => null,
|
|
};
|
|
}
|
|
}
|