mirror of
https://github.com/bitwarden/browser
synced 2026-02-27 10:03:23 +00:00
Handle params
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import * as fs from "fs";
|
||||
|
||||
import { CombinedTranslations, TranslationCombiner } from "./translation-combiner";
|
||||
import {
|
||||
CombinedTranslations,
|
||||
TranslationCombiner,
|
||||
TranslationEntry,
|
||||
} from "./translation-combiner";
|
||||
|
||||
/**
|
||||
* Service for looking up translations during template migration
|
||||
@@ -49,6 +53,17 @@ export class TranslationLookup {
|
||||
return entry ? entry.message : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the full translation entry for a key
|
||||
*/
|
||||
getTranslationEntry(key: string): TranslationEntry | null {
|
||||
if (!this.isLoaded) {
|
||||
throw new Error("Translations not loaded. Call loadTranslations() first.");
|
||||
}
|
||||
|
||||
return this.translations[key] || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get translation with fallback to key if not found
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user