Files
2026-04-17 14:55:32 -04:00

3.5 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DataPRO/Modules/Groups/GroupImport/Resources/TranslateExtension.cs
DataPRO/Modules/Groups/GroupImport/Resources/StringResources.Designer.cs
2026-04-17T15:58:05.941398+00:00 zai-org/GLM-5-FP8 1 649541a3a7393158

Documentation: GroupImport Resources Module

1. Purpose

This module provides localization infrastructure for the Group Import feature in DataPRO. It consists of a WPF markup extension (TranslateExtension) enabling XAML-based string resource lookup, and an auto-generated strongly-typed resource class (StringResources) containing localized strings for TDAS group file import operations, validation messages, preview UI labels, and error/warning text. The module supports the import workflow from file selection through validation to completion.


2. Public Interface

TranslateExtension (Class)

Namespace: DBImportExport.Resources
Attribute: [MarkupExtensionReturnType(typeof(string))]

A WPF markup extension for retrieving localized strings in XAML bindings.

Member Signature Description
Constructor TranslateExtension(string key) Initializes the extension with the resource key to look up.
ProvideValue override object ProvideValue(IServiceProvider serviceProvider) Returns the localized string for _key, or a fallback indicator if not found.
NotFound const string = "#stringnotfound#" Constant returned when the key is null, empty, or the resource is missing.

Behavior of ProvideValue:

  • Returns NotFound if _key is null or empty.
  • Returns StringResources.ResourceManager.GetString(_key) if the key exists.
  • Returns NotFound + " " + _key if the key is not found in the resource manifest.

StringResources (Class)

Namespace: GroupImport.Resources
Modifiers: internal, sealed (implied by auto-generation)

A strongly-typed resource class auto-generated by StronglyTypedResourceBuilder. Provides access to localized strings via static properties.

Member Type Description
ResourceManager static ResourceManager Returns the cached ResourceManager instance for this assembly. Lazy-initialized.
Culture static CultureInfo Gets/sets the current UI culture for resource lookups.

Resource String Properties (static, read-only):

Property Default Value (from comments) Context
GroupTags "Group Tag(s): " Label for group tags display
Import_Importing "Importing {0}:{1}" Import progress message (format string)
ImportFileFilter "TDAS group file (.grp)|.grp|All Files (.)|." File dialog filter
Importing_Done "Done" Import completion status
None "(None)" Null/empty placeholder
Options_Browse "Browse" Browse button label
Options_Files "File(s)" Files label
Options_Format "Format" Format label
Preview_CompleteGroupChannels "Channels that will be imported" Preview section header
Preview_EmptyFile "Empty file" Empty file warning
Preview_Groups "Groups" Groups label
Preview_IncompleteGroupChannels "Channels that will not be imported" Preview section header
Preview_InvalidFullScaleCapacity "Invalid full scale capacity" Validation error
Preview_InvalidFullScaleInput "Invalid desired range for {0}::{1}, the sensor capacity will be used instead." Validation warning (format string)