EnerOS v0.26.0 Release Notes
Release Date: 2025-10-05 Codename: Babel Git Tag: v0.26.0 Support Status: Stable Total Crates: 67 (3 new) Test Cases: 8550+ (450+ new)
Overview
EnerOS v0.26.0 “Babel” is an internationalization (i18n)-focused release that enables EnerOS to serve power operators in different regions worldwide. Although power systems follow universal physical laws, different countries/regions differ significantly in language, unit system, voltage levels, frequency standards, regulatory requirements, and time zones. v0.26.0 abstracts these regional differences into a configurable localization layer, allowing the same kernel code to seamlessly adapt to different regions.
This release introduces five core capabilities: i18n Framework, Multi-language Support, Regional Adaptation, Timezone Handling, and Localized Documentation. All user-facing strings, dates, numbers, and units are rendered through the localization layer, while kernel logic remains language-agnostic.
In terms of design philosophy, v0.26.0 adheres to “kernel language-agnostic” — kernel and agent business logic does not depend on any specific language; “region configuration-driven” — regional differences are handled through configuration files rather than code branches; “timezone as first-class citizen” — all timestamps use UTC internally and are only converted to local time zones for display and interaction.
Key Metrics
| Metric | Value | Description |
|---|---|---|
| Supported languages | 12 | Chinese, English, Japanese, Korean, German, French, etc. |
| Supported time zones | All IANA | 384 zones |
| Localization entries | 8000+ | UI strings |
| Region configuration sets | 8 | Major markets |
| New Crates | 3 | i18n-related |
| New tests | 450+ | Includes localization tests |
New Features
1. i18n Framework
Introduces the eneros-i18n Crate, providing a unified internationalization framework. Based on Fluent (Project Fluent), it supports complex syntax such as plurals, gender, and context.
Basic Usage
use eneros_i18n::{I18n, Locale};
let i18n = I18n::new()
.locale(Locale::zh_CN())
.fallback(Locale::en_US())
.load_dir("locales/")?;
// Translate
let msg = i18n.t("alarm.voltage-high", |b| b
.arg("bus", "42")
.arg("voltage", "1.08"))?;
// Chinese: "母线 42 电压 1.08pu 越上限"
// English: "Bus 42 voltage 1.08pu exceeds upper limit"
Plural Handling
// Plural form auto-adaptation
let msg = i18n.t("alarm.devices-offline", |b| b
.arg("count", 3))?;
// Chinese: "3 台设备离线"
// English: "3 devices offline"
// Russian: "3 устройства не в сети" (Russian has 3 plural forms)
Supported Languages
| Language | Code | Completeness | Major Market |
|---|---|---|---|
| Simplified Chinese | zh-CN | 100% | Mainland China |
| English | en-US | 100% | North America |
| English | en-GB | 95% | United Kingdom |
| Japanese | ja-JP | 92% | Japan |
| Korean | ko-KR | 88% | South Korea |
| German | de-DE | 90% | Germany |
| French | fr-FR | 85% | France |
| Spanish | es-ES | 82% | Spain/Latin America |
| Portuguese | pt-BR | 80% | Brazil |
| Russian | ru-RU | 78% | Russia |
| Arabic | ar-SA | 65% | Middle East |
| Hindi | hi-IN | 60% | India |
2. Multi-language Support
Introduces eneros-i18n-mo (Multi-language Orchestrator), supporting runtime dynamic language switching without restart.
Dynamic Switching
use eneros_i18n_mo::LanguageManager;
let lang_mgr = LanguageManager::new(&i18n);
// Switch by user preference
lang_mgr.set_locale(user_id, Locale::ja_JP()).await?;
// Auto-detect by region
let detected = lang_mgr.detect_from_region("JP")?;
lang_mgr.set_default(detected)?;
Agent Multi-language
// Agent responds in user's language
let agent = Agent::new("dispatch-assistant")
.language(LanguagePolicy::FollowUser);
// Chinese user question
let reply = agent.chat("母线 42 电压为什么偏高?").await?;
// Chinese reply
// English user question
let reply = agent.chat("Why is bus 42 voltage high?").await?;
// English reply
Translation Workflow
| Stage | Description | Tool |
|---|---|---|
| Extraction | Extract strings to translate from code | xtr |
| Translation | Human/machine translation | Crowdin |
| Compilation | Compile to .ftl files | fluent |
| Loading | Runtime loading | eneros-i18n |
| Validation | Check missing/conflicts | In-house tool |
3. Regional Adaptation
Introduces the eneros-i18n-region Crate, providing regional difference adaptation. Voltage levels, frequency, unit systems, and protection configurations for different regions are managed through region configuration sets.
Region Configuration
use eneros_i18n_region::{Region, RegionConfig};
let region = Region::from_code("CN")
.config(RegionConfig {
frequency_hz: 50.0,
voltage_levels: vec![110, 220, 500, 750, 1000],
voltage_unit: VoltageUnit::KV,
power_unit: PowerUnit::MW,
coordinate_system: CoordSystem::CGCS2000,
standard: Standard::GB,
});
manager.set_region(region)?;
Regional Difference Table
| Region | Frequency (Hz) | Voltage Levels (kV) | Unit System | Coordinate System | Standard |
|---|---|---|---|---|---|
| China | 50 | 110/220/500/750/1000 | Metric | CGCS2000 | GB |
| USA | 60 | 115/230/500/765 | Imperial + Metric | NAD83 | IEEE/NERC |
| Europe | 50 | 110/220/380 | Metric | ETRS89 | EN/IEC |
| Japan | 50/60 | 66/154/275/500 | Metric | JGD2011 | JIS |
| Brazil | 60 | 138/230/500/750 | Metric | SIRGAS2000 | ABNT |
Unit Conversion
use eneros_i18n_region::units::{Voltage, Power, Energy};
// Auto-convert by region
let v = Voltage::from_kv(220.0);
println!("{}", v.display(®ion)); // CN: "220.0 kV"
let p = Power::from_mw(500.0);
println!("{}", p.display(®ion)); // US: "500 MW"
let e = Energy::from_kwh(1000.0);
println!("{}", e.display(®ion)); // CN: "1000 kWh"
4. Timezone Handling
Introduces the eneros-i18n-tz Crate, providing comprehensive timezone handling. All internal timestamps use UTC nanosecond precision and are only converted to local time zones for display and interaction.
Timezone Conversion
use eneros_i18n_tz::{Timestamp, TimeZone};
// Internal storage: UTC nanoseconds
let event_time = Timestamp::now_utc();
// Display: by user timezone
let tz = TimeZone::from_iana("Asia/Shanghai");
let local = event_time.to_local(&tz);
println!("Event time: {}", local.format("%Y-%m-%d %H:%M:%S %Z"));
// "Event time: 2025-10-05 14:30:00 CST"
// Cross-timezone comparison
let ny = TimeZone::from_iana("America/New_York");
println!("New York time: {}", event_time.to_local(&ny).format(...));
// "New York time: 2025-10-05 02:30:00 EDT"
Cross-timezone Scheduling
// Cross-timezone operations orchestration
let maintenance_window = MaintenanceWindow::new()
.start("2025-10-05 02:00:00", TimeZone::America/New_York)
.duration(Duration::hours(4));
// Auto-convert to each node's local time
for node in cluster.nodes() {
let local_start = maintenance_window.start_at(&node.timezone);
println!("{}: local start {}", node.id, local_start);
}
Timezone Handling Rules
| Scenario | Handling | Description |
|---|---|---|
| Internal storage | UTC nanoseconds | Unified baseline |
| Logs | UTC | Easy sorting |
| UI display | User timezone | Local-friendly |
| Scheduling | Regional timezone | By business |
| Alarms | User timezone | Instant notification |
| Reports | Regional timezone | Compliance requirements |
5. Localized Documentation
Introduces the eneros-i18n-docs Crate, providing documentation localization capabilities. Technical documentation, operations manuals, and API references all support multi-language versions.
Documentation Build
use eneros_i18n_docs::{DocBuilder, Locale};
let builder = DocBuilder::new()
.source("docs/")
.output("dist/docs/")
.locales(vec![Locale::zh_CN(), Locale::en_US(), Locale::ja_JP()]);
builder.build().await?;
Documentation Translation Status
| Document Type | zh-CN | en-US | ja-JP | Other |
|---|---|---|---|---|
| Quick Start | 100% | 100% | 95% | 70% |
| User Guide | 100% | 95% | 80% | 60% |
| API Reference | 100% | 100% | 60% | 30% |
| Ops Manual | 100% | 85% | 50% | 20% |
| Best Practices | 90% | 80% | 40% | 15% |
Improvements
- String Extraction: Added
eneros-i18n-extracttool to automatically extract strings to translate from code - RTL Support: Arabic and other right-to-left languages get full UI adaptation
- Date Format: Supports region-specific date formats (YYYY-MM-DD / MM/DD/YYYY / DD/MM/YYYY)
- Number Format: Supports regional differences in thousands separators and decimal points (1,000.00 / 1.000,00)
Bug Fixes
- Fixed
eneros-i18nparsing error with nested Fluent message references (#2605) - Fixed
eneros-i18n-tztime offset issue at daylight saving time boundaries (#2610) - Fixed
eneros-i18n-regionprecision loss in unit conversion with mixed imperial/metric (#2615) - Fixed
eneros-i18n-docslink errors when building multi-language versions (#2620)
Breaking Changes
Timestamp::now: Renamed toTimestamp::now_utcto emphasize UTC semanticsformat!calls: All user-facing strings must be translated viai18n.t(); hardcoding is prohibited
Upgrade Guide
- Run
cargo update -p eneros-i18n - Update
Timestamp::nowcalls toTimestamp::now_utc - Migrate hardcoded user-facing strings to
.ftlfiles - Refer to
docs/migration/v0.26.0.mdfor detailed migration steps