2.7 KiB
2.7 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:11:57.317124+00:00 | zai-org/GLM-5-FP8 | 1 | c1490f04f3bdab0f |
Resources
Purpose
This module provides localization support for the ViewerSettings feature through a XAML markup extension and strongly-typed resource access. The TranslateExtension allows XAML bindings to localized strings, while StringResources provides compile-time-safe access to localized strings related to calibration behavior settings.
Public Interface
TranslateExtension (inherits MarkupExtension)
TranslateExtension(string key)- Constructor accepting the resource key to look up.ProvideValue(IServiceProvider serviceProvider)- Returns the localized string fromStringResources.ResourceManager.GetString(_key). Returns"#stringnotfound#"if key is null/empty, or"#stringnotfound# " + _keyif the key is not found in resources.
StringResources (auto-generated)
ResourceManager- Static property returning the cachedResourceManagerinstance for the"DTS.Viewer.ViewerSettings.Resources.StringResources"resource name.Culture- Static property for getting/setting theCultureInfofor resource lookups.CalibrationBehavior_LinearIfAvailable- Localized string: "Use the linear sensitivity, if available".CalibrationBehavior_NonLinearIfAvailable- Localized string: "Use the non-linear sensitivity, if available".CalibrationBehavior_UseBothIfAvailable- Localized string: "Use both sensitivities, if available, as separate channels".CalibrationBehaviorText- Localized string: "Calibration Behavior".
Invariants
TranslateExtension._keyis set at construction time and cannot be changed.StringResourcesclass isinternaland all members areinternal.- The resource manager is lazily initialized on first access.
Dependencies
Depends on:
System.Windows.Markup(MarkupExtension,MarkupExtensionReturnTypeAttribute)System.Resources(ResourceManager)System.Globalization(CultureInfo)
Depended on by: Not determinable from source alone, but likely used by XAML files in the ViewerSettings module.
Gotchas
- Fallback string format: When a key is not found, the returned string includes the key name appended after
"#stringnotfound# ". This is useful for debugging but may appear in production if resources are missing. - Auto-generated file:
StringResources.Designer.csis auto-generated and should not be manually edited. Changes should be made to the corresponding.resxfile.