google / google/arb-editor

False "Missing messages from template" warning for locale inheritance in ARB files

Open
#83 11 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
64
Forks
11
Avg merge
2d 3h
Merged PRs (30d)
18

Description

## Description

When working with ARB files for localization, it is common to have a base locale file (e.g., `app_en.arb`) and region-specific files (e.g., `app_en_us.arb`). The region-specific file is expected to inherit messages from the base locale if a key is missing.

However, the extension currently shows a "Missing messages from template" warning for keys that are intentionally inherited from the base locale file. This warning is misleading, since the missing messages will be correctly delegated from the base locale during code generation.

## Expected behavior

The extension should recognize locale inheritance (e.g., `en_us` inheriting from `en`) and suppress "missing messages" warnings for keys that are present in the base locale file.

## Actual behavior

The extension reports missing messages even though they are inherited from the base locale.

## Steps to reproduce

1. Create a base locale ARB file (e.g., `app_en.arb`) with some messages.
2. Create a region-specific ARB file (e.g., `app_en_us.arb`) without duplicating inherited messages.
3. Observe the "Missing messages from template" warning.

## Suggested solution

Update the extension to detect locale inheritance based on file naming conventions and suppress missing message warnings for inherited

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.