Translate.Website

From Shareaza Wiki
Revision as of 03:07, 2 January 2008 by Dirtycat (talk | contribs) (→‎Additional Information About Translating)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Translating the Website

The website uses the gettext utilities to make the website translateable. There are several tools that can be used to create gettext translations but most Shareaza translators use poEdit.

Get poEdit

  • Download the Windows version of poEdit.
  • Run the installer
  • Start poEdit.
  • Go to File -> Preferences, choose the Personalize tab if it isn't already selected, and then fill in your name and email address.
  • Switch to the Editor tab and uncheck Automatically compile .mo file on save. The website will generate this file automatically so you don't have to.
  • That's all the preferences you need to configure.


If you are updating an existing translation then skip to the section Updating an Existing Translation.


Get and open the POT file

The POT file is the list of all the English words and phrases that will need to be translated to your language. The most up to date version can always be downloaded here: http://www.shareaza.com/testsite/pot/shareaza.pot Save this file to your computer then switch to poEdit. Go to File -> New catalog from POT file and then select the POT file you just downloaded. It will now ask you for some information about the project. Fill it in according to this list:

  • Project name and version - Shareaza Website
  • Team - Shareaza Development Team
  • Team's email address - Leave blank
  • Language - Choose your language from the list or type it in if you can't find it.
  • Country - Choose your country from the list or type it in if you can't find it.
  • Charset - Choose utf-8 unless it absolutely won't work for your language.
  • Source code charset - Leave blank
  • Plural Forms - Leave blank

When you choose OK it will ask you where you want to save the .po file and what to call it. You can name it whatever you want but "shareaza_<two letter language code>.po" is a good name.

Begin Translating

You will now see a list of strings that need to be translated. In the bottom half of the screen there is a box with the English string that needs to be translated. The box below it is where you put your translation. If you need to know the context of the string you are translating then you can right click on the string in the string list and it will say something like "addon.html:38". This tells us to go look at the addon page. The number after the colon does not represent the line number.

Get Your Translation Published

The website translations are first tested on a development site and then transferred to the production/real site once they are correct. You can update your translation in realtime on the development server once you get authorized to upload updates for your language. Contact dcat via forum Private Message to get authorized. This will allow you to easily test your translation and try out a few ideas.

Additional Information About Translating

  • There is limited overall space in the navigation bar at the top of the page. If necessary the font size can be made smaller to fit it all in.
  • There is limited space for translations in the headings above the blocks on the front page. So be as brief and concise as possible. This will hopefully get fixed eventually.


File:Heading bar.png


  • When translating the actual word for your own language on the team page make the translation ":" so that it doesn't get repeated twice. For example if you were translating to Russian then you would translate "/Russian:" to ":".
  • Some of the translation strings have HTML markup inside of them. For example <strong> is used to emphasize a word or phrase by making it bold. Feel free to use those wherever they make sense.
  • Some translation strings have links in them. If there is an equivalent page in your own language then link to it instead of the English version. For example if you were translating to Russian then whenever you saw "http://forums.shareaza.com/" you would translate it to "http://forums.shareaza.com/forumdisplay.php?forumid=29" so that people who speak Russian would be able to more easily find the Russian forum. This mainly applies to the wiki and forum links.
  • Use links similar to this: http://www.shareaza.com/testsite/?id=download&lang=xx to validate your translations using [1]. Fill in xx with your two letter langauge code. Sometimes it's difficult to find missing tags but that should help.
  • There is a string "channel=shareaza" that is used for setting the IRC applet's channel. If there is a Shareaza channel on irc.p2pchat.net for your language then translate it as "channel=<your-shareaza-channel>". For example: "channel=shareaza-spanish".
  • Strings that come from the file "vars/titles.html" (as indicated by their comment when right clicking on the string in poEdit) are used in the title bar of each web page. For example: "Get Help!" will be shown in the title of the Support page.

Retrieving Translations

If you have submitted a translation and subsequently lose the .po file it can be retrieved from the development website. Go to [2] and find the directory of your two-letter language code. Also if you are continuing someone else's translation you can get it from there.

Updating an Existing Translation

If you are going to be updating a translation that someone else has already made or a translation you made then follow this procedure.

  • Download the po file from the address above if you don't already have it.
  • Open poEdit
  • Go to File -> Open and choose the po file you just downloaded.
  • Download the most recent POT file from the address above.
  • Go to Catalog -> Update from POT file and choose the pot file you just downloaded.
  • Translate the new strings.