Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2000:
[Freeciv-Dev] Re: po-files are too big (PR#561)
Home

[Freeciv-Dev] Re: po-files are too big (PR#561)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: po-files are too big (PR#561)
From: Erik Sigra <freeciv@xxxxxxx>
Date: Fri, 15 Sep 2000 14:05:50 -0700 (PDT)

Erik Sigra wrote:
> 
> "Gaute B. Strokkenes" wrote:
> >
> > Erik Sigra <freeciv@xxxxxxx> writes:
> >
> > > Full Name: Erik Sigra
> > > Version: Current CVS
> > >
> > > Problem:
> > > When I open a po file in emacs, i get the following error message:
> > >
> > >   Fontifying XX.po...buffer too big
> > >
> > > I don't think the problem is my memory. It might just be that po-files
> > > larger than 450k are too big for emacs. Even the smallest po-file i
> > > found didn't open correctly. Has anyone successfully
> > > fontified such big po-files? How is this supposed to work?
> > >
> > > Solution:
> > > Divide the translation into sane-sized chunks or fix the po-mode/emacs.
> > >
> > > I want that highlighting!!
> >
> > Don't worry--it's a feature, not a bug.  By default, emacs disables
> > font-lock for large files, so that you don't lock up your machine if
> > you load a 200 MB file by mistake.  From the manual:
> >
> > <<<
> >    Fontification can be too slow for large buffers, so you can suppress
> > it.  The variable `font-lock-maximum-size' specifies a buffer size,
> > beyond which buffer fontification is suppressed.
> > >>>
> >
> > (comp.emacs and gnu.emacs.help are great places to go with questions
> > like this.  Emacs comes with great technical support; his name is Kai
> > Großjohann...)
> >
> > --
> > Big Gaute (not to be confused with LG)
> > Is this ANYWHERE, USA?
> 
> How about adding hints about such things to the localization webpage? It 
> doesn't even mention that a po-mode exixts! It would have been useful for me 
> when I started to translate and it would be useful for many new translators 
> in the future.

Here is a piece of helptext which could be added to the localization mini-faq 
at <http://www.freeciv.org/l10n.phtml> or wherever you like. After doing so, 
this so called bug could be considered fixed. Some other translator, please 
check this text and correct it:

* How do I edit po-files?

  Although po-files can be edited directly, the safest and most
  convenient way to edit them is to use the emacs po-mode. You need to
  have GNU xgettext installed to do this. Then you need to add the
  following to your '~/.gnu-emacs' file (see the xgettext documentation
  for details):

(setq auto-mode-alist
      (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
(autoload 'po-mode "po-mode")
(autoload 'po-find-file-coding-system "po-mode")
(modify-coding-system-alist 'file "\\.po[tx]?\\'\\|\\.po\\."
                            'po-find-file-coding-system)

  Save it and restart emacs with a po-file. Now the buffer should
  become highlighted with beautiful colors.

  If you get the error message "Fontifying XX.po...buffer too big" and
  don't get the colors, you have to increase the value of the variable
  font-lock-maximum-size. To do this, open the 'Help' menu and select
  'Describe', then 'Descrive variable... (C-h v)'. Type
  'font-lock-maximum-size'. Read the helptext in the buffer that opens
  and middleclick on the underlined word 'customize'. Change the value
  to something high like 1048576 (2^20). (Your customizations are saved
  in the file '~/.gnu-emacs-custom'.)




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