2.9 KiB
2.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:12:22.117936+00:00 | zai-org/GLM-5-FP8 | 1 | 98cd5a2347e82926 |
Resources
Purpose
This module provides localization infrastructure for the ISO ExtraProperties feature. It contains a WPF markup extension for XAML-based string resource lookup and an auto-generated strongly-typed resource class that wraps a .resx file containing localized strings for validation messages and UI labels related to key-value property handling.
Public Interface
TranslateExtension class (MarkupExtension):
TranslateExtension(string key)- Constructor accepting the resource key to look up.object ProvideValue(IServiceProvider serviceProvider)- Returns the localized string for_key, or an error marker if not found.
StringResources class (internal, auto-generated):
static ResourceManager ResourceManager { get; }- Returns the cachedResourceManagerinstance for theExtraProperties.Resources.StringResourcesresource bundle.static CultureInfo Culture { get; set; }- Gets or sets the current UI culture for resource lookups.static string InvalidLine { get; }- Localized string: "Invalid pasted channel code, line: {0}".static string Key { get; }- Localized string: "Key".static string NoValueWarning { get; }- Localized string: "The following keys have no value:".static string RepeatKeyError { get; }- Localized string: "Keys must be unique. The following repeat:".static string Value { get; }- Localized string: "Value".
Invariants
TranslateExtension._keyis immutable after construction (readonly field).ProvideValuealways returns a non-null string; it never returns null.- When
_keyis null or empty,ProvideValuereturns the constant"#stringnotfound#". - When the resource key is not found in the resource manager,
ProvideValuereturns"#stringnotfound# "concatenated with the key name. StringResourcesis markedinternaland cannot be accessed outside its assembly.
Dependencies
- Depends on:
System,System.Windows.Markup(forMarkupExtensionandMarkupExtensionReturnTypeAttribute),System.Resources(forResourceManager),System.Globalization(forCultureInfo). - Depended on by: Unclear from source alone; presumably XAML files in the ISO ExtraProperties module that use
{x:Static}or theTranslateExtensionmarkup extension.
Gotchas
- The
NotFoundconstant value"#stringnotfound#"is hardcoded and duplicated across multiple modules (see DBImportExport/Resources). Changes to this error format would require updates in multiple places. - The
StringResourcesclass is auto-generated; manual edits will be lost when the.resxfile is regenerated.