[eMule-Web]

[eMule-Web] (http://www.emule-web.de/board/)
-   eMule MODs - Allgemein (http://www.emule-web.de/board/emule-mods-allgemein/)
-   -   eMule 0.28b-taabmod02 - [06.06.03] (http://www.emule-web.de/board/3392-emule-0-28b-taabmod02-06-a.html)

gvstarfleet 2. June 2003 04:47

eMule 0.28b-taabmod02 - [06.06.03]
 
Zitat:

Zitat von taab
Hi all,
It is my first release

It mainly contains new way of handling the multillingual text in eMule.

Look at - exe plus lang files: taab-mod-exe
Look at - sources: taab-mod-sources



EDIT 05.06.2003: Do not use those links. There is new 02 release based on 0.29a release :
Finally integrated into 0.29a.

Look at - exe plus lang files: taab-mod-exe
Look at - sources: taab-mod-sources
EDIT end;





taab-mod-info.txt content (in sources)
ver .01
based on standard 0.28b eMule

1. Main feature is separated resources for strings in XML files.
first of all see discussion http://www.emule-project.net/board/i...ST&f=4&t=19051
XML files are under lang directory.
Main implementation is in eMulei18n.cpp (h).
i18n stands for 'internationalization' - idea brought from i18n used in web-technologies, like Cocoon - see jakarta.apache.org
XML structure very similar to this used in Cocoon for i18n.

String is looked for in the following order:
- in file meessages_custom_lang.xml;
- in file messages_lang.xml;
- in file messages_ENGLISH.xml;
if not found info in Debug log - shouldn't be any however;
Idea of messages_custom_lang.xml is to allow everyone to have his own strings undependent on main source (with corrected errors, etc.)
Easiest way to create custom file is to copy original file, change name, and later on change the content of texts.

XML file looks like:
<?xml version='1.0' encoding='WINDOWS-1252'?>
<catalogue>
<message key='IDP_SOCKETS_INIT_FAILED'><![CDATA[Error initiating the windows sockets.]]></message>
<message key='IDS_ABOUTBOX'><![CDATA[&About eMule...]]></message>
<message key='IDS_HTTPDOWNLOAD_FILESTATUS'><![CDATA[%1 from %2]]></message>
<message key='IDS_HTTPDOWNLOAD_CONNECTED'><![CDATA[Connected to %1]]></message>
...
you are allowed to change only the text in CDATA markup. Don't change anything else (ID, structure), file can be not read into XML parser.

In implementation used is DOMDocument parser (fu.... interface, no normal class wrapper, could use that from C#, but the way of linking must be changed).


XML files are created for all existing langauges in eMule - used some macros and tools and hand as well to convert string table to xmls.

One problem (solved) is slow searching in DOMDocument - so additionaly I added string map to speed up the getresstring function.

Second problem - DOMDocument refused to load Koreanian and Chineese files when using its standard encoding - so I converted the files into UTF-8. Please test if strings are properly displayed.

Normally all strings has its ID - and this ID is a number, but cannot put just numbers in XML as ID (not readable),
so its stringified form is used. For this all calls to GetResString(int) must be changed to GetResString(CString). I did it using search-and-replace with regular expression.
Later on found better idea and used macro, but only in WebServer.cpp - but this idea can be applyed for all calls.
There are two or three places where it doesn't work, so I had to modify the code - search for taab:locale in sources to find it.

Warning:
this mod contains also my other add-ins/patches, no reason to describe it here - not so important - does not harm anything, you have my word!!!

Purpose:
- to give startup code, which will clean current situation, where the string are resources and nobody likes it.


Please report:
any bugs, wrongly displayed text, etc.
ideas,

Also benutzt die Links im EDIT
http://www.emule-project.net/board/i...c0eafa1daa154e

DQA321 2. June 2003 08:32

ahja.. noch nen neuer Mod ?! Ist ja coool das die Programmierer trotz " Sommer-Wetter´s" so fleissig sind .... Hat denn schon Jemand damit Erfahrung ??

gvstarfleet 8. June 2003 23:39

Also upgraden wäre für die angesagt, die diesen Mod nutzen !
Also nur die 02´er im EDIT verlinkten nutzen !

Shaolin® 11. June 2003 09:48

ich will den Mod auch ma testen, nur hab ich gerade keine zeit, wie läuft er denn so?


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:28 Uhr.

Powered by vBulletin® Version 3.8.3 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102