Skip to content

Desktop GUI has some features not appearing in French #70

Closed
@Jose-Matsuda

Description

Describe the bug:

XFCE VNC does not get fully localized into French (first image below) after installing the locale and setting the environment variables.

Expected behaviour:

The XFCE installed applications (using thunar as an example) to appear in French (second image below).

Steps to reproduce the issue:
In a docker file

FROM mltooling/ml-workspace-minimal:0.12.1
RUN \
    apt-get update && \
    apt-get install -y locales && \
    sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen && \
    dpkg-reconfigure --frontend=noninteractive locales && \
    clean-layer.sh
ENV LANG=fr_FR.UTF-8 LANGUAGE=fr_FR.UTF-8 LC_ALL=fr_FR.UTF-8

Build: sudo docker build -t mltest
Run: sudo docker run --rm -p 8080:8080 mltest
Navigate to desktop gui

Technical details:

  • Workspace version: 0.12.1 (base)
  • Docker versionL: 20.10.0
  • Host Machine OS (Windows/Linux/Mac): Linux
  • Command used to start the workspace : sudo docker run --rm -p 8080:8080 mltest
  • Browser (Chrome/Firefox/Safari): Firefox

Possible Fix:
I don't know :(

Additional context:
I've looked at and extended just an xfce specific image here and was able to get the UI to fully appear in French (see second image below). That image is based on ubuntu:16.04.

image

I would instead expect something like
image

Activity

raethlein

raethlein commented on Jan 14, 2021

@raethlein
Member

Hey @Ito-Matsuda,

could you try out the following please:

  1. Open a terminal in your running workspace

  2. Execute the following commands to set the locale:

    echo 'export LC_ALL=fr_FR.UTF-8' >> ~/.xsessionrc
    echo 'export LANG=fr_FR.UTF-8' >> ~/.xsessionrc
    echo 'export LANGUAGE=fr_FR.UTF-8' >> ~/.xsessionrc
    
    sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen && \
    dpkg-reconfigure --frontend=noninteractive locales
  3. Restart vnc: supervisorctl restart novnc vncserver

  4. Refresh the noVNC page

Jose-Matsuda

Jose-Matsuda commented on Jan 15, 2021

@Jose-Matsuda
Author

Hi there,
Unfortunately that doesn't seem to work.
image
then
image

I also get the vncserver failing / continuously exiting after running the restart vnc.

image. I get the same result if I stop novnc and then vncserver in the Supervisor status page.

raethlein

raethlein commented on Jan 18, 2021

@raethlein
Member

Hm, I have not found any solution yet so maybe the problem is the version of Thunar? If that is the case, the problem might be solved as soon as it is updated.

Jose-Matsuda

Jose-Matsuda commented on Jan 18, 2021

@Jose-Matsuda
Author

I think some mo files are not being generated correctly or there is something messing with it. If I get a Thunar.mo file from an ubuntu:16.04 image from this other desktop project

image

and place it in either /usr/share/locale/fr/LC_MESSAGES or /usr/share/locale-langpack/fr/LC_MESSAGES and it becomes localized.

image

raethlein

raethlein commented on Jan 20, 2021

@raethlein
Member

Hey @Ito-Matsuda, thanks for the hint with the Thunar.mo file!
So, I have figured out that the translation files for Thunar are in the thunar-data package (e.g. here).
When I install the package in a ubuntu:16.04 docker container, then the *.mo files are copied to the /usr/share/locale/* directory, while they are not copied in a ubuntu:18.04 or ubuntu:20.04 container.

How to try out:

# in (brackets) the command for 18.04 if different
docker run -it --entrypoint /bin/bash ubuntu:16.04 (docker run -it --entrypoint /bin/bash ubuntu:18.04)

apt-get update && apt-get install -y wget
wget http://ports.ubuntu.com/pool/universe/t/thunar/thunar-data_1.6.11-0ubuntu0.16.04.2_all.deb (wget http://ports.ubuntu.com/pool/universe/t/thunar/thunar-data_1.6.15-0ubuntu1.18.04.1_all.deb)

dpkg -i thunar-data_1.6.11-0ubuntu0.16.04.2_all.deb (dpkg -i thunar-data_1.6.15-0ubuntu1.18.04.1_all.deb)

find / -name Thunar.mo
# This shows a list of the Thunar.mo files under /usr/share/locale/ on 16.04 but not on 18.04

# Check that the Thunar.mo files are in the actual package, for example the french translation:
mkdir /temp
dpkg -x  thunar-data_1.6.11-0ubuntu0.16.04.2_all.deb /temp
ll /temp/usr/share/locale/fr/LC_MESSAGES/

I guess you could just copy the translation file from the extracted directory. I have not found anything yet why the .mo files are not copied automatically when installing the package on ubuntu:18.04/20.04.

added this to In progress in issue-progresson Jan 25, 2021
github-actions

github-actions commented on Apr 21, 2021

@github-actions

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

added
staleAwaiting input from creator for prolonged time period
on Apr 21, 2021
moved this from In progress to Completed in issue-progresson May 5, 2021
huapox

huapox commented on May 16, 2021

@huapox

My testing:

  • debian:xxx is okay.
  • debian:xxx-slim: the xx.mo will not gen when one app newly installed. just like ubuntu18.04/20.14
#https://hub.docker.com/_/debian?tab=description&page=1&ordering=last_updated
debian:<suite>-slim
(removing some extra files that are normally not necessary within containers, such as man pages and documentation)

The xx.mo is generated when some app just installed.

locale-gen got /usr/lib/locale/locale-archive, but not xx.mo. xx.mo is in app's xx.deb package.


The problem occured at the base-container, refrence src:

The keyConf:

  • debian:stretch /etc/dpkg/dpkg.cfg.d/docker
  • ubuntu:18.04 /etc/dpkg/dpkg.cfg.d/excludes
# ubuntu:18.04 /etc/dpkg/dpkg.cfg.d/excludes

# Drop all translations
#path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo #notes this line 


# debian:stretch
sed -i "s^path-exclude /usr/share/locale/*^# path-exclude /usr/share/locale/*^g" /etc/dpkg/dpkg.cfg.d/docker
raethlein

raethlein commented on May 17, 2021

@raethlein
Member

Great @huapox, thanks a lot for the answer! I just tested it and the entry in /etc/dpkg/dpkg.cfg.d/excludes is also the reason for the Ubuntu 18.04/20.04 images! If you comment the line out as you suggested and install the package again (e.g. dpkg -i thunar-data_1.6.15-0ubuntu1.18.04.1_all.deb as described in the comment above), the translations are copied correctly! I think we are going to comment out that line in future versions of the workspace image by default then or at least add it to the FAQ section in the Readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expectedstaleAwaiting input from creator for prolonged time period

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Desktop GUI has some features not appearing in French · Issue #70 · ml-tooling/ml-workspace