我在 Ubuntu 16.10 Yakkety Yak 中通过 snap 包安装了 VLC。但安装是用英语完成的(我的 Ubuntu 版本是西班牙语)
基本上同样的问题在Snap(snapcraft?)和翻译的应用程序和如何在 vlc 中更改语言(快照),并且存在 VLC 的翻译文件:
$ locate /vlc.mo
/snap/vlc/1/share/locale/ach/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/af/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/am/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/an/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ar/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ast/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/az/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/be/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/bg/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/bn/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/bn_IN/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/br/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/bs/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ca/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/cgg/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ckb/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/co/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/cs/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/cy/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/da/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/de/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/el/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/en_GB/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/es/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/et/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/eu/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/fa/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ff/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/fi/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/fr/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/fur/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ga/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/gd/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/gl/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/gu/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/he/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/hi/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/hr/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/hu/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/hy/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ia/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/id/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/is/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/it/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ja/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ka/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/kk/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/km/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/kn/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ko/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ky/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/lg/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/lt/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/lv/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/mk/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ml/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/mn/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/mr/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ms/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/my/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/nb/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ne/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/nl/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/nn/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/oc/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/or/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/pa/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/pl/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ps/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/pt_BR/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/pt_PT/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ro/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ru/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/si/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/sk/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/sl/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/sq/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/sr/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/sv/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/ta/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/te/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/tet/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/th/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/tl/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/tr/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/uk/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/uz/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/vi/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/wa/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/zh_CN/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/zh_TW/LC_MESSAGES/vlc.mo
/snap/vlc/1/share/locale/zu/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ach/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/af/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/am/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/an/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ar/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ast/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/az/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/be/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/bg/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/bn/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/bn_IN/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/br/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/bs/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ca/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/cgg/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ckb/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/co/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/cs/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/cy/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/da/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/de/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/el/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/en_GB/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/es/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/es_MX/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/et/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/eu/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/fa/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ff/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/fi/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/fr/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/fur/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ga/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/gd/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/gl/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/gu/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/he/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/hi/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/hr/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/hu/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/hy/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ia/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/id/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/is/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/it/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ja/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ka/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/kk/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/km/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/kn/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ko/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ks_IN/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ky/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/lg/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/lt/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/lv/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/mai/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/mk/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ml/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/mn/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/mr/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ms/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/my/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/nb/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ne/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/nl/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/nn/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/oc/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/or/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/pa/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/pl/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ps/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/pt_BR/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/pt_PT/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ro/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ru/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/si/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/sk/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/sl/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/sq/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/sr/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/sv/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/ta/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/te/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/tet/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/th/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/tl/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/tr/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/uk/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/uz/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/vi/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/wa/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/zh_CN/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/zh_TW/LC_MESSAGES/vlc.mo
/snap/vlc/1/usr/share/locale/zu/LC_MESSAGES/vlc.mo
答案1
对于打包为 snap 的应用程序,可能需要更改代码以便它能够在文件系统中的正确位置找到翻译。
对于使用 gettext 的应用程序和库,这意味着调用bindtextdomain()
需要将环境变量的值添加$SNAP
到作为第二个参数传入的目录路径的前面。任何不这样做的应用程序(和/或它们可能正在使用的库)可能确实没有有效的翻译,因为使用的硬编码路径指向 snap 之外的路径。
答案2
作为毒素 82在评论中指出Snap(snapcraft?)和翻译的应用程序,有一个错误报告。毕竟,这似乎不是单个 VLC 快照的问题,而是一般快照本地化问题。