Skip to content

feat(ui): Show language banner image as fallback when country image is unavailable - #45

Merged
unknowIfGuestInDream merged 3 commits into
masterfrom
copilot/feature-show-language-banner-image
May 15, 2026
Merged

feat(ui): Show language banner image as fallback when country image is unavailable#45
unknowIfGuestInDream merged 3 commits into
masterfrom
copilot/feature-show-language-banner-image

Conversation

Copilot AI commented May 15, 2026

Copy link
Copy Markdown

When a locale has only a language component (e.g. de, fr, zh) and no country code, the properties editor always showed a blank placeholder image instead of any meaningful banner.

Change

In BundleEntryComposite.loadCountryIcon, added an else if fallback that attempts to resolve a banner using the language code when no country code is present:

if (countryCode != null && countryCode.length() > 0) {
    image = UIUtils.getImage("countries/" + countryCode.toLowerCase() + ".gif");
} else if (countryLocale != null
        && countryLocale.getLanguage() != null
        && countryLocale.getLanguage().length() > 0) {
    // show language image when country image is not available
    String languageCode = countryLocale.getLanguage();
    image = UIUtils.getImage("countries/" + languageCode.toLowerCase() + ".gif");
}
// existing blank.gif fallback remains unchanged

Port of essiembre/eclipse-rbe#62.

Port of upstream PR essiembre#62: when a locale has no
country code (e.g. 'de' instead of 'de_DE'), fall back to using the
language code to load a banner image from the countries/ icon folder,
rather than always showing the blank placeholder.

Agent-Logs-Url: https://github.com/tlcsdm/eclipse-rbe/sessions/9779990f-d04d-44fd-bc76-f20f89847b06

Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tlcsdm/eclipse-rbe/sessions/9779990f-d04d-44fd-bc76-f20f89847b06

Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com>
Copilot AI changed the title [WIP] Add language banner image in properties editor feat(ui): Show language banner image as fallback when country image is unavailable May 15, 2026
@unknowIfGuestInDream
unknowIfGuestInDream merged commit 87e7f9f into master May 15, 2026
18 checks passed
@unknowIfGuestInDream
unknowIfGuestInDream deleted the copilot/feature-show-language-banner-image branch May 15, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Show language banner image in the properties Editor

2 participants