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: Sat, 16 Sep 2000 11:59:59 -0700 (PDT)

Gaute B Strokkenes wrote:
> 
> Erik Sigra <freeciv@xxxxxxx> writes:
> 
> > Gaute B Strokkenes wrote:
> > > Erik Sigra <freeciv@xxxxxxx> writes:
> >
> > > > (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.
> > >
> > > I don't think that it's a good idea to include detailed instructions
> > > on how to install things by hand.  If gettext has already been
> > > installed by your sysmonster or if you're using some sort of package
> > > system, this can screw thing up quite severly.
> >
> > These configuration lines is what I get if I type 'info gettext',
> > select 'Basics' and select 'Installation'. Whatever a "sysmonster"
> > might be, it has to be me at my place, because I added those lines.
> 
> So installing gettext on your system does not install po-mode for you
> as well?  It does on mine.  Just another advantage of Debian, .debs
> and policy, I guess.
> 
> I think the right thing to do is to tell them to try visting the file
> as usual and see if it Just Works(tm), and try M-x po-mode if it doesn't.
> If that fails too, tell them to install gettext if they don't have it
> already and try again.  If it still doesn't work, direct them to the
> manual.
> 
> > I don't think the value 2^20 is arbitrary. It is exactly 1MB and if
> > I select describe variable, the help actually includes exactly this
> > value (1048576) in an example:
> 
> [example snipped]
> 
> Sure, but that doesn't make it any more relevant to the Freeciv
> pofiles.  The largest one (pl.po) is just over 400kb.

It was just an example. I sure believe that future translators will have 
judgement enough to interpret it adequately. What value would you prefer? Do 
you want to update the web page every time the size of the largest po-file 
changes? Maybe you want the web server to insert the value dynamically into the 
helptext based on information from the cvs repository (+10%)?

> >   Type 'info gettext', select 'Basics' and select 'Installation' for
> >   more information about installing the emacs po-mode.
> 
> You do know that emacs has got an info-reader built-in, right?  Just
> refer them to the info node.

I do know that now, yes. (We didn't learn every corner of emacs in that 
programming course!)

> >   To change the value, press 'C-h v' and type
> >   'font-lock-maximum-size'.  Read the helptext in the buffer that
> >   opens and select the underlined word 'customize'.
> 
> I think it's easier and more robust to tell them to use
> M-x customize-variable RET font-lock-maximum-size RET

OK.

Here is the new helptext (now consisting of 4 entries for the mini-FAQ):

* 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.


* The po-mode doesn't start when I load a po-file in emacs. What
  should I do?

  Make sure you have GNU gettext installed. You can download it from a
  GNU ftp mirror site.


* I have GNU gettext installed but the po-mode still doesn't
  start. What should I do now?

  Type 'info gettext' in a shell (or use the emacs info-mode), select
  'Basics' and select 'Installation'. Then you will find more
  information about installing the emacs po-mode.


* I get the error message "Fontifying XX.po...buffer too big" when I
  load a po-file. What's the problem?

  You have to increase the value of the variable
  font-lock-maximum-size. This is because emacs refuses to fontify
  buffers larger than this value. To change the value, press 'M-x',
  type 'customize-variable', press RET, type 'font-lock-maximum-size'
  and press RET. Read the helptext in the buffer that opens and
  customize by changing the value to something high like 1048576
  (2^20) (or whatever value you think is suitable). Now the files
  should become fontified when you open them (unless they are larger
  than 1MB).

> > > --
> > > Big Gaute (not to be confused with LG)
> > > Civilization is fun!  Anyway, it keeps me busy!!
> >
> > Keeps me busy too!!
> 
> Actually, that's just a random quote from M-x yow.  Kind of funny
> coincident, though.
> 
> [Long and ugly default .emacs from SuSE snipped.]
> That's pretty ugly; I'm glad Debian has a more sane setup.

I have tried to install Debian 2 times! The first time was the 4th February 
when I moved into an appartment with internet connection. I had seen Unix for 
the first time on the 27th January (the programming course) so I wanted to try 
Linux. My first experience with Linux was the Debian install. Not very 
pleasant! I ended up with Redhat. After I few months I screwed up. In the 
summer I bought a new harddisk to make another try with Linux. I tried Debian 
again but didn't get past the install (that pseudo-CD image kit made me crazy). 
This time I ended up with SuSE.

> --
> Big Gaute (not to be confused with LG)
> My FAVORITE group is "QUESTION MARK & THE MYSTERIANS"...


Emacs is not very user-friendly either. A message like

"Fontifying XX.po...variable font-lock-maximum-size too small"

would have been much more helpfull than

"Fontifying XX.po...buffer too big"

.




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