Bug 11139 - Locale settings does not have effects
Summary: Locale settings does not have effects
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2.1
Hardware: Other arm
: High normal
Target Milestone: 2.3 M4
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-09 12:04 UTC by Yocto User
Modified: 2017-03-10 08:34 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yocto User 2017-03-09 12:04:31 UTC
Preconditions/Environment
-------------------------
Host system: Ubuntu 14.04.5 LTS (Trusty Tahr)
Yocto version: YP Core - Morty 2.2.1
Target: SABRE Board for Smart Devices based on i.MX 6Quad processor
Additional meta: meta-freescale, meta-freescale-3rdparty, meta-freescale-distro

Triggering Action/Cause
-----------------------
Modified the local.conf to specify the desired locales with the add of the following variable:
IMAGE_LINGUAS = "de-de fr-fr en-gb"

Built a base image with the command:
bitbake core-image-base

Booted the image into the SABRE board

Expectation
-----------
The filesystem contains the desired locales into the path:
/usr/share/locale

The generated locales do support UTF-8 encoding

The output of the command:
LANG=fr_FR df | head -n1

is translated in french.

Actual Result
-------------
The filesystem contains the desired locales:
root@imx6qsabresd:~# ls -la /usr/share/locale/
drwxr-xr-x    5 root     root          1024 Mar  8 10:34 .
drwxr-xr-x   13 root     root          1024 Mar  8 10:34 ..
drwxr-xr-x    3 root     root          1024 Mar  8 10:34 de
drwxr-xr-x    3 root     root          1024 Mar  8 10:34 en_GB
drwxr-xr-x    3 root     root          1024 Mar  8 10:45 fr

The output of the commands:
root@imx6qsabresd:~# LANG=fr_FR df | head -n1
Filesystem           1K-blocks      Used Available Use% Mounted on

root@imx6qsabresd:~# LANG=fr df | head -n1
Filesystem           1K-blocks      Used Available Use% Mounted on

is in english. No french translation.

Reproducibility
---------------
Always
Comment 1 Ross Burton 2017-03-09 17:19:26 UTC
Update: df is a bad choice as busybox doesn't support locales.
Comment 2 Ross Burton 2017-03-09 17:53:34 UTC
root@bob:/usr/lib/locale/fr_FR# LANG=fr_FR sed --help
Utilisation: sed [OPTION]... {script-seulement-si-pas-d'autre-script}

It's not totally broken, just need to make sure you don't use a busybox binary as that doesn't support translations.
Comment 3 Yocto User 2017-03-10 08:34:21 UTC
Not a bug, the problem was caused by the fact that the "df" tool from BusyBox v1.24.1 does not support translations. When checking locales be sure to use a binary that supports them.