[Freeciv-Dev] Re: Russian localization & other questions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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!
|
|