Translate.Shareaza
Recovered |
The following content has been recovered from pantheraproject*net. Some content may be outdated, incomplete, or improperly formatted | e |
Shareaza translation is performed in the following steps:
- default-en.xml file
- Library and search type (schemas)
- Installer
- Adult filter
- Remote pages
Now in more details about each point.
The default-en.xml file
The latest copy of default-en.xml file can be found in the SVN. Save it from your browser and start translating. A list of started translations and their state is located here.
Using editors
You can use any XML editor which supports saving files in UTF-8 encoding. Some good options include:
- Notepad++
- jEdit
- EmEditor with XML Validator plugin
- ButterflyXML for more advanced users
- CompareIT!
- DiffMerge
Instructions in PDF file format on how to update the existing file using CompareIT! and EmEditor can be downloaded from here.
You can also try one of these other XML Editors.
You can even use Notepad for the task, but the main thing is to check the file for validity. Many XML editors can validate your file and find errors. You can miss a quote or a closing tag for example and that will make the file unreadable by Shareaza. You can even validate XML files by using your browser. It will tell an approximate line number where the error appears.
Using dedicated tools
There were several attempts to ease the translation of the XML file by creating tools for Shareaza's XML file specifically:
- RazaXML (by omega09)
- Skin translate utility (by raspopov)
Instructions
An XML file consists of the following sections:
- fonts: an optional section if you want to override the default fonts
- manifest: here you put all info about you and your translation
- toolbars
- menus
- watermarks: not used for the translation
- documents: rich text documents which are displayed in Shareaza
- commandtips: status bar tooltips
- controlTips: tooltips for various dialogs
- strings: various texts
- dialogs: all Shareaza dialogs
- listColumns: column names; your translation should be put into the to="" attribute, between quotes.
To test your translation, put default-xx.xml file into Skins/Languages folder, where xx is the language code. You can use 2 or 3 letter codes or have a country code appended, like for e.g. pt-br, which means Portuguese Brasilian. Be consistent with those codes everywhere in the translations.
You may need to create a flag icon for the language. It has the same name as the xml file: default-xx.ico. Flag images and details about them can be found at these websites: [1] [2] You can ask forum regulars to make the flag for you if you don't know how to create it.
Note about "strings" translation: Make sure that variables order from left to right is the same as in the original file. Variables are %s, %i etc. If you mix the order, Shareaza may crash!
To test your translation, put default-xx.xml file into Skins/Languages folder, where xx is the language code. You can use 2 or 3 letter codes or have a country code appended, like pt-br for example, which means Portuguese Brasilian. Be consistent with those codes everywhere in the translations.
Some translations were removed from Shareaza since they were not updated, they are located here, look at the files marked as "dead". You can download and update them. The requirement to have your translation included in the Shareaza installer is to translate more than 50% of the menus (or make them current if you are updating your translation) and to have all dialogs for Normal mode translated (for new users).
You may need to create a flag icon for the language. It has the same name as the xml file: default-xx.ico. Flag images and details about them can be found at these websites: [3] [4] You can ask forum regulars to make the flag for you if you don't know how to create it.
Library and search type (schemas)
Library translations (folder names, search file types, library headers) are translated as XLS file. Download the Schemas.xls file and then use it to do the translation. The database allows you to create XML file schemas automatically, So you could test your translation by putting all files in the Schemas folder. Don't translate variable names which are enclosed between curly brackets, like "{name}".
Installer
The installer needs only a few lines translated. Look at languages.iss file in SVN. Just copy all lines starting after [CustomMessages] section, translate using Notepad and save as ANSI text (from notepad choose Save As... and select ANSI). If the official or unofficial translations are not available (look at Inno Setup website) you will have to translate Default.isl yourself. Save it as ANSI too.
The Shareaza installer needs GNU GPL unofficial translations, but they are optional. If you can not find a GPL translation here, leave it in English.
Adult filter
Adult filter can be downloaded from here. Leave all English text and add any words in your language. You don't need to put words in all forms. For example: "teen" word will filter "teens" and "teenage" too. Save that file in ANSI and put to Data folder to test it.
Remote pages
For the Remote pages download an Excel file from here and put your translations. The pages are auto-generated from the database like schemas files, so you will need to post it in the translation forums and developers to provide you with HTML files for testing if you need. Otherwise, you could test your new translation by using daily builds and check/correct it. Alternatively, you can find the remote pages under Shareaza installation folder and translate them. Save the files in UTF-8 (remember that some people will want to search in several languages).
How to get an almost correct XML for dialogs
This trick is useful if you can not get the dialog translated (maybe dialog cookie or english XML file was not updated?). But keep in mind that drop down boxes are not displayed using this method, so you will need to add drop down "captions" manually, at the correct place. Thus, you need to open registry (Start->Run->regedit), and create DWORD value DialogScan and set it to "1" at this path: HKEY_CURRENT_USER\Software\Shareaza\Shareaza You can change this value while Shareaza is running. When you want go back to the translated mode, just set the value to "0". When you open any dialog or settings page, the file c:\Dialog.xml will be created. You can examine it to find out what the correct XML must be for your translation.
If you have any problems finding a correct translation for a term, look at "Microsoft Terminology Translations" or ask regulars in the Translate Shareaza forum.
Submitting translations
The best way to submit your translation is to upload it to the Translate Shareaza forum. Just zip the file(s) you had translated and make a post with them, you will be notified when they were updated. You can submit partial translation that match the requirements above.