Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Fixed

## Version 0.0.2-alpha - 2026-07-20
### Fixed
- Fall back to `Locale.ROOT` (`i18n.properties`) when no explicit `i18n_en.properties` exists, so applications following the CAP default i18n convention no longer fail at startup with unresolved English placeholders

### Changed
- Updated cds.services.version to 5.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,15 @@ public Set<Locale> getAvailableLocalesForEvent(CdsEvent event) {
public Map<String, String> getI18nTexts(Locale locale) {
EdmxI18nProvider provider = getProvider();
if (provider != null) {
return provider.getTexts(locale);
Map<String, String> texts = new HashMap<>(provider.getTexts(locale));
// Also include Locale.ROOT (default i18n.properties) as fallback so that apps without an
// explicit i18n_en.properties file work correctly. putIfAbsent ensures that locale-specific
// entries from i18n_en.properties take precedence over root entries when both exist.
if (Locale.ENGLISH.equals(locale)) {
Map<String, String> rootTexts = provider.getTexts(Locale.ROOT);
rootTexts.forEach(texts::putIfAbsent);
}
return texts;
}
logger.warn("EdmxI18nProvider not available, i18n resolution will not work");
return Collections.emptyMap();
Expand Down
Loading