bugGNU gettext - Bugs: bug #48615, Misleading documentation regarding...


You are not allowed to post comments on this tracker with your current authentication level.

bug #48615: Misleading documentation regarding portability of .mo files

Submitter:  None
Submitted:  Sun 24 Jul 2016 12:05:07 PM UTC
Category:  Doc Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Sun 24 Jul 2016 12:05:07 PM UTC, original submission:  

In the passage here regarding gettext translations files, the portability / non-portability of gettext files are discussed at length:



The letters PO in .po files means Portable Object, to distinguish it from .mo files, where MO stands for Machine Object. This paradigm, as well as the PO file format, is inspired by the NLS standard developed by Uniforum, and first implemented by Sun in their Solaris system.

PO files are meant to be read and edited by humans, and associate each original, translatable string of a given package with its translation in a particular target language...

MO files are meant to be read by programs, and are binary in nature. A few systems already offer tools for creating and handling MO files as part of the Native Language Support coming with the system, but the format of these MO files is often different from system to system, and non-portable. The tools already provided with these systems don’t support all the features of GNU gettext. Therefore GNU gettext uses its own format for MO files. Files ending with .gmo are really MO files, when it is known that these files use the GNU format.


This passage strongly suggests that MO files are non-portable, since they are named in a way that distinguishes them from "portable objects", they are binary in nature and architecture-dependent, and clearly, if they were portable and this (important) fact was going to be documented, this is where such a note would appear.

However, it turns out that MO files produced by GNU msgfmt are portable, and this fact is deeply baked into debian now, which distributes `.mo` files in many essential arch-all packages, so it is extremely unlikely to change.

This is a pretty crucial point for developers who want to use GNU gettext to take note of, since it means that they don't have to distribute a different set of .mo files for each target architecture, but as far as I know the docs don't state that anywhere.

I think it would significantly improve the documentation if it were prominently stated that mo files produced by GNU gettext, while architecture-dependent, are portable, or are at least to state the extent to which they are more portable the NLS standard requires.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone Doc

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code