// Variables.
@use 'dictionary.variables' as variables;
// Modules.
@use '../../../map';
// The `translator.dictionary-pick()` or `dictionary.pick()` function.
@function pick($keys...) {
@return map.pick(variables.$dictionary, $keys...);
}
// Use.
@use '@angular-package/sass/translator';
// Examples.
$-dictionary: (
general: (word: słowo, (wrapper, wrap): owijka, technology: (action: akcja)),
class: (prefix: spectre-prefix, suffix: spectre-suffix, calendars: (calendar: cal), labels: (label: lab)),
prefix: spectre,
suffix: end,
separator: '--',
var: (prefix: spectre, suffix: end)
);
$-test: translator.dictionary-merge(null, $-dictionary);
// Examples.
// Pick the key
@debug translator.dictionary-pick(general); // (general: (word: słowo, (wrapper, wrap): owijka, technology: (action: akcja)))
// Pick nested key
@debug translator.dictionary-pick((class, calendars)); // (calendars: (calendar: cal))
// Pick multiple keys
@debug translator.dictionary-pick(general, (class, calendars)); // (general: (word: słowo, (wrapper, wrap): owijka, technology: (action: akcja)), calendars: (calendar: cal))