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

Submitted by:  None
Submitted on:  Sun 24 Jul 2016 12:05:07 PM UTC  
 
Category: DocSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned 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:

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.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 12:16:08 PM UTChaibleCategoryNone=>Doc

    Back to the top


    Powered by Savane 3.1-cleanup1