generate_partial_keys

Function generate_partial_keys 

Source
pub fn generate_partial_keys(full_key: &str) -> Vec<String>
Expand description

Generate partial keys from a full translation key for common i18n patterns

For a key like “invoice.labels.add_new”, this generates:

  • “invoice.labels.add_new” (full key)
  • “labels.add_new” (without first segment - namespace pattern)
  • “invoice.labels” (without last segment - parent namespace pattern)