Wie übersetze ich ein Programm, das mit dem Snap-Paket installiert wurde?

7

Ich habe VLC durch Snap-Pakete in Ubuntu 16.10 Yakkety Yak installiert. Aber die Installation wurde auf Englisch gemacht (meine Version von Ubuntu ist auf Spanisch)

Grundsätzlich wurde bei Snap (Snapcraft?) Und übersetzten Apps dieselbe Frage gestellt und wie die Sprache in vlc (Snap) geändert wird und Übersetzungsdateien für VLC vorhanden sind:

$ 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
user186255
quelle

Antworten:

3

Bei Anwendungen, die als Snaps verpackt sind, muss möglicherweise der Code geändert werden, damit die Übersetzungen an der richtigen Stelle im Dateisystem gefunden werden können.

Für Anwendungen und Bibliotheken, die gettext verwenden, bedeutet dies, dass der Aufruf von bindtextdomain()den Wert der $SNAPUmgebungsvariablen dem als zweites Argument übergebenen Verzeichnispfad voranstellen muss . Alle Anwendungen (und / oder Bibliotheken, die sie möglicherweise verwenden), die dies nicht tun, verfügen möglicherweise nicht über funktionierende Übersetzungen, da der fest codierte Pfad verwendet wird, der auf einen Pfad außerhalb des Snap zeigt.

Dobey
quelle
Danke für deine Antwort! Wahrscheinlich handelt es sich dann um ein Verpackungsproblem, und ich habe eine Nachricht an die Snapcraft-Mailingliste gesendet .
Gunnar Hjalmarsson
2

Wie ToX 82 in einem Kommentar bei Snap (Snapcraft?) Und übersetzten Apps hervorhob , gibt es einen Fehlerbericht . Dies scheint schließlich kein Problem mit dem einzelnen VLC-Snap zu sein, sondern ein allgemeines Problem mit der Snap-Lokalisierung.

Gunnar Hjalmarsson
quelle
1
Es gibt mehrere Möglichkeiten, es zu "lösen", einschließlich möglicherweise das Patchen von gettext / libintl selbst, um immer den $ SNAP-Wert in bindtextdomain () voranzustellen, aber wirklich Dinge, die als Snaps gepackt sind, sollten so erstellt werden, dass sie über relative Pfade auf notwendige Dateien innerhalb des Snaps verweisen .
Dobey
@dobey: Ok, du meinst also, dass es unabhängig von dieser allgemeinen Diskussion funktioniert, wenn du beim Erstellen eines Schnappschusses das Richtige tust?
Gunnar Hjalmarsson
Ja im Allgemeinen. Es kann Probleme in den zugrunde liegenden Bibliotheken geben, die abgerufen werden. Wenn jedoch alles im Snap enthalten ist und die Binärdateien so erstellt sind, dass sie auf Pfade im Snap verweisen, funktioniert dies.
Dobey