Comments (7)
I'm curious what was the rationale for that commit, because indeed it's kind of bound to cause this kind of problems… @rbuj do you remember? Note that what it removes is not a problem in a library, it's not forcing the active domain but setting details on a specific one.
from caja-extensions.
The internationalization for libraries works differently from how you do it for applications. https://docs.gtk.org/glib/i18n.html
i18n for libraries only require two sentences:
#define GETTEXT_PACKAGE "???"
#include <glib/gi18n-lib.h>
from caja-extensions.
@cwendling since the location of the po file cannot be resolved you can revert the commit, leaving bindtextdomain and bind_textdomain_codeset function calls as before merging it.
For a library, you only have to call bindtextdomain() and bind_textdomain_codeset() in your initialization function. If your library doesn’t have an initialization function, you can call the functions before the first translated message.
https://docs.gtk.org/glib/i18n.html
from caja-extensions.
The internationalization for libraries works differently from how you do it for applications. […]
Yes, but as your second quote states, you still need to call bindtextdomain()
(which maps a domain to where the translations are located) and bind_textdomain_codeset()
(which declares the codeset for that specific domain) early in your setup.
from caja-extensions.
There is no problem fetching the messages from the catalog on ubuntu, debian, fedora... imho it's a portability issue. Note bind_textdomain_codeset isn't mandatory. However, since we only provide the catalogs with UTF-8 codeset it's logical to force their coding.
https://www.gnu.org/software/gettext/manual/html_node/Libraries.html
from caja-extensions.
from caja-extensions.
OK I checked now I'm on the computer, and it defines the output encoding for the strings returned by gettext, so indeed we want it to be UTF-8 all the time for strings passed to GTK.
It however defaults to the locale encoding, which is likely to be UTF-8 already for reasonable systems, so again, 99.99% of the time it's gonna be correct without it, but it's safer to call it.
from caja-extensions.
Related Issues (20)
- F4 keyboard shortcut to Open in Terminal
- image-converter: scale percentage not applied, uses custom width value (default: 1000 px) HOT 5
- support gupnp-1.6? HOT 7
- caja-share is not working on Ubuntu MATE 22.04 LTS, shows 'net usershare' returned error 255 in Folder Sharing window HOT 22
- Caja-image-converter should offert to convert the image to another image format
- "Open in Terminal" does not open the selected directory
- caja-sendto does not work properly with claws-mail HOT 1
- 1.27.0: caja-extensions is not gcc 14.x ready HOT 6
- Burn:// and caja-git extensions. HOT 3
- ClamTK and download-subtitles extensions. HOT 5
- caja-share doesn't display translated (French)
- Make caja-extensions cross-compile safe
- caja-extension-sendto-upnp doesn't build with gupnp-1.2 HOT 1
- Caja-extensions HOT 2
- Open-in-Terminal in context menu of items in location bar? HOT 2
- debian failed to build at travis CI
- caja-sendto does not send Email with file (from terminal or by "Send To" GUI option) HOT 3
- dbus-glib deprecation HOT 2
- menuitem show top
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caja-extensions.