bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] [bug #48615] Misleading documentation regarding portabilit


From: anonymous
Subject: [bug-gettext] [bug #48615] Misleading documentation regarding portability of .mo files
Date: Sun, 24 Jul 2016 12:05:10 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

URL:
  <http://savannah.gnu.org/bugs/?48615>

                 Summary: Misleading documentation regarding portability of
.mo files
                 Project: GNU gettext
            Submitted by: None
            Submitted on: Sun 24 Jul 2016 12:05:07 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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

https://www.gnu.org/software/gettext/manual/html_node/Files.html#Files

========

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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48615>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]