5.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T11:16:26.757827+00:00 | zai-org/GLM-5-FP8 | 1 | ef8f2f0524698a0d |
Documentation: DTS.Viewer.TestSummaryList.Resources
1. Purpose
This module provides localization/internationalization infrastructure for the TestSummaryList component of the DTS Viewer application. It enables XAML-based string resource lookups through a WPF markup extension (TranslateExtension) and exposes strongly-typed access to localized UI strings via the auto-generated StringResources class. The module supports the display of test summary information with sortable columns and metadata labels.
2. Public Interface
TranslateExtension (DTS.Viewer.TestSummaryList namespace)
A WPF markup extension for resolving localized strings in XAML bindings.
[MarkupExtensionReturnType(typeof(string))]
public class TranslateExtension : MarkupExtension
Constructor:
public TranslateExtension(string key)
- Creates an instance with the specified resource key to look up.
Method:
public override object ProvideValue(IServiceProvider serviceProvider)
- Returns the localized string for the stored key via
StringResources.ResourceManager.GetString(_key). - Returns
#stringnotfound#if_keyis null or empty. - Returns
#stringnotfound# {key}if the key is valid but no resource is found.
StringResources (DTS.Viewer.TestSummaryList.Resources namespace)
An internal, auto-generated strongly-typed resource class.
internal class StringResources
Properties:
| Property | Type | Description |
|---|---|---|
ResourceManager |
global::System.Resources.ResourceManager (static) |
Cached ResourceManager instance for the DTS.Viewer.TestSummaryList.Resources.StringResources resource bundle. |
Culture |
global::System.Globalization.CultureInfo (static) |
Gets or sets the current thread's UI culture for resource lookups. |
Localized String Properties (all internal static string):
| Property | Default Value (from comments) |
|---|---|
Browse |
"Browse..." |
ChannelCount |
"Channels: " |
Description |
"Description: " |
FileDate |
"File Date: " |
FileDateAscending |
"File Date" |
FileDateDescending |
"File Date (Descending)" |
IdAscending |
"Test ID" |
IdDescending |
"Test ID (Descending)" |
Refresh |
"Refresh" |
SetupNameAscending |
"Test Setup" |
SetupNameDescending |
"Test Setup (Descending)" |
Sort |
"Sort: " |
TestID |
"Test ID: " |
TestSetup |
"Test Setup: " |
TimeStamp |
"TimeStamp: " |
TimeStampAscending |
"TimeStamp" |
TimeStampDescending |
"TimeStamp (Descending)" |
Type |
"Type: " |
3. Invariants
-
Auto-generation constraint:
StringResourcesis auto-generated bySystem.Resources.Tools.StronglyTypedResourceBuilder(version 17.0.0.0). Manual edits will be lost upon regeneration. -
Non-null return guarantee:
TranslateExtension.ProvideValue()always returns a non-null string. It never returns null—missing keys produce error indicators. -
Error format for missing keys: When a resource key is not found, the return value follows the pattern
#stringnotfound# {key}where{key}is the requested key name. -
Empty key handling: A null or empty
_keyreturns exactly#stringnotfound#without a trailing key name. -
Resource manager identity: The
ResourceManagerproperty always returns an instance tied to the resource name"DTS.Viewer.TestSummaryList.Resources.StringResources"within the current assembly.
4. Dependencies
This module depends on:
System(core types)System.Windows.Markup(MarkupExtension,MarkupExtensionReturnTypeAttribute)System.Resources(ResourceManager)System.Globalization(CultureInfo)System.CodeDom.Compiler(generated code attributes)System.Diagnostics(generated code attributes)System.Runtime.CompilerServices(generated code attributes)System.ComponentModel(EditorBrowsableAttribute)
What depends on this module:
- Inferred: XAML files within the
DTS.Viewer.TestSummaryListmodule that use{local:Translate KeyName}syntax for localized UI strings. - Inferred: Code-behind files that access
StringResources.<PropertyName>directly for programmatic string retrieval.
5. Gotchas
-
Empty Japanese resource file:
StringResources.ja.Designer.csis present but empty. Japanese localization may be incomplete or handled through a different mechanism (e.g.,.resxfile without a separate designer file). -
Fallback culture behavior unclear: The source does not show explicit fallback logic. The actual fallback behavior (e.g., defaulting to English when a culture-specific resource is missing) depends on .NET's standard resource fallback process, which is not visible in this source.
-
Internal visibility:
StringResourcesis markedinternal, limiting direct programmatic access to code within the same assembly. External assemblies must useTranslateExtensionor another exposed mechanism. -
Trailing colons in labels: Several properties (
ChannelCount,Description,FileDate,Sort,TestID,TestSetup,TimeStamp,Type) include trailing colons and spaces in their default values. These are label strings intended for UI pairing with values, not standalone text. -
Case-sensitive key lookup:
TranslateExtensionpasses the key directly toResourceManager.GetString(). Key mismatches due to case sensitivity will result in "not found" errors rather than automatic correction.