# Einzelne Datei im jar verändern ?



## Gast (17. Nov 2007)

Hallo zusammen,
ich habe die Suche zwar schon seit einer Stunde durchforstet, aber nichts entsprechendes gefunden.
Wir haben in unserem Forum einen Chat (EIRC). Leider ist die Sprachdatei für englisch ausgelegt. Diese möchte ich gerne umschreiben. Sie befindet sich in der Datei "EIRC-cfg.jar" und heisst "eirc_en.properties". Ich habe es jetzt mit dem Packprogram Filzip geschafft, die Sprachdatei aus der jar zu entpacken, zu editieren und auch wieder in die jar einzufügen. Durch die Editierung der eirc_en.properties hat sich jetzt natürlich die Dateigrösse der eirc_en.properties und damit auch der EIRC-cfg.jar geändert. Nach dem hochladen auf unseren Server funktioniert der Chat nun nicht mehr.
Muss ich die jar neu compilieren ? Wenn ja, mit welchem Befehl (Beispiel wäre nicht schlecht) ?
Ich habe das Ganze auch als Sourcecode, aber da komme ich erstrecht nicht klar. 
Hier mal die Dateien, die sich im Chatordner befinden:




EIRC.cab 
EIRC.jar
EIRC-cfg.cab
EIRC-cfg.jar
index.html

Bin für jede Hilfe dankbar, da ich von Java überhaupt nichts verstehe. Ich hoffe ich werde jetzt nicht geteert und gefedert.
Gruss,Micha
[/list]


----------



## Leroy42 (17. Nov 2007)

Du hast es eigentlich genau richtig gemacht, die veränderte Dateigröße
sollte keinen Einfluß haben und neu kompiliert werden sollte auch nicht
notwendig sein. Wie sieht denn die Datei _eirc_en.properties_ aus?


----------



## Senatormicha (17. Nov 2007)

Hallo,
vielen Dank für Deine Antwort, das ging ja fix.
Ich habe mich jetzt mal registriert. Die Datei sieht im original so aus:


```
author=Javier Kohen <jkohen@tough.com> / Capitaine Sylvain <capitaine@coolsmile.net>
update=20040408

ok=Ok
cancel=Cancel
open=Open
close=Close
close.privates=Close all privates
close.channels=Part all channels
copy=To cut or paste, use keyboard shortcuts.
passw=Password
help=Help

title=- Coolsmile chat ([url]www.coolsmile.net[/url])
info={0} {1}. Language file by {2}, ({3}).

msg.separator=>

msg.privmsg=%C1{0}{1} {2}
msg.me=%B{0}%B
msg.male=%C2{0}%C{1} {2}
msg.female=%C6{0}%C{1} {2}
msg.unknown=%C14{0}%C{1} {2}
msg.op=%C4{0}%C{1} {2}
msg.hop=%C3{0}%C{1} {2}
msg.voice=%C1{0}%C{1} {2}
msg.admin=%C7{0}%C{1} {2}
msg.owner=%C12{0}%C{1} {2}

msg.action=%C5{0} {1}
msg.my_action=%C5%B{0}%B {1}

msg.notice=%C1{0} - {1}
msg.my_notice=%C1%B{0}%B - {1}
msg.serv_notice=%C1%B{0}%B> {1}
msg.strip_notice=*** {0}

msg.warning=%C2 {0}
msg.error=%C4 {0}
msg.info=%C10 {0}
msg.unmangled=%C1 {0}

asl.connection=Connection
asl.age=Age
asl.sex=Sex
asl.location=Location
asl.male=Male
asl.female=Female
asl.unknown=Unknown

eirc.server=Server
eirc.enter_nick=Your Nick
eirc.login=Connection to chat server in progress...
eirc.disconnected=You're disconnected from the chat.
eirc.s1=You have to enter a nickname first.
eirc.s2=Couldn''t find {0} chat server.
eirc.s3=Couldn''t establish connection with chat server {0}:{1,number,integer}.
eirc.s4=You are now known as {0}.
eirc.s5={0} is now known as {1}.
eirc.s6={0} joined the channel.
eirc.s8={0} left the channel.%O {1}
eirc.s9={0} left the server.%O {1}
eirc.s10=You were kicked from {0} by {1} ! Because :%O {2}
eirc.s11={0} has been kicked by {1} ! Because :%O {2}
eirc.s12={0} replied to the ping in {1}.
eirc.s12.0=Unkown Ping time.
eirc.s12.1={1,number,0.###} second.
eirc.s12.2={1,number,#.###} second.
eirc.s12.3={1,number,#.###} seconds.
eirc.s13={0}, hostmask : {1}@{2}
eirc.s15={0}, from server : {1} [{2}]
eirc.s16={0}, is an IRC operator.
eirc.310={0}, is available for help.
eirc.314={0} had hostmask {1}@{2} with personal infos : {3}
eirc.406={0} was not connected.
eirc.320={0}, {1}
eirc.335={0}, is a robot.
eirc.378={0}, Internet address : {1}
eirc.317={0}, hasn''t speak for {1,number,integer} hours {2,number,integer} minutes {3,number,integer} seconds.
eirc.317.signon={0}, is connected since {1,date,long} at {1,time}.
eirc.s18={0}, is in {1}
eirc.s19=There are no channels created.
eirc.s20=
eirc.s21=
eirc.s22=Usage : {0}
eirc.s23=This window is not for messaging.
eirc.s24=This isn''t a channel.
eirc.s25=You haven''t established a connection, yet.
eirc.s26=You must provide a nickname as a <PARAM> to this applet if you wish to enable auto-login.
eirc.s27={0} is a registered nick.
eirc.s35=Topic set by {0} at {1,date,long} {1,time}.
eirc.s36={0} has changed the topic to :%O {1}
eirc.s37=There is no topic for {0}.
eirc.s38=Topic for {0} is :%O {1}.
eirc.b_list={0} banned by {1} on {2,date,long} at {2,time}.
eirc.e_list={0} protected by {1} on {2,date,long} at {2,time}.
eirc.I_list={0} invited by {1} on {2,date,long} at {2,time}.
eirc.nickchange=You cannot change your nick on this channel. Because : {0}
eirc.invite=You are invited on {0} by {1}.
eirc.+v={0} has given {1} voice.
eirc.-v={0} has removed voice of {1}.
eirc.+o={0} has given {1} operator status.
eirc.-o={0} has removed operator status of {1}.
eirc.+h={0} has given {1} half-operator status.
eirc.-h={0} has removed half-operator status of {1}.
eirc.+b={0} has banned {1} from channel.
eirc.-b={0} has removed ban of {1}.
eirc.+e={0} has protected {1} from bans.
eirc.-e={0} has removed {1} protection from bans.
eirc.+I={0} add {1} to the invite list.
eirc.-I={0} remove {1} from the invite list.
eirc.+m={0} has set the channel {1} to moderated mode.
eirc.-m={0} has removed from {1} moderated mode.
eirc.+s={0} has set the channel {1} to secret mode.
eirc.-s={0} has removed from {1} secret mode.
eirc.+i={0} has set the channel {1} to invite mode.
eirc.-i={0} has removed from {1} invite mode.
eirc.+k={0} has set the password "{1}" to enter channel.
eirc.-k={0} has removed the password "{1}" to enter channel.
eirc.+l={0} has set limit to {1} users on channel.
eirc.-l={0} remove the user limit on channel.
eirc.+N={0} forbid nickname change on channel.
eirc.-N={0} allow nickname change on channel.
eirc.+a={0} has given {1} channel admin status.
eirc.-a={0} has removed channel admin status of {1}.
eirc.+q={0} set {1} as one of the owners of the channel.
eirc.-q={0} remove {1} from the owners of the channel.
eirc.+r=This channel is registered.
eirc.-r=This channel is not registered anymore.
eirc.ignore={0} has been added to the ignore list.
eirc.unignore={0} has been removed from the ignore list.
eirc.ignore_notice=You have been ignored.
eirc.unignore_notice=You are not ignored anymore.
eirc.301={0} is away :%O {1}
eirc.302.away={0} is away.
eirc.302.host={0} has this hostmask : {1}
eirc.381=You are now IRC operator.
eirc.366=Users list from {0} :
eirc.391=Server : {0} Local time : {1}
eirc.401={0} is not on the chat.
eirc.404=You cannot speak here. Because : {0}
eirc.421="{0}" : unknown command.
eirc.432=That nickname is erroneus. Enter another one.
eirc.433=This Nickname is already in use.
eirc.461="{0}" : missing some arguments.
eirc.464=Bad password.
eirc.465=You are banned from this chat.
eirc.437=You cannot change your nickname on {0} .
eirc.471=Cannot join channel {0} : User limit reached.
eirc.473=Cannot join channel {0} : You need an invitation.
eirc.474=Cannot join channel {0} : Access denied.
eirc.475=Cannot join channel {0} : You need the password.
eirc.477=Cannot join channel {0} : You must be registered.
eirc.478=Cannot ban anymore on channel {0} : Ban list is full.
eirc.482=You''re not a channel operator of {0} .
eirc.491=You''re not an IRC operator.
eirc.not_an_url=That URL is invalid.
eirc.select_nicks=Select at least one nick.
eirc.not_in_applet=Can''t to continue due to security parameters.
eirc.command_notapplicable=This command cannot be used.
eirc.dcc_not_supported={0} has tried to establish a DCC with you, but that feature has not been implemented.
eirc.dcc_notify.local={0} has been informed about this. This notification can be disabled from the Setup menu.
eirc.dcc_notify.remote=You have tried to establish a DCC with me, but that feature isn't supported here.
eirc.ison={0} is connected.
eirc.isoff=Not connected.
eirc.away=Zzz...
eirc.away_list=Busy./Be right back./Away./On the phone./Lunching./Sleeping.
eirc.away_custom=Custom reason...
eirc.pong=Valid connection, acknowledged message :%O {0}
eirc.repeat=Do no repeat please.
eirc.chars=Allowed characters in a nickname are :

eirc.600=Your friend {0} is connecting ({1,date,long} at {1,time}).
eirc.601=Your friend {0} is leaving ({1,date,long} at {1,time}).
eirc.604=Your friend {0} is connected.
eirc.605=Your friend {0} is not connected.


# Celui-ci ne doit pas être un nick ni un channel.
eirc.status=- Status -

eirc.ctcp_received=Received a CTCP {0} from {1}.
eirc.ctcp_reply=CTCP {0} reply : {1}
eirc.ignored_users=Ignored users : {0}.
eirc.no_ignored_users=There are no ignored users.
eirc.no_help=Help unavailable for command : {0}.
eirc.bad_invocation=Command {0} requires {1}. No help available.
eirc.bad_invocation.0={1} parameter
eirc.bad_invocation.1={1} parameters

channel_list.frame=List
channel_list.refresh=Refresh
channel_list.minima=At least
channel_list.users=user(s)
channel_list.sort=Sort
channel_list.byname=by name
channel_list.bynumber=by user number
channel_list.new=Create or joining a channel

who_list.frame=Search
who_list.refresh=Refresh
who_list.age=y-o
who_list.sort=Sort by
who_list.sort.1=Nick
who_list.sort.2=Age
who_list.sort.3=Sex
who_list.sort.4=Country
who_list.sort.5=Location
who_list.check=Show
who_list.male=Males
who_list.female=Females
who_list.unknown=Others
who_list.invisible=Get invisible here

b_list.title=Banned from {0}
b_list.delete=Unban
e_list.title=Protected from bans on {0}
e_list.delete=Unprotect
I_list.title=Automatic invitations on {0}
I_list.delete=Remove

nicklist.popup.query=Open a private discussion
nicklist.popup.ignore=Ignore
nicklist.popup.unignore=Un-ignore
nicklist.popup.ghost=Kill your ghost
nicklist.popup.operators=Channel operator
nicklist.popup.hoperators=Channel half-operator
nicklist.popup.kick=Kick
nicklist.popup.kban=Kick & Ban
nicklist.popup.ban=Ban
nicklist.popup.unban=Remove ban
nicklist.popup.admin=Give administrator status
nicklist.popup.except=Protect from bans
nicklist.popup.invite=Add to invite list
nicklist.popup.voice=Give voice
nicklist.popup.unvoice=Take voice
nicklist.popup.op=Give operator status
nicklist.popup.deop=Take operator status
nicklist.popup.hop=Give half-operator status
nicklist.popup.dehop=Take half-operator status
nicklist.popup.ircops=IRC operator
nicklist.popup.kill=Kill from server
nicklist.popup.action1=Kiss !
nicklist.popup.action2=Hi
nicklist.popup.action3=Slap !
nicklist.popup.action1.cmd=give some big kisses to {0} !
nicklist.popup.action2.cmd=shakes {0}''s hand
nicklist.popup.action3.cmd=slaps {0} hard !

status_panel=Info messages
top_panel.chanlist={0} channels used
top_panel.wholist={0} users (with {1} invisibles)
top_panel.chan=Channel {0}, {1} users(s)
top_panel.private=Private discussion with {0}
bottom_panel=Dialogs

conf.title=Options
conf.private=No new privates messages.
conf.focus_privates=Focus on new privates messages.
conf.quit=Quit message
conf.invite=Show invitations.
conf.join_part=See join or part in channels.
conf.no_color=Filter attributes from messages.
conf.priv=Privileges
conf.bullet=Show a bullet.
conf.symbol=Show a symbol.
conf.scroll=Text scrolling
conf.fast=Fast.
conf.smooth=Smooth.
conf.write_col=Write in
conf.write_col_list=White,Black,Blue,Green,Red,Brown,Purple,Light red,Yellow,Light green,Cyan,Light cyan,Light blue,Pink,Gray,Light gray
conf.text_font=Character font
conf.text_size=Size
conf.snd.no=(silent)
conf.snd.1=Joined
conf.snd.2=Part
conf.snd.3=Got privilege
conf.snd.4=Taken privilege
conf.snd.5=Kicked
conf.snd.6=Banned
conf.snd.7=Quit
conf.snd.8=Private message
conf.snd.9=Channel message
conf.snd=Sounds
conf.snd.on=On
conf.snd.off=Off
conf.snd.offaway=Off when away
conf.dcc_notify=Show errors on DCC commands.
conf.motd=Ask message of the day after login.
conf.see_everything=See everything from server.
conf.oper=IRC Operator
conf.operpass=Password
conf.password=Server password
conf.admchan=Manage channel modes
conf.bankey=Banned
conf.exceptkey=Protected
conf.invitkey=Invited
conf.mode.m=Mode moderated
conf.mode.s=Mode secret
conf.mode.i=Mode invite
conf.mode.l=Limit
conf.mode.k=Password
conf.mode.N=No nick change
conf.users=users
conf.graphic_bg=Border
conf.text_bg=Background
conf.r=Red
conf.g=Green
conf.b=Blue

tld.ae=Arab Emirates
tld.ar=Argentina
tld.at=Austria
tld.au=Australia
tld.be=Belgium
tld.bf=Burkina Faso
tld.bj=Benin
tld.br=Brazil
tld.ca=Canada
tld.ch=Switzerland
tld.cx=Christmas Island
tld.cz=Czech Republic
tld.de=Germany
tld.dk=Denmark
tld.dz=Algeria
tld.edu=United States
tld.es=Spain
tld.fi=Finland
tld.fr=France
tld.gd=Grenada
tld.hk=Hong-Kong
tld.ht=Haiti
tld.il=Israel
tld.it=Italy
tld.jp=Japan
tld.lc=Saint Lucia
tld.lu=Luxembourg
tld.ma=Morocco
tld.mg=Madagascar
tld.mil=United States
tld.mu=Mauritius
tld.nc=New Caledonia
tld.nl=Netherlands
tld.no=Norway
tld.pf=French Polynesia
tld.pl=Poland
tld.pt=Portugal
tld.ro=Romania
tld.se=Sweden
tld.tr=Turkey
tld.uk=United Kingdom
tld.us=United States
tld.ve=Venezuela
tld.yu=Yugoslavia
tld.za=South Africa

join.title=Join channel {0}
join.prompt=This channel is restricted.
join.label=Password
away.title=Away
away.prompt=Enter your away reason.
away.label=Reason
kick.title=Kick
kick.prompt=Kick {0}
kick.label=Why
kban.title=Kick + Ban
kban.prompt=Kick and ban {0}
kban.label=Why
kill.title=Kill
kill.prompt=Kill {0} from serveur
kill.label=Why
kline.title=Ban from server
kline.prompt=Ban {0} from server
kline.label=Why
ghost.title=Kill the ghost
ghost.prompt=Kill this nick (only if registred !).
ghost.label=Password
nick.title=Bad nickname
nick.message=Character  {0}  is not allowed.

services.id.title=Nickname change
services.label=Password
services.prompt=This nick is owned
services.ns.reg=REGISTER {0} {1}
services.ns.ident=IDENTIFY {0}
services.ns.prompt=This nickname is registered and protected.
services.ns.loginbad=Password incorrect.
services.ns.loginok=Password accepted
services.ns.ghost=GHOST {0} {1}
services.cs.op=OP
```


Hmm, kann man hier keine Datei anhängen ?
Gruss,Micha


----------



## Leroy42 (17. Nov 2007)

Keine Ahnung wie z.B. 
_msg.unknown=%C14{0}%C{1} {2} _ interpretiert wird.

aber z.B. 
_conf.write_col_list=White,Black,Blue,Green,Red,Brown,Purple,Light red,Yellow,Light green,Cyan,Light cyan,Light blue,Pink,Gray,Light gray_
würde ich nicht übersetzen, da es gut möglich ist, das das
Programm diese Werte zur Erstellung von Farben benutzt (Reflection?),
und "Grün" gibt es sicherlich nicht.

Ohne den Quellcode zu haben, dürfte es ziemlich schwer
fallen, eine korrekte Übersetzung
ins Deutsche zu schreiben.


----------



## Senatormicha (17. Nov 2007)

Gast hat gesagt.:
			
		

> Ich habe das Ganze auch als Sourcecode, aber da komme ich erstrecht nicht klar.



Hallo,
den Quellcode habe ich ja. Das source-Verzeichniss hat diese Struktur:



```
J:\source
J:\source\etc
J:\source\etc\properties
J:\source\gfx
J:\source\main
J:\source\main\ar
J:\source\main\ar\com
J:\source\main\ar\com\jkohen
J:\source\main\ar\com\jkohen\applet
J:\source\main\ar\com\jkohen\awt
J:\source\main\ar\com\jkohen\awt\event
J:\source\main\ar\com\jkohen\irc
J:\source\main\ar\com\jkohen\net
J:\source\main\ar\com\jkohen\util
J:\source\main\com
J:\source\main\com\ms
J:\source\main\com\ms\security
J:\source\main\com\splendid
J:\source\main\com\splendid\awtchat
J:\source\main\netscape
J:\source\main\netscape\security
J:\source\test
J:\source\test\etc
J:\source\test\etc\properties
J:\source\test\gfx
J:\source\test\main
J:\source\test\main\ar
J:\source\test\main\ar\com
J:\source\test\main\ar\com\jkohen
J:\source\test\main\ar\com\jkohen\applet
J:\source\test\main\ar\com\jkohen\awt
J:\source\test\main\ar\com\jkohen\awt\event
J:\source\test\main\ar\com\jkohen\irc
J:\source\test\main\ar\com\jkohen\net
J:\source\test\main\ar\com\jkohen\util
J:\source\test\main\com
J:\source\test\main\com\ms
J:\source\test\main\com\ms\security
J:\source\test\main\com\splendid
J:\source\test\main\com\splendid\awtchat
J:\source\test\main\netscape
J:\source\test\main\netscape\security
```

Im Verzeichniss sind dann die Textdateien:

compile.txt :


```
## Compile command ##

javac -sourcepath main -d main2 -target 1.1 -source 1.3 main/EIRC.java


## Package commands ##

jar cfm EIRC.jar manifest.txt -C main2/ .
jar cf EIRC-cfg.jar -C etc/properties/ . -C gfx/ .
jar i EIRC.jar


## Test command ##

java -jar EIRC.jar
```

und manifest.txt:


```
Main-Class: EIRC
Class-Path: EIRC.jar EIRC-cfg.jar
```

Ich dachte mir, "dann editierst Du einfach die Sprachdatei im sourcecode und machst einen neue jar daraus".
Habe den Befehl 

```
javac -sourcepath main -d main2 -target 1.1 -source 1.3 main/EIRC.java
```
ausgeführt, aber nur eine Fehlermeldung erhalten:


```
main\ar\com\jkohen\applet\SimpleAppletContext.java:39: ar.com.jkohen.applet.Simp
leAppletContext is not abstract and does not override abstract method getStreamK
eys() in java.applet.AppletContext
public class SimpleAppletContext implements AppletContext
       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
```

Da bleibe ich dann halt hängen, da ich die Fehlermeldung nicht verstehe.
Gruss,Micha

P.S.: Ich habe ja nicht den Anspruch die ganze Datei ins deutsche zu übersetzen, sondern nur die Meldungen, die die Benutzer ausgegeben bekommen, z.B. "Nickname already in use" in "Der Nickname wird bereits benutzt"  :wink:


----------



## Senatormicha (17. Nov 2007)

Hallo,
ich habe mal den Sourcecode in eine zip-Datei gepackt. Da es ja Opensource ist, wird der Autor wohl nicht dagegen haben. Im Ordner etc\properties finde ich auch wieder die Datei "eirc_en.properties". Wenn mir also jemand erklärt, wie man aus dem Sourcecode die benötigten Dateien erstellen kann, wäre ich fertig.
Gruss,Micha


----------

