summaryrefslogtreecommitdiff
path: root/doc/TRANSLATING
blob: 4b49fa5a0675f4f3421e6565cb1cf55bd750a663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#--------------------------------------#
| INSTRUCTIONS FOR TRANSLATING PORTATO |
#--------------------------------------#

PRENOTE: This document is copied from the porthole project and slightly changed afterwards.
Thanks guys :)

The recommended way to translate Portato into another language is to use
"Poedit" (app-i18n/poedit). However you might want to try out either
KBabel (kde-base/kbabel) or Gtranslator (app-text/gtranslator).


Getting the sources:
===================

You do need the sources to make translations. The installed program is not sufficient.
Change into a local directory where you want to have the sources installed.
Then do:

> bzr pull lp:portato

You now should have the actual sources in the "portato" subdirectory.


To update an incomplete translation:
===================================

If there is a translation for your language already, then open the .po file in
portato's i18n/ directory with Poedit (e.g. pl.po = Polish, fr_FR.po = French
(France)). Select "Update from POT file" from the "Catalog" menu, then choose
the messages.pot file in the i18n/ directory. Untranslated strings will be
highlighted and placed at the top of the list. Translate them and save the file!


To create a new translation:
===========================

Open poedit and Select "New catalog from POT file" from the "File" menu, and
choose the messages.pot file in portato's i18n/ directory. Translate, then save
the file (also in the i18n/ directory) as <lang>.po where <lang> is the two
letter code for your language, optionally followed by a two letter modifier.
For example en.po would be for English, en_GB.po would be specifically for
British English.


Important notes about placeholders:
==================================

The translatable strings in the messages.pot catalogue and the <lang>.po files
are partially in Python's string format, partially in GTK's. The following items
should be included in translated strings as placeholders for names or figures:

"%s" : string placeholder
"%d" : number placeholder
"%(days)d" : placeholder named "days", do not translate the name
pretty much anything starting with "%"

Html-Tags ("<b>some_text</b>") should be kept as is and only the text in between
has to be changed.

In addition, the underscore (_) is used to indicate that the next character will 
be used as the accellerator key. When the user presses "CTRL" + this key, it will 
perform the item's action. These are not required, but if you use them the 
characters chosen must all be different.

Strings like "gtk-quit", "gtk-cancel" etc. must not be translated.


To test your translation:
========================

run the "pocompile" script in the portato directory:

> ./pocompile.sh

This will compile all the .po files in i18n/ into .mo files (which
gettext uses when translating Portatot) and place them in the necessary
subdirectories (<lang>/LC_MESSAGES).

Now you can run the local portato version in your language:

> ./portato.py

If you are not seeing your language, make sure the environment variable "LANG" 
is set to your language code.
For example, to run portato using the German translation:

> LANG="de_DE" ./portato.py


To submit the translation so we can include it in Portato distributions:
========================================================================

The easiest method is to post it to a tracker on portato's site: 
http://portato.origo.ethz.ch/issues

Or send a mail to portato@necoro.net


I found a string in Portato that I can't translate! What gives?:
================================================================

Post a bug report on the sourceforge site
(http://portato.origo.ethz.ch/issues). Include the untranslatable string
and where in Portato you came across it. It's easy for us to mark the strings
for translation, but we may have missed some!


I don't want to use a stupid GUI, they are plain text files!:
============================================================

The .po files are indeed plain text files. If you don't want to use poedit for
some reason, these gettext commands might come in handy:

Update a .po file from the messages.pot file:
> "msgmerge <lang>.po messages.pot > newpofile.po"

Create a new .po file from the messages.pot file:
> "msginit -i messages.pot -l <lang>"
> Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-05-11Update README with submodule build infoLars Hjemli1-13/+39 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-05-11Add submodule links in tree listingLars Hjemli6-12/+27 When a submodule occurs in a tree, generate a link to show the module/commit. The link is specified as a sprintf string in /etc/cgitrc, using parameters 'module-link' and 'repo.module-link'. This should probably be extended with repo.module-link.$path. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-05-11Add submodules.sh and use it during buildsLars Hjemli3-13/+222 This adds a shell script which can be be used to initialize, list and update submodules in a git repository. It reads the file .gitmodules to find a mapping between submodule path and repository url for the initial clone of all submodules. The script is used during cgit builds to enable automatic download and checkout of the git git repository. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-05-11Added git as a submoduleLars Hjemli2-1/+1 This commit adds the subdirectory 'git' as a submodule containing the git git repository, but doesn't add support for automatically cloning the submodule. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-05-09Add support for downloading single blobsLars Hjemli5-3/+47 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-05-08ui-view: show pathname if specified in querystringLars Hjemli3-5/+10 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-05-08Update to libgit 1.5.2-rc2Lars Hjemli9-837/+50 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-21Layout updateLars Hjemli9-32/+127 2007-02-08Make snapshot feature configurableLars Hjemli5-6/+22 Snapshots can now be enabled/disabled by default for all repositories in cgitrc with param "snapshots". Additionally, any repo can override the default setting with param "repo.snapshots". By default, no snapshotting is enabled. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-08Add support for snapshotsLars Hjemli8-8/+153 Make a link from the commit viewer to a snapshot of the corresponding tree. Currently only zip-format is supported. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-05cgit v0.2v0.2Lars Hjemli1-1/+1 Main changes since v0.1: -list tags in repo summary -allow search in log-view -read repository paths from cgitrc Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-05Add support for prefix and gitsrc arguments to 'make'Lars Hjemli2-15/+37 This should improve the installation a little, especially since the new options are mentioned in the README. Also, add a make-rule to build the git binaries if necessary + a dependency between cgit and libgit.a. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-04Update cgitrc templateLars Hjemli1-21/+32 Make the descriptions more helpfull. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-04Add support for lightweight tagsLars Hjemli2-19/+37 There is nothing bad about a tag that has no tag-object, but the old code didn't handle such tags correctly. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-04Read repo-info from /etc/cgitrcLars Hjemli5-55/+120 This makes cgit read all repo-info from the configfile, instead of scanning for possible git-dirs below a common root path. This is primarily done to get better security (separate physical path from logical repo-name). In /etc/cgitrc each repo is registered with the following keys: repo.url repo.name repo.path repo.desc repo.owner Note: *Required keys are repo.url and repo.path, all others are optional *Each occurrence of repo.url starts a new repository registration *Default value for repo.name is taken from repo.url *The value of repo.url cannot contain characters with special meaning for urls (i.e. one of /?%&), while repo.name can contain anything. Example: repo.url=cgit-pub repo.name=cgit/public repo.path=/pub/git/cgit repo.desc=My public cgit repo repo.owner=Lars Hjemli repo.url=cgit-priv repo.name=cgit/private repo.path=/home/larsh/src/cgit/.git repo.desc=My private cgit repo repo.owner=Lars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-04Do not die if tag has no messageLars Hjemli1-2/+2 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-03Fix search for non-virtual urlsLars Hjemli1-0/+6 When cgit don't use virtual urls, the current repo and page url parameters must be included in the search form as hidden input fields. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-01-28Update README with install/config informationLars Hjemli1-24/+28 Signed-off-by: Lars Hjemli <hjemli@gmail.com>