Mercurial translations are not accessible

Bug #1772266 reported by André
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mercurial (Ubuntu)
New
Undecided
Unassigned

Bug Description

I want to use the pt_BR translation of Mercurial help. I've changed LANG, LC_ALL and even LANGUAGE to pt_BR but Mercurial is still using the english text.

The Mercurial's pt_BR translation is present at /usr/share/locale/pt_BR/LC_MESSAGES/hg.mo however, Mercurial seeks for it at another path: /usr/share/locale-langpack/pt_BR/LC_MESSAGES/hg.mo

Steps to reproduce:

export LANG='pt_BR'
strace -o trace.log hg version
grep pt_BR trace.log

Result:

stat("/usr/share/mercurial/locale/pt_BR.ISO8859-1/LC_MESSAGES/hg.mo", 0x7fff2da0e4d0) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale-langpack/pt_BR.ISO8859-1/LC_MESSAGES/hg.mo", 0x7fff2da0e4d0) = -1 ENOENT (No such file or directory)
stat("/usr/share/mercurial/locale/pt_BR/LC_MESSAGES/hg.mo", 0x7fff2da0e4d0) = -1 ENOENT (No such file or directory)
stat("/usr/share/locale-langpack/pt_BR/LC_MESSAGES/hg.mo", 0x7fff2da0e4d0) = -1 ENOENT (No such file or directory)

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: mercurial 4.5.3-1ubuntu2
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun May 20 11:39:54 2018
InstallationDate: Installed on 2018-05-13 (7 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: mercurial
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
André (andref-dias) wrote :
Revision history for this message
André (andref-dias) wrote :

A workaround:

sudo mkdir -p -m 755 /usr/share/mercurial/locale/pt_BR/LC_MESSAGES/
sudo ln -s /usr/share/locale/pt_BR/LC_MESSAGES/hg.mo \
           /usr/share/mercurial/locale/pt_BR/LC_MESSAGES/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.