GitHub user imedlee created a discussion: translation file has not taken effect
and the chart data is missing in the local language
Hello everyone! Recently, I tried to deploy Superset as a data analysis tool.
When adding a chart (of table type) and using time comparison for comparative
analysis, the table automatically generates four columns: SUM(Metrics), #, %,
and (empty). Here's my question: SUM(Metrics) allows custom column names. Can
the #, △, %, and columns also have their names customized to avoid displaying
symbols (#, △,% )?
Another issue I'm currently struggling with, which might be a bug, relates to
the effectiveness of translation files. The official source code has very
incomplete Chinese localization. I've tried modifying most translations locally
by converting messages.pot to po files. I built a Docker image using the latest
master source code's Dockerfile with BUILD_TRANSLATIONS="true" added. The
messages.mo and messages.json files were successfully compiled in the image.
However, after running the container, the login page translations didn't take
effect even when selecting the local language. In the chart editing interface,
most content still doesn't show translated content, such as Query mode,
Dimensions, Filters (though translations work when clicking to set content),
Time Comparison, and condition list content. If I select line chart, some
content is translated (X-axis, X-Axis Sort By). I checked the messages.po and
messages.json files, and terms like Query mode, Dimensions, Filters, and Time
Comparison all have translation content.
However, when I import the same translation files ( messages.mo , messages.json
) using the apache/superset:5.0.0 image from Docker Hub, the above interface
translations work correctly:
```dockerfile
FROM apache/superset:5.0.0
COPY messages.json /app/superset/translations/zh/LC_MESSAGES/messages.json
COPY messages.mo /app/superset/translations/zh/LC_MESSAGES/messages.mo
USER root
COPY instantclient-basic-linux.x64-19.27.0.0.0dbru.zip /tmp/oracle/
RUN apt-get update && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libaio1 libpq-dev default-libmysqlclient-dev && \
apt-get install -y --no-install-recommends --no-install-suggests \
pkg-config gcc unzip && \
export PATH="/app/.venv/bin:$PATH" && \
uv pip install --no-cache-dir \
cx_Oracle oracledb psycopg2-binary mysqlclient pillow redis authlib \
-i https://mirrors.aliyun.com/pypi/simple/ && \
mkdir -p /opt/oracle \
&& unzip /tmp/oracle/instantclient-basic-linux.x64-19.27.0.0.0dbru.zip -d
/opt/oracle \
&& rm -rf /tmp/oracle \
&& ln -s /opt/oracle/instantclient_19_27 /opt/oracle/instantclient \
&& echo "/opt/oracle/instantclient" >
/etc/ld.so.conf.d/oracle-instantclient.conf \
&& ldconfig \
&& apt-get purge -y --auto-remove pkg-config gcc unzip && \
apt-get clean && rm -rf /var/lib/apt/lists/*
USER superset
```



But there's another problem: when adding a chart (of table type) and using time
comparison for analysis, the table automatically generates four columns: Main,
#, △, %,. In the new version, SUM(Metrics) has replaced Main. It seems
Main would extract translation results from the translation file, but this
causes the entire column of data to be missing. If I switch back to English, it
displays normally.

Thanks to anyone who helped! Thanks a lot!
GitHub link: https://github.com/apache/superset/discussions/34588
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]