monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] i18n: patch to correct layout in explain_usage


From: Thomas Moschny
Subject: [Monotone-devel] i18n: patch to correct layout in explain_usage
Date: Tue, 11 Oct 2005 19:12:58 +0200
User-agent: KMail/1.8.2

Hi list,

The method explain_usage() in commands.cc prints translated strings for the 
command groups, but it uses the untranslated message-ids for computing the 
layout, so the result may look ugly in a non-en_US locale. For example:

$ env LC_MESSAGES=fr_FR.UTF-8 monotone
[...]
  arborescence          checkout co explicit_merge heads merge propagate 
refresh_inodeprints
                setup
  automatisation    automate
  base de données      db
  clef et certificat  cert chkeypass dropkey genkey trusted
  copie de travail  add attr ci commit drop identify mv rename revert rm 
update
[...]

The attached patch against d96ca5cc69312da41e303fb8ec1f096ac6970aee fixes 
this. The new method message_width() uses wcswidth() to determine the number 
of columns that are needed to print the translation of a message-id within 
the current locale.

$ env LC_MESSAGES=fr_FR.UTF-8 ~/net.venge.monotone/monotone
[...]
  arborescence        checkout co explicit_merge heads merge propagate
                      refresh_inodeprints setup
  automatisation      automate
  base de données     db
  clef et certificat  cert chkeypass dropkey genkey trusted
  copie de travail    add attr ci commit drop identify mv rename revert
                      rm update
[...]

Regards,
Thomas

-- 
Thomas Moschny  <address@hidden>

Attachment: commands.diff
Description: Text Data

Attachment: pgpsHxToXfvyU.pgp
Description: PGP signature


reply via email to

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