Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: Russian localization & other questions
Home

[Freeciv-Dev] Re: Russian localization & other questions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Dmitriy Genzel <udgenzel@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Russian localization & other questions
From: gs234@xxxxxxxxx (Gaute (B) Strokkenes)
Date: 06 Aug 2000 00:11:21 +0200

Dmitriy Genzel <udgenzel@xxxxxxxxxxxxxx> writes:

> Related to this, I found several issues with the way freeciv handles
> locales. First, sorting is clearly done according to ascii charset, not
> according to locale. (Disclaimer: I haven't looked at the code, I am
> judging by effects). There are at least two places where this is apparent:
> in Help topics and in Science advisor - choosing a technology.

There's an easy fix for the help topics:

>>>
--- freeciv/client/helpdata.c.old       Sun Jul 30 13:28:36 2000
+++ freeciv/client/helpdata.c   Sat Aug  5 23:48:36 2000
@@ -171,7 +171,7 @@
       break;
     }
   }
-  return strcmp(ta, tb);
+  return strcoll (ta, tb);
 }
 
 /****************************************************************
<<<

I haven't tried it, but if you have your locale set up correctly then
it should work.  Why don't you try it and tell me... 8-) (I use
--disable-nls.)

The science advisor is not quite that easy. The function
string_ptr_compare() in common/shared.c is just a wrapper for
mystrcasecmp().  To my knowledge, there is no strcasecoll().  The best
fix is probably to investigate where string_ptr_compare() is used and
decide if case-insensitive would do instead.  And why doesn't
helpdata.c use it anyway?

Since strcoll() is C89 and later only, it's probably a good idea to
add a configure test and fall back to strcmp() if necessary.

-- 
Big Gaute (not to be confused with LG)
Kids, don't gross me off..  ``Adventures with MENTAL HYGIENE''
 can be carried too FAR!



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