Files
dart-core-sdk/lib/utils/translations.dart
2026-06-02 15:06:06 +00:00

41 lines
1.1 KiB
Dart

// Code generated by translations generator; DO NOT EDIT.
// Source: translations.yaml
// ignore_for_file: non_constant_identifier_names
/// Label represents a translation key scoped to a specific context.
class Label {
/// Context is the translation scope (e.g. "metadata").
final String context;
/// Key is the unique translation identifier within the context.
final String key;
const Label({required this.context, required this.key});
}
/// Builds a translation label for a metadata key.
Label metadataKeyLabel(String domain, String entity, String parent, String name) {
return Label(
context: 'metadata',
key: [domain, entity, parent, name, "key"].join('_').toLowerCase(),
);
}
/// Builds a translation label for a metadata value.
Label metadataValueLabel(String domain, String entity, String parent, String name, String value) {
return Label(
context: 'metadata',
key: [domain, entity, parent, name, "value", value].join('_').toLowerCase(),
);
}
/// Builds a translation site label for a key.
Label siteLabel(String key) {
return Label(
context: 'Site',
key: ["key", key].join('_').toLowerCase(),
);
}