Translate.Shareaza

From Shareaza Wiki
Revision as of 20:11, 20 June 2009 by Kevogod (talk | contribs) (1 revision)
Jump to navigation Jump to search

Shareaza translation is performed in the following steps:

1) default-en.xml file 2) Library and search type (schemas) 3) Installer 4) Adult filter 5) Remote pages

Now in more details about each point.

1) The latest copy of default-en.xml file can be found in SVN. Save it from your browser and start translating. You will need any XML editor which supports saving files in UTF-8 encoding. You can use Notepad++ (read here about it), jEdit, EmEditor with XML Validator plugin, ButterflyXML. The latter is for advanced users.

Or you can try one of these other XML Editors.

You can even use Notepad for that. But the main thing is to check the file for validity. Many XML editors can validate your file and find an error. You can miss a quote, a closing tag for e.g., 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.

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.

Some translations were removed from Shareaza since they were not updated. We have them in [3]--look at the files marked as "dead". You can download and update them. The instructions in PDF file format on how to update the existing file using ]]CompareIT![[ and EmEditor can be downloaded from here.

Note about "strings" translation: Make sure that variables order from left to right is the same as in original file. Variables are %s, %i etc. If you mix the order, Shareaza may crash!

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).

2) Library translations (folder names, searh 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}".

3) 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.

4) 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 e.g. "teen" word will filter "teens" and "teenage" too. Save that file in ANSI and put to Data folder to test it.

Remote pages can be found in Remote folder of Shareaza installation. Save the files in UTF-8 (remember that some people will want to search in several languages).

The trick how to get 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.