Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   Localizing Phex (translating) (https://www.gnutellaforums.com/localizing-phex-translating/)
-   -   How to localize Phex 2.0 (https://www.gnutellaforums.com/localizing-phex-translating/26759-how-localize-phex-2-0-a.html)

arne_bab July 15th, 2004 04:46 AM

How to localize Phex 2.0
 
1 Attachment(s)
There is a language file, which can be translated relatively simply.

It needs to be in the folder $phex/ext
$Phex is the folder with the jars).

There should then also be a file named language.list. That file simply contains a list of languages in the format [lang]_[country]. For example: en_US or de_DE.

You need to add dutch (I don't know the short form for it).

You also need to rename the lang.properties file.
For the german file it would be lang_de_DE.properties.
For dutch it is Lang_nl_NL.properties.

I hope this all is correct...

I attach the lang.properties file (you need to rename it from lang.txt, the forum won't take .properties files).

RaaF July 15th, 2004 05:32 AM

Nice one Arne

I just Downloaded the file and I will have a closer look later.
At first glance it looks simple to do.

RaaF July 15th, 2004 09:05 AM

Hello Arne,

I use Windows (2K) and in my Phex folder I see no Language files.
I even searched in the .jar files but nothing.
In the programme, under options there is also no choise for another language just US english.
Perhaps the Windows installer does not install the language option ?

arne_bab July 15th, 2004 01:29 PM

You need to add a folder named "lang" in the same folder as the jar-files. Then add the folder "resources" inside that folder and put the files there.

RaaF July 15th, 2004 03:42 PM

1 Attachment(s)
Arne
I followed your instructions but no-go

arne_bab July 15th, 2004 11:52 PM

Seems we have to ask the developer about this.

Did you add nl_NL in a new line to the language.list file?

GregorK July 16th, 2004 12:47 AM

Arne's description was correct except for the folder name. The files should be just in the $PHEX/lang folder.

I repeat the steps in a short summary again:
  • Create a file $PHEX/lang/language.list and add a single line nl_NL
    This file is used to build the language list in the UI.
  • Create a file $PHEX/lang/Lang_nl_NL.properties or $PHEX/lang/Lang_nl.properties and translate the text in it.
  • The order Phex uses to search for translations is nl_NL, then nl and then it will fallback to use the default english language file. The first found translation will be used.

Gregor

GregorK July 16th, 2004 02:54 AM

Hmpf.. Just found a tiny bug... your translated file will not be displayed even if you have the correct configuration.
I will release a fix very soon.

RaaF July 16th, 2004 04:17 AM

OK thanks for your info Gregor, I hope you can easely fix it.

BTW ,
This is what's in the lang.list file:

en_US
nl_NL

Should there be a single line for every language, or just one for NL ?

GregorK July 16th, 2004 04:54 AM

Your lang.list should be named language.list

There should be a single line for every language but you dont need to specify languages, which are already by default inside Phex, like en_US.

So your language.list needs just one single line:
nl_NL

It was a easy fix, just a missing "/". As soon as I have time I will compile and publish the release.


EDIT: To get around hassle of creating a new release for this little fix, everybody who is interested in the localization fix can contact me by mail or pm to get it.

RaaF July 16th, 2004 06:27 AM

Works !

I started the translation and when it is finished I let you know.

RaaF July 17th, 2004 07:53 AM

Pfff,
Doing a good translation is more work than I expected it to be......if you mistype you mess up the GUI and all...:D
But never mind I get there bit by bit.

I ran into a few other bugs,
I can't change the name of the library tab.(it also has a mistyped tooltip)
I also can't rename the two monitor tabs and tooltips.

And, is it possible to simply add extra tooltips ?
Just adding a extra TTT line
doesn't work.
;)

GregorK July 17th, 2004 12:29 PM

1 Attachment(s)
Hmm... I think there is something missing in the file you used from Arne.

Here are the keys for Library Tab and the monitor tabs. Also I attached you the current Lang.properties file I have, if other keys are missing too.

# Library Tab
Library = Library
TTTLibrary = Overview of the shared library.
LibraryMnemonic = L
LibraryAccelerator = control 5
SharedFiles = Shared Files
Rescan = Rescan

# SearchMonitorTab
SearchMonitorTab_SearchMonitor = Search Monitor
SearchMonitorTab_TTTSearchMonitor = Monitor searches going through your node.
SearchMonitorTab_Mnemonic = m
SearchMonitorTab_Accelerator = control 8
SearchMonitorTab_enable = enable
SearchMonitorTab_Show = Show
SearchMonitorTab_Rows = rows.

# ResultMonitorTab
ResultMonitorTab_ResultMonitor = Result Monitor
ResultMonitorTab_TTTResultMonitor = Monitor search results going through your node.
ResultMonitorTab_Mnemonic = R
ResultMonitorTab_Accelerator = control 9
ResultMonitorTab_ResultFilter = Result Filter
ResultMonitorTab_TTTPassiveSearch = Specify keywords to match, separated by space.
ResultMonitorTab_StartPassiveSearch = Start Passive Search
ResultMonitorTab_TTTStartPassiveSearch = Passive search monitors the search results routed through here. This might take a while.
ResultMonitorTab_StopPassiveSearch = Stop Passive Search

murasame July 27th, 2004 06:31 PM

I've just dlded Phex 'cause Raaf suggested I did a french translation of it (very very cool app by the way). Problem is, I'm on OSX and don't really get it: where is this $phex folder you're all talking about? Do I find it in Phex itself or the Finder. Or maybe it's not available for Macs (I kinda doubt that though).
I'm not that much of a programer-type person (yet:p ) so if you'd be so kind as to give me the thorough steps to take in order to start the translation (and in baby-talk too if you can:))

Arigatou gozaimasu

et voilà July 27th, 2004 06:53 PM

Salut Murasame, do ctl-click on the app Phex and select see packet content, you'll see contents - open to ressources - java: the .jar are there so I think the lang folder should be put there.

Bonne chance pour la traduction en français, c'est de la grosse ouvrage comme on dit au Québec!:)

Ciao

edit: I told get info intead of see packet content, sorry :rolleyes:

GregorK July 28th, 2004 05:33 AM

With $PHEX we are talking about the folder the phex.jar is in.

You dont need to put anything in the phex.jar which would be complicated. Just add a folder called 'lang' to it and follow the instructions.

murasame July 29th, 2004 08:32 AM

sorrysorrysorrysorrysorry...
 
Ok, I realize I must be becoming a pain in the a$$; but I just wanna make really really really sure I got it right:

-I Ctrl-click the Phex icon in the Finder and choose "Show Package contents"
-I navigate to Contents->Resources->Java. I create a Folder there, labeled 'lang'.
-About the "Create file" parts: what do I use to create them? Text edit? If so, then I add to the files (after having finished them) the extension .list and .properties.

Sorry to be such a pain, but I need to understand exactly what to do. And I'm kinda dumb at times (or because of the summer break, my mind has chosen to maintain only the absolutely indispensable functions, such as breathing) :(

Thanks again, in advance.

arne_bab July 29th, 2004 09:22 AM

The folder-creation is correct.

You don't need to create those files. Simply download them from earlier posts in this thread.

For editing I'd use SubEthaEdit (as I asume you're using a Mac, when you mention TextEdit): http://codingmonkeys.de/subethaedit/

After translating, choose from the menubar format->file-encodings->Western (ASCII)

In the dialog, tell it to convert the file.

Everything else is correct, as far as I can see it (afaicsi).

GregorK July 29th, 2004 10:05 AM

1 Attachment(s)
To make it really really easy for you here is a Zip file containing the folder and the two files you need.

You translate all the english Text into french..

murasame July 29th, 2004 10:20 AM

Man, thanks and sorry again to all.

arne_bab July 29th, 2004 11:49 AM

No need to say sorry. You want to help so what reason should we have to be angry when you ask? (I chatted quite much with regor before I learned how to translate it, so you have every right to ask any question which comes to your mind! :) )

Many thanks to you!

RaaF July 29th, 2004 01:04 PM

Well the Duch translation is as good as finished
Only, I can't change the column names under the SearchMonitor tab.
And in the options screen under users interface, I can only describe 2 settings, while there are 3 (language is missing)
And as I have some lengthy info texts, could the displaytime be set a little longer ?
And If it is easy to add extra TTT lines at some points, could someone explain howto ?

Further, could it be there are some old entries in the properties file ?

And I think the English version could be changed a little, more seen from a user point of view.
(but I have no time for it at the moment)

Oh yes and finally, what does DailyUptimeProvider mean.
Uptime the last 24Hr.?

GregorK July 30th, 2004 03:50 AM

Quote:

Originally posted by RaaF
Well the Duch translation is as good as finished
Great! can I have a preview?
Quote:

Only, I can't change the column names under the SearchMonitor tab.
The localization of them was missing. Here are the key available in the next release.

SearchMonitorTab_RoutedFrom = Routed From
SearchMonitorTab_SearchText = Search Text
SearchMonitorTab_HopsTtl = Hops / TTL
Quote:

And in the options screen under users interface, I can only describe 2 settings, while there are 3 (language is missing)
UserInterfaceText = <html>This section of the options system allows you to change settings that \
affect the user interface of Phex.\
<table border="0"><tr><td valign="top">*</td><td>'General' let you alter the look and feel of the \
user interface and it's font.</td></tr>\
<tr><td valign="top">*</td><td>'Language' let you change the user interface language. \
<tr><td valign="top">*</td><td>'Prompts' gives you options about which alerts and notifications \
you like to be informed of.</td></tr></table></html>
Quote:

And as I have some lengthy info texts, could the displaytime be set a little longer ?
You mean the tooltip text display time? I have to check for that, I guess its a Java default currently.
Quote:

And If it is easy to add extra TTT lines at some points, could someone explain howto ?
You need to do it in the Java source. Its not working easily on all components. Like tables are difficult. But lets assume you have a simple component. Like a JButton. In that case you can just call the standard method setToolTipText. Here a simple example:

searchButton.setToolTipText( Localizer.getString( "TTTStartSearch") );

But I guess the easiest way would be to tell me the elements and I add the changes for you quickly. Maybe we can do this through ICQ or anything..
Quote:

Further, could it be there are some old entries in the properties file ?
Yes, I'm currently working on a tool to find them out.
Quote:

And I think the English version could be changed a little, more seen from a user point of view.
(but I have no time for it at the moment)

I'm open to any suggestions from anyone to improve the texts.
Quote:

Oh yes and finally, what does DailyUptimeProvider mean.
Uptime the last 24Hr.?

Compared to uptime, daily uptime is a weighted average calculation of the time you are online per day (The current day counts more, days in the past count less).
The formular came from Limewire and the value is PONGED through the network together with IPs to determine how likely it is to connect to a host.

Gregor

RaaF July 30th, 2004 04:14 AM

1 Attachment(s)
Hello Gregor,
I have little time right now but here's the Dutch version.
It is NOT the definitive version, becouse I am not 100% satisfied with it.

I'll be away for the weekend but be back sundaynight.

RaaF

RaaF October 23rd, 2004 05:19 AM

1 Attachment(s)
Finished Dutch version

GregorK October 23rd, 2004 11:17 AM

Great!
Thanks, that is the first finished translation. It will be in the next release.


All times are GMT -7. The time now is 08:59 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.