locales - error: Bad entry 'kab_DZ '

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by tracing the code that writes /var/lib/locales/supported.d/mintlocale, then inspect how locale-gen consumes that file. Done means each locale is written only in the formatted locale-and-charset form, with no bare entries and no corresponding "Bad entry" warnings.

Written by the indexing model from the issue text.

Description

mintlocale incorrectly writes malformed locale entries to /var/lib/locales/supported.d/mintlocale.

When installing locales, it duplicates entries:

  • one bare locale name without charset
  • and one properly formatted.

For example, for Kabyle (kab_DZ), it writes :

kab_DZ / Malformed: missing charset
kab_DZ.UTF-8 UTF-8 / Correct format

The bare entries cause locale-gen to emit multiple "error: Bad entry" warnings:

...
error: Bad entry 'ar_IN '
error: Bad entry 'ar_SS '
error: Bad entry 'en_AG '
error: Bad entry 'en_IL '
error: Bad entry 'en_IN '
error: Bad entry 'en_NG '
error: Bad entry 'en_ZM '
error: Bad entry 'kab_DZ '
error: Bad entry 'sw_KE '
error: Bad entry 'sw_TZ '
error: Bad entry 'zgh_MA '
...

Although generation succeeds, these warnings clutter output and indicate incorrect data handling.

Forum thread : https://forums.linuxmint.com/viewtopic.php?t=248836

Dominant language
Python
Stars
19
Forks
20
Avg merge
18d 5h
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linuxmint/mintlocale

All issues in linuxmint/mintlocale

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.