1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-27 10:03:23 +00:00

Handle params

This commit is contained in:
Hinton
2025-07-29 11:51:55 +02:00
parent 9d6a5e66c7
commit ffadd13dbc
8 changed files with 442 additions and 38 deletions

View File

@@ -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
*/