3.5 KiB
3.5 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:12:01.658855+00:00 | zai-org/GLM-5-FP8 | 1 | fda3169cc98a4753 |
Resources
Purpose
This module provides localization support for the PSD (Power Spectral Density) Report Results component within the DTS Viewer application. It exists to enable XAML-based string lookup for UI elements, allowing the report results interface to be localized. The module contains a WPF markup extension for direct XAML binding and a strongly-typed resource class with strings specific to PSD report results.
Public Interface
TranslateExtension class (public, inherits MarkupExtension)
TranslateExtension(string key)- Constructor accepting the resource key to look up.override object ProvideValue(IServiceProvider serviceProvider)- Returns the localized string for the given_key. Returns#stringnotfound#if the key is null or empty, or#stringnotfound# <key>if the resource lookup fails.
StringResources class (internal sealed)
static ResourceManager ResourceManager { get; }- Returns the cachedResourceManagerinstance for theDTS.Viewer.PSDReportResults.Resources.StringResourcesresource bundle.static CultureInfo Culture { get; set; }- Gets or sets the current thread'sCurrentUICulturefor resource lookups.static string ChannelName { get; }- Localized string "Name".static string ExportPSDHeader { get; }- Localized string "Export".static string ExportPSDtoCSV { get; }- Localized string "Export PSD to CSV".static string ExportPSDtoPDF { get; }- Localized string "Export PSD to PDF".static string GRMS { get; }- Localized string "GRMS".static string PSDResultsHeader { get; }- Localized string "Results".static string SampleRate { get; }- Localized string "Sample Rate".
Invariants
- The
TranslateExtensionclass is decorated with[MarkupExtensionReturnType(typeof(string))], guaranteeing it returns a string when used in XAML. - The
ProvideValuemethod never returnsnull; it returns a fallback string beginning with#stringnotfound#on lookup failure. - The
StringResources.ResourceManagerproperty lazily initializes exactly once. - All resource string properties in
StringResourcesareinternaland return non-null values if the.resxfile is properly configured.
Dependencies
- Depends on:
System(forIServiceProvider,String),System.Windows.Markup(forMarkupExtension,MarkupExtensionReturnTypeAttribute),System.Resources(forResourceManager),System.Globalization(forCultureInfo). - Depended on by: XAML files within
DTS.Viewer.PSDReportResultsthat use{local:Translate KeyName}syntax, and any code in that assembly requiring localized strings.
Gotchas
- The
TranslateExtensionclass is defined in namespaceDTS.Viewer.PSDReportResultsbut referencesDTS.Viewer.PSDReportResults.Resources.StringResources. This namespace structure must be accounted for in XAML namespace declarations. - The
NotFoundconstant value#stringnotfound#is hardcoded and will appear in the UI if a resource key is missing, which may be visible to end users during development. - The
StringResources.Designer.csfile is auto-generated; manual changes will be overwritten. Edit the corresponding.resxfile instead.