Bug 3105 - Internationalization support
Status: ASSIGNED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: PC All
: P5 enhancement
Assignee: Tremulous Bugs
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2007-05-11 13:14 EDT by Risujin
Modified: 2010-04-04 10:16:00 EDT
2 users (show)

See Also:



Description Risujin 2007-05-11 13:14:49 EDT
There is some interest in the community of providing a native language translation of Tremulous (e.g. Spanish, http://www.tremulous.net/phpBB2/viewtopic.php?p=69236). Currently the Tremulous code is not capable of supporting translations.

The following issues need to be addressed:

1.) Wrap all string instances inside of the underscore function to support runtime translated string fetching:
http://www.gnu.org/software/gettext/

2.) Enable Unicode support by converting the code to use UTF16 wide chars or to support UTF8 special escape sequences.

3.) Use a real font rendering library rather than bitmap fonts so we can actually render the Unicode.

4.) UI menu files must also utilize the translated string table.

5.) Support non-English keyboards for native language input.
Comment 1 TsT 2007-06-01 07:45:34 EDT
I'm starting to work on:

1.) Wrap all string instances inside of the underscore function to support
runtime translated string fetching:
http://www.gnu.org/software/gettext/

4.) UI menu files must also utilize the translated string table.


And I think we need:

6.) Implement new protocol for server send unformatted text-events (and client can format/translate in user's current locale)
I think we can keep compatibility to code new protocol, and server will detect if client want receive old text-formated events or new protocol. It can be easy to detect with client variable set.
Comment 2 Martin Doucha 2007-06-01 12:32:02 EDT
The server doesn't even have to *know* the client is i18n capable to make gettext work.
Comment 3 TsT 2007-06-02 08:14:28 EDT
When I spoke about "server detect something on client" I don't speak
about i18n/gettext capabilities but only if client are compatible with
the "new protocol".

Actually the message like "Alice was mauled by Bob's Tyrant" is
hardcoded in server part. This event message is sent already formated
by the server.
I want implement new protocol that server send non-formated text
like killer="Bob" target="Alice" action=KILL_BY_TYRANT (or just id of player...)
So client know that KILL_BY_TYRANT is (or MOD_LEVEL4_CLAW like in
src/cgame/cg_event.c) and can use gettext on associated string (like
"was mauled by" or "%s was mauled by %s" or other...) and finally show
to player the formated text (in his locale language)

But maybe I don't have rigth and if the server already send
non-formated text to clients, we don't need this 6)
Comment 4 Risujin 2007-06-03 01:40:19 EDT
(In reply to comment #3)
> I want implement new protocol that server send non-formated text
> like killer="Bob" target="Alice" action=KILL_BY_TYRANT (or just id of
> player...)

This part of the Quake 3 engine is not very elegant. There are several channels for sending token messages:

a.) The Tremulous menu system sends a menu token defined in bg_public.h
b.) The generic event system
c.) Send a server console command (e.g. basi poison command)

In this case we need to pass arguments so we cannot reuse the menu or event system or make anything like it. A server command seems appropriate ("frag 3 4 7" where numbers are client ids, MOD, etc).