Translate.Shareaza: Difference between revisions

From Shareaza Wiki
Jump to navigation Jump to search
m (1 revision)
(Updated from cache)
Line 1: Line 1:
__TOC__
Shareaza translation is performed in the following steps:
Shareaza translation is performed in the following steps:


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


Now in more details about each point.
Now in more details about each point.


'''1)''' The latest copy of default-en.xml file can be found [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/Languages/default-en.xml 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 [http://forums.shareaza.com/showthread.php?s=&threadid=34648 here] about it), [http://www.jedit.org/ jEdit], [http://www.emeditor.com/ EmEditor] with XML Validator plugin, [http://www.butterflyxml.com/ ButterflyXML]. The latter is for advanced users.
==The ''default-en.xml'' file==
The latest copy of default-en.xml file can be found in the [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/Languages/default-en.xml SVN]. Save it from your browser and start translating. A list of started translations and their state is located [http://www.pantheraproject.net/wiki/index.php?title=Languages_Revisions here].
 
===Using editors===
You can use any XML editor which supports saving files in UTF-8 encoding. Some good options include:
*[http://notepad-plus.sf.net/ Notepad++]
*[http://www.jedit.org/ jEdit]
*[http://www.emeditor.com/ EmEditor] with XML Validator plugin
*[http://www.butterflyxml.com/ ButterflyXML] for more advanced users
*[http://www.grigsoft.com/wincmp3.htm%7C CompareIT!]
*[http://sourcegear.com/diffmerge/index.html%7C DiffMerge]
 
Instructions in PDF file format on how to update the existing file using CompareIT! and EmEditor can be downloaded from [http://www.ife-baltic.com/translation_updates.rar here].  


Or you can try one of these other [http://www.solaris4you.dk/xml_editorsSS.html XML Editors].
You can also try one of these other [http://www.solaris4you.dk/xml_editorsSS.html 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.  
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.


XML file consists of the following sections:
===Using dedicated tools===
There were several attempts to ease the translation of the XML file by creating tools for Shareaza's XML file specifically:


* [http://www.shareaza.com/?id=skindocs/fonts fonts] -- an optional section if you want to override the default fonts
*RazaXML (by omega09)
* [http://www.shareaza.com/?id=skindocs/default#manifest manifest] -- here you put all info about you and your translation
*[http://www.cherubicsoft.com/shareaza/SkinTranslate.zip Skin translate utility] (by raspopov)
* [http://www.shareaza.com/?id=skindocs/toolbars toolbars]  
 
* [http://www.shareaza.com/?id=skindocs/menus menus]  
===Instructions===
* [http://www.shareaza.com/?id=skindocs/watermarks watermarks] -- not used for the translation
An XML file consists of the following sections:
* [http://www.shareaza.com/?id=skindocs/documents documents] -- rich text documents which are displayed in Shareaza
 
* [http://www.shareaza.com/?id=skindocs/commandTips commandtips] -- status bar tooltips
*[http://shareaza.sf.net/?id=skindocs/fonts fonts]: an optional section if you want to override the default fonts
* [http://www.shareaza.com/?id=skindocs/controlTips controlTips] -- tooltips for various dialogs
*[http://shareaza.sf.net/?id=skindocs/default#manifest manifest]: here you put all info about you and your translation
* [http://www.shareaza.com/?id=skindocs/strings strings] -- various texts
*[http://shareaza.sf.net/?id=skindocs/toolbars toolbars]  
* [http://www.shareaza.com/?id=skindocs/dialogs dialogs] -- all Shareaza dialogs
*[http://shareaza.sf.net/?id=skindocs/menus menus]  
* [http://www.shareaza.com/?id=skindocs/listColumns listColumns] -- column names; your translation should be put into the '''to=""''' attribute, between quotes.
*[http://shareaza.sf.net/?id=skindocs/watermarks watermarks]: not used for the translation
*[http://shareaza.sf.net/?id=skindocs/documentss documents]: rich text documents which are displayed in Shareaza
*[http://shareaza.sf.net/?id=skindocs/commandTips commandtips]: status bar tooltips
*[http://shareaza.sf.net/?id=skindocs/controlTips controlTips]: tooltips for various dialogs
*[http://shareaza.sf.net/?id=skindocs/strings strings]: various texts
*[http://shareaza.sf.net/?id=skindocs/dialogs dialogs]: all Shareaza dialogs
*[http://shareaza.sf.net/?id=skindocs/listColumns 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.  
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.  
Line 36: Line 57:
You can ask forum regulars to make the flag for you if you don't know how to create it.
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 [http://shareaza.svn.sourceforge.net/viewvc/shareaza/trunk/Languages/Old/]--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 [http://www.ife-baltic.com/translation_updates.rar here].
'''''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!


'''''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!
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.


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).
Some translations were removed from Shareaza since they were not updated, thee are located [http://shareaza.svn.sourceforge.net/viewvc/shareaza/trunk/Languages/Old/ 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).


'''2)''' Library translations (folder names, searh file types, library headers) are translated as XLS file. Download the [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/Schemas/Database/Schemas.xls 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}".
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: [http://www.37.co.yu/fi/default.asp] [http://www.fotw.net/flags/iso3166.html] You can ask forum regulars to make the flag for you if you don't know how to create it.


'''3)''' The installer needs only a few lines translated. Look at [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/setup/scripts/languages.iss languages.iss file] in SVN. Just copy all lines starting after '''<nowiki>[CustomMessages]</nowiki>''' 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 [http://www.jrsoftware.org/files/istrans/ Inno Setup] website) you will have to translate [http://cvs.jrsoftware.org/view/*checkout*/issrc/Files/Default.isl Default.isl] yourself. Save it as ANSI too.  
==Library and search type (schemas)==
Library translations (folder names, search file types, library headers) are translated as XLS file. Download the [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/Schemas/Database/Schemas.xls 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 [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/setup/scripts/languages.iss languages.iss file] in SVN. Just copy all lines starting after '''<nowiki>[CustomMessages]</nowiki>''' 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 [http://www.jrsoftware.org/files/istrans/ Inno Setup] website) you will have to translate [http://cvs.jrsoftware.org/view/*checkout*/issrc/Files/Default.isl 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 [http://www.gnu.org/licenses/translations.html here], leave it in English.
The Shareaza installer needs GNU GPL unofficial translations, but they are optional. If you can not find a GPL translation [http://www.gnu.org/licenses/translations.html here], leave it in English.


'''4)''' Adult filter can be downloaded from [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/setup/filter/default.dat here]
==Adult filter==
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.
Adult filter can be downloaded from [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/setup/filter/default.dat 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 [http://shareaza.svn.sourceforge.net/viewvc/*checkout*/shareaza/trunk/Remote/Remote.xls 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).  


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


'''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.
If you have any problems finding a correct translation for a term, look at [http://www.microsoft.com/globaldev/tools/MILSGlossary.mspx "Microsoft Terminology Translations"] or ask regulars in the [https://sourceforge.net/apps/phpbb/shareaza/viewforum.php?f=6 Translate Shareaza] forum.
Thus, you need to open registry (Start-&gt;Run-&gt;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 [http://www.microsoft.com/globaldev/tools/MILSGlossary.mspx "Microsoft Terminology Translations"] or ask regulars in the [http://forums.shareaza.com/forumdisplay.php?forumid=8 Translate Shareaza] forum.
==Submitting translations==
The best way to submit your translation is to upload it to the [https://sourceforge.net/apps/phpbb/shareaza/viewforum.php?f=6 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.

Revision as of 13:15, 30 July 2009

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.

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:

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:

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, thee 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.