← Back to issue list

Snaps built from deb can't be gettext translated

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1576282
Type
issue
State
open
Author
~seb128
Labels
personal snap-desktop-issue
Created
Updated
Closed
—

Current evaluation

Deb-built snap gettext localization was historically blocked by missing locale data and hard-coded /usr paths; current desktop integration sets LOCPATH and redirects bindtextdomain to snap locale directories.

Suggested action: close resolved

Reason: Current desktop integration sets LOCPATH to the desktop runtime and preloads a bindtextdomain shim that redirects absolute locale bindings to snap-provided locale or locale-langpack directories. Commit b0c4319e5 (canonical/snapcraft#2655) introduced the shim, and 1ad71aaff / PR #3738 later made snap-local preload take precedence, directly addressing the reported deb/gettext failure.

Evaluated by: mr-cal-bot

Impact: 58 Quick Win: 24 Complexity: 52 Confidence: 93 Actionability: 87

Issue body

Currently it seems not possible to have working gettext translations without included a patched glibc build in your snap - the core image doesn't have locales definition that can be worked around by including locales definitions in the snap, though that's tedious, ideally snapcraft would help there - traditional desktop applications are built with calls to 'bindtextdomain ("domain", LOCALEDIR)', where LOCALDIR is defined at buildtime and so pointing to /usr there seems to be no way to redirect to another directory at runtime - desktop applications needs system library translations sometime which means langpacks need to be included in snaps

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 58
Quick Win: 24
Complexity: 52
Confidence: 93
Actionability: 87
close resolved Deb-built snap gettext localization was historically blocked by missing locale data and hard-coded /usr paths; current desktop integration sets LOCPATH and redirects bindtextdomain to snap locale directories.
stealth/space-bunny-alpha
Impact: 55
Quick Win: 15
Complexity: 70
Confidence: 94
Actionability: 88
close resolved Reported gettext translation failures for deb-built desktop snaps are addressed by the current GNOME extension’s bindtextdomain preload and LOCPATH setup; the historical issue remains marked open.
qwen/qwen3.6-35b-a3b
Impact: 40
Quick Win: 5
Complexity: 60
Confidence: 50
Actionability: 30
keep open Gettext translations don't work for snaps built from deb packages due to missing locales, hardcoded LOCALEDIR, and missing langpacks. Valid but unactionable feature request.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 9
Staleness: 95
Complexity: 80
Confidence: 55
Support Request: 10
needs triage Feature request: snaps built from debs can't use gettext translations due to missing core locales, build-time LOCALEDIR binding, and absent langpacks. 10 years old, zero comments, no maintainer response; needs verification against modern core22/core24.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 60
Confidence: 95
Support Request: 10
close stale Technical report on gettext translation failures in snaps built from deb packages due to missing locales, hardcoded build paths, and absent langpacks. Inactive for ~9 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 80
Confidence: 90
Support Request: 15
close stale Snapcraft-built deb snaps lack gettext translation support due to missing locales in core images, hardcoded LOCALEDIR paths, and absent system langpacks. Unaddressed for over 9 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 70
Confidence: 90
Support Request: 10
close stale Reports gettext translation failures in snaps built from deb packages due to missing locales in the core image and hardcoded build-time paths. Issue is inactive for nearly a decade with no maintainer response.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#2655 (confidence 95%)

    Commit b0c4319e5 added the desktop bindtextdomain preload implementation that searches snap locale directories.

  • Likely Fixed By: canonical/snapcraft#3738 (confidence 88%)

    Commit 1ad71aaff updated the preload behavior to prefer a snap-local bindtextdomain library.

Related issues

No related issues found above the similarity threshold.