Translating Gramps/zh

From Gramps
(Redirected from Translating GRAMPS/zh)
Jump to: navigation, search

如何翻译 GRAMPS ! Tips for translators of the GRAMPS program.

GRAMPS 翻译者注意事项。

Gettext file format

Gettext 文件格式



原文: msginit is a GNU utility, called on /po directory, which generates a header for gettext file template : gramps.pot.

译文: "msginit" 是一个GNU套件, 调用/po目录,生成gettext 文件模板的文件头: "gramps.pot"

"Project-Id-Version: PACKAGE VERSION\n"        |"项目-ID-版本": 项目包版本信息
"Report-Msgid-Bugs-To: \n"                     |”报告Msgind错误到“:
"POT-Creation-Date: 2004-12-30 10:52-0500\n"   |”POT创建日期“:
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"    |”PO修订日期:”
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |最后翻译者:“
"Language-Team: LANGUAGE <>\n"        |”翻译团队:“
"MIME-Version: 1.0\n"                          |”MIME版本:“
"Content-Type: text/plain; charset=CHARSET\n"  |”内容形式:“
"Content-Transfer-Encoding: 8bit\n"            |”内容转换编码:“


  • Project-Id-Version : this is the name and version of the package. Fill it in if it has not already been filled in by xgettext.
  • Report-Msgid-Bugs-To : this has already been filled in by xgettext. It contains an email address or URL where you can report bugs in the untranslated strings:
    • Strings which are not entire sentences, see the maintainer guidelines in Preparing Strings.
    • Strings which use unclear terms or require additional context to be understood.
    • Strings which make invalid assumptions about notation of date, time or money.
    • Pluralisation problems.
    • Incorrect English spelling.
    • Incorrect formatting.
  • POT-Creation-Date : this has already been filled in by xgettext.
  • PO-Revision-Date : You don't need to fill this in. It will be filled by the PO file editor when you save the file.
  • Last-Translator : fill in your name and email address (without double quotes).
  • Language-Team : fill in the English name of the language, and the email address or homepage URL of the language team you are part of. Before starting a translation, it is a good idea to get in touch with your translation team, not only to make sure you don't do duplicated work, but also to coordinate difficult linguistic issues. In the Free Translation Project, each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, in the "Teams" area.


  • Project-Id-Version : 这是软件包的名称和版本。如果xgettext没有自动填写,请自行添加。
  • Report-Msgid-Bugs-To : 这个将会由xgeettext自动添加. 它包含一个email地址和URL,你可以使用未翻译的字串汇报错误:
    • 字串不是完整的句子,参照维护者指导手册中的字串。
    • 包含隐晦的词组或者需要附加上下文理解的字串。
    • 字符串使用无效的假设代替日期,时间,金钱的符号。
    • 复数的问题。
    • 不正确的英文拼写。
    • 不正确的格式。
  • POT-Creation-Date : 已由xgetext 自动填写。
  • PO-Revision-Date : 你不需要填写此项。当使用PO文件编辑器保存文件时,它将会被自动填写。
  • Last-Translator : 填写你的姓名和Email地址(无双引号)。
  • Language-Team : 填写语言的英文名称,Email地址或者你所在的翻译小组的主页地址。在开始翻译之前,最好联系你的翻译团队,不但可以确认避免重复工作,而且可以与其他人协调语言应用的问题。在免费翻译项目中,每个翻译团队都有它自己的邮件列表。 最新的翻译计划团队列表可以在以下地址找到 homepage

msgid / msgstr / comment / fuzzy



#, fuzzy
msgid "File not found"
msgstr ""


  • text after # provides a comment, the file reference and the line number. This will help translator but is optional for having a translation.
  • msgid is the string, present on gramps' code
  • msgstr is your translation

fuzzy could be added because string is not up-to-date. It means that there was a change somewhere (a string has been added, removed or modified) and xgettext did a guess on what the translation should be. This guess is most likely not entirely correct, but it is often very close.


  • 在#之后的文字属于注释,文件参考和行号。这将有助于翻译者但在翻译中仅仅作为可选项。
  • msgid 是一个字串,应用于gramps的代码。
  • msgstr 是你的翻译。

fuzzy 可以被添加,因为字串不会被更新。这意味着有一些改动(一个字串被添加,移除或者修改过)并且xgettext 猜测了可能的翻译。这种猜测很可能不完全正确,但是可能很接近。

Tips for translators


Getting started



  1. Always save your translations in UTF-8 encoding
  2. Don't overwrite the English strings, your translation should be below the original string
  3. Take heed on special characters. You must have the same number of and types as the original string.
  4. Verify spelling and grammar on your translation.
  5. Don't translate "too freely". Your translation should be as close match to the original as possible
  6. Be consistent with your translations. If you decide on a specific word/phrase for something, stick to that throughout the translation.
  7. If possible, try the translation before sending


  1. 总是使用UTF-8 编码保存你的翻译
  2. 不要覆盖英文字符串,你的翻译应当在原文之下
  3. 遵循特殊字符。你必须和原有字符串保留同样数量和类型。
  4. 验证你的翻译中的拼写和语法。
  5. 不要翻译的太随意。你的翻译应当尽可能与原文一致。
  6. 你的翻译应当前后一致。如果你决定了特殊的字句/短语,坚持在全文翻译中使用。
  7. 如果可以,请在发送翻译前测试翻译

原文: Translating GRAMPS into a new language means translating English strings used in the GRAMPS interface. To put it shortly, this amounts to

  1. obtaining the gramps.pot file with the strings to be translated,
  2. translating the strings in the template, and
  3. getting the translated file uploaded into gramps SVN repository.

Another avenue of translation is translating the documentation. This is a different and lengthy process and it is decribed in our Translating the Gramps User manual page. Here we will concentrate on the interface translation only.

译文: 翻译GRAMPS为一种新的语言,意味着翻译在GRAMPS界面的英语字符串。 简而言之,这意味着

  1. 获取包含着待翻译的gramps.pot文件,
  2. 在模板中翻译字符串,
  3. 上传翻译完成的文件到SVN仓库。

另外一种翻译途径称为翻译文档。这属于一种不同的长期的活动,并且在翻译手册 主页有描述。 在此我们将仅仅专注于对界面的翻译。

Obtaining gramps.pot

获取 gramps.pot


  • Download gramps.pot from GRAMPS SVN repository, see the introduction to SVN.
  • Look for gramps.pot in the directory gramps42/po or if you looking for the trunk version look for gramps.pot in the directory trunk/po.


  • 从GRAMPS SVN 仓库下载 gramps.pot,参照 the introduction to SVN.
  • gramps42/po 目录中搜索gramps.pot ,或者你在trunk 版本中的trunk/po目录搜索gramps.pot

Translating messages



  • Copy gramps.pot to the file named lang.po, according to the language you are translating into (fr.po for French, ru.po for Russian, etc.)
  • Use GTtranslator (GNOME), KBabel (KDE), Emacs po-mode, pootling (GNU/Linux, windows), poedit (GNU/Linux, OSX, windows), or any similar tool designed for translating .po files. If you do not like any of these tools, you can use any text editor to translate messages.
  • Even though GRAMPS uses UNICODE (UTF-8) for its character set, you may use your native character set for your translation. Just make sure you specify the character set you are using in the Content-Type line in the .po file. GRAMPS will handle the conversion to UNICODE.


  • 拷贝 gramps.pot 到文件,以 lang.po来命名, 基于你要翻译的语言 (fr.po 用于法语翻译 , ru.po 用于俄语翻译, 等等。)
  • 使用GTtranslator (GNOME), KBabel (KDE), Emacs po-mode, pootling (GNU/Linux, windows), poedit (GNU/Linux, OSX, windows), 或者任何相似的工具,设计用于翻译 .po 文件. 如果你不喜欢任何以上工具,你可以使用任何文本编辑器来翻译信息。
  • 如果GRAMPS 使用 UNICODE (UTF-8) 作为它的字符设置,你也可以使用你的本地字符设置。仅仅需要在.po 文件中的Content-Type 行,确认你所使用的字符设置。 GRAMPS 将会处理UNICODE字符的转换。



原文: As an extension to standard gettext, strings in GRAMPS can have a context prefix. This prefix should not be translated, and just be deleted in the translation. More info and an example further down.

As a special context, you will see the manual context, eg :


these strings should only be translated if a wiki manual is available in your language. The string refers to a section, eg Editing_Dates in Dutch becomes Datums_aanpassen.


作为标准gettext的一个扩展,在GRAMPS中的字串有一个语境的前缀。 这个前缀不应该被翻译,并且应该在 译文中北删除。例如further down

作为一个特殊的语境,你可参照手册的上下文,比如: 'manual|Editing_Dates' 这些字串,当有你的语言翻译的wiki手册时,有必要被翻译。 字串索引到相关部分,例如 Editing_Dates 在荷兰语中, 便成为了 Datums_aanpassen

Testing your .po file

测试你的.po 文件


In the directory gramps42/po or the trunk/po run the command:
If there are errors in your po file, this will fail and give you an error message. You should correct these errors. If you have trouble understanding the error, try to run the next test, which might give a more verbose output.


在目录gramps42/po 或者 trunk/po 中运行命令:
如果在你的 po 文件中有错误,将会编译失败,并且反馈错误信息。你应该纠正这些错误。 如果你无法理解错误,尝试下一个测试,可能会给你更加冗长的输出。



In the directory gramps42/po or the trunk/po run the command:
./check_po lang.po
python check_po lang.po > lang
alternative under Windows OS ???
where lang is your language code. This will give you errors in your translation, information on badly translated phrases, ... the output could resemble something like this..


在目录 gramps42/po 或者 trunk/po中运行命令:
./check_po lang.po
python check_po lang.po > lang
alternative under Windows OS ???
其中 lang是你语言的编码。 这将会在你的翻译中提供更多的错误信息,包括不适当的翻译句型,...输出可能类似以下:

File:               nl.po
Template total:     3816
PO total:           3671
Fuzzy:              125
Untranslated:       12
%s mismatches:      0
%d mismatches:      2
%() name mismatches:9
%() missing s/d:    0
Runaway context:    0
XML special chars:  0
Last character:     15
Shortcut in msgstr: 16
PO Coverage:        99.67%
Template Coverage:  95.89%
Localized at:       97% (previous gramps.pot)


If you get previous gramps.pot, then you are not using the last gramps.pot, see update your translation. fuzzy and untranslated strings will be ignored, Gramps will use main strings in english.


如果你有"之前的 gramps.pot",那么你所使用的不是最新的"gramps.pot",参考update your translation。"fuzzy"和未翻译的字串将会被忽略,gramps会使用英文中的主要字串。


-------- %d mismatches --------------

You can see that there are 3816 strings to be translated and the coverage is around 96 %. There are still 12 untranslated strings and some 120 fuzzies. The last one can be ok, but should be checked. Additional information shows e.g. that in 15 strings there is a mismatch with the 'last character':


-------- %d 不匹配 --------------

你可以看到有3816个字符串等待被翻译,其比例为大约96%。仍然有12个未翻译的字符串和大约120个模糊翻译。最后一项代表ok,但是仍需要检查。附加信息显示为 e.g. 有15个字串与'最后一个字符'不符:


-------- last character not identical ---------
msg nr: 98, lineno: 602
msgid "Could not make database directory: "
msgstr "Kon geen gegevensbestandsmap aanmaken"

This is very valuable information, because you can easily see what the problem is, even if you do not understand the language! Clearly the last characters must be ": "


-------- 最后的字符无法识别 ---------
msg nr: 98, lineno: 602
msgid "Could not make database directory: "
msgstr "Kon geen gegevensbestandsmap aanmaken"





In the directory gramps42/po or the trunk/po run the command:
msgfmt --statistics lang.po
where lang is your language code. This should not throw an error.

Basically this gives the same info in a condensed format: 3533 translated messages, 125 fuzzy translations, 12 untranslated messages.


在目录 gramps42/po 或者 trunk/po 下运行命令:
msgfmt --statistics lang.po
其中 lang 代表你的语言编码。 这应该不会发生错误。

大体上说,这会显示一种紧凑的格式:3533 已翻译,125 模糊翻译,12 未翻译。

GNU `gettext' utilities

GNU ‘gettext' 实用工具


GNU `gettext' utilities provides a few stand-alone programs to massage in various ways the sets of translatable strings, or already translated strings:

译文: GNU `gettext' utilities 以各种方式提供一些单机版本程序,一系列的可翻译的字串,或者已经翻译好的字符串:

msgattrib - attribute matching and manipulation on message catalog
msgcat - combines several message catalogs
msgcmp - compare message catalog and template
msgcomm - match two message catalogs
msgconv - character set conversion for message catalog
msgen - create English message catalog
msgexec - process translations of message catalog
msgfilter - edit translations of message catalog
msgfmt - compile message catalog to binary format (.po->.mo)
msggrep - pattern matching on message catalog
msginit - initialize a message catalog
msgmerge - merge message catalog and template
msgunfmt - uncompile message catalog from binary format
msguniq - unify duplicate translations in message catalog

For checking syntax : 检查句法结构:

msgfmt -c nl.po

Formatting (compiling) .po file

格式化(编译) .po 文件


  • Currently, formatting is performed during build time, so you should not have to worry about it. The translated .po file is the product of your work. Check it into SVN if you obtained the permission to do so, or email it to Brian or Benny otherwise.


  • 当前,格式化在编译程序的时候就被执行了,因此无需担心。 翻译后的 .po 文件就是你的劳动成果。检查SVN是否你有权限修改,或者发邮件给Brian or Benny

Updating your translation


原文: If you have submitted a translation, changes are that after some weeks/months, new strings are added to GRAMPS, implying you need to update your translation file.

译文: 如果你已经提交了翻译,经过了几个星期/几个月有了新的修订,新的字符串被添加到了GRAMPS内,表明你需要升级你的翻译文档。

原文: Assuming you have obtained originally the GRAMPS source tree as explained in Brief introduction to SVN. Now:

译文: 假如你已经在Brief introduction to SVN里面获得了以前的GRAMPS源代码树中的说明. 现在:


  • Update your gramps tree from SVN. This can be done by executing the command


  • 通过执行下面的命令从SVN上更新你的gramps树
    svn up

原文:from the root GRAMPS svn directory. This will download an updated gramps.pot file.

译文:这个命令将从GRAMPS svn的根目录下载更新gramps.pot文件.


  • Use your outdated translation to translate the strings that did not change:


  • 使用你原有的翻译,来替代本次未改变的字符串的翻译:
msgmerge lang.po gramps.pot -o newlang.po

or (或者)

msgmerge --no-wrap lang.po gramps.pot -o newlang.po

原文:where lang is your language code. The --no-wrap option will prevent changes due to automatic word wrapping, use it if your previous po file was constructed like that. The --no-wrap options allows for more readable SVN diffs. 译文: 其中 lang 是你的语言代码。


  • Translate all untranslated messages in newlang.po. When you are sure everything is right, rename newlang.po as lang.po and check it into SVN as you did with the original file.


  • 在文件newlang.po 中翻译所有未翻译的信息。当你确认所有翻译都正确后,将newlang.po 重命名为 lang.po 并将其放入SVN原文件中检查。


  • If command msgmerge is not available on your system, you have to install the }gettext package. For windows users.


  • 如果你的系统不支持命令msgmerge,你需要安装}gettext包。参照For windows 用户

原文: There is also the make target that does the following: 译文: make 命令也能实现以下内容: 原文:

  • Create new gramps.pot template from the source code files


  • 从源代码文件中,创建新的 gramps.pot 模板
  cd po
  make gramps.pot


  • Updates each po file in the source tree


  • 在源码树中更新每个 po文件

原文: It may be an overkill for you, but if you feel like using it, you can run: 译文: 这样可能很具有破坏性,但是如果你希望,你可以运行它:

  make update-po

原文: in the po directory. This assumes that you have already succesfully configured the source. 译文: 在po 目录中运行。此操作假设你已经成功的设定了源。

Testing your update


原文: You can test your update easily with the above mentioned check_po file. If you downloaded this file, just do: 译文: 依据以上提到的check_po 文件,你可以很容易的测试你的更新内容。如果你下载了这个文件,请执行:

python check_po newlang.po

原文: If everything is ok, the output will be something like this: 译文: 如果一切顺利,输出将会类似:

File:               newlang.po
Template total:     3075
PO total:           3075
Fuzzy:              0
Untranslated:       0
%s mismatches:      0
%d mismatches:      0
%() name mismatches:0
%() missing s/d:    0
Runaway context:    0
XML special chars:  0
Last character:     0
Shortcut in msgstr: 0
PO Coverage:        100.00%
Template Coverage:  100.00%

Installing your translation


原文: You want to use the new translation immediately, and systemwide? You can by installing just the contents of the po directory, but you will need to build the source first, so:

译文: 你是否希望立即使用新的翻译,并且是整个系统的? 你可以添加po目录的内容,但是你需要先编译源代码,类似:

cd po
make --prefix=/usr install     #as root !

原文: This should install your translations to /usr/share/locale/xx/LC_MESSAGES/, with xx being your language. You could of course copy your files manually to that dir with the name. 译文: 这应该把你的翻译安装到/usr/share/locale/xx/LC_MESSAGES/, 其中XX是你的语言。你当然也可以拷贝你的文件到gramps.mo文件名的目录。


Make sure you only install from within the po directory, or you will install the development version of GRAMPS, which is not supported and for testing only!

译文: 确认你仅仅在po目录内安装,或者你可以安装开发版本的GRAMPS,但是不支持并且仅仅作为测试用!

Running trunk with your translation


原文: The current GRAMPS trunk as of February 2009 by default looks for the i18n data under /usr/local/share/locale. So you can use: 译文:

cd po
make install     #as root !

This will install the .mo files under /usr/local/share/locale/xx/LC_MESSAGES, since the default prefix is /usr/local


Actually you don't even need to install the files in order to test them. This is useful because you can develop GRAMPS without needing superuser privileges. Bear in mind the GRAMPS i18n proccess goes something like this when you use trunk:

  • when you type make in the source tree root (/home/user/trunk e.g.) all the trunk/po/*.po files are compiled into trunk/po/*.gmo files.
  • when you type make install inside the /home/user/trunk/po directory, these .gmo files are copied to /usr/local/share/locale/xx/LC_MESSAGES as files.

But you can change the place where GRAMPS looks for these files by altering the environment variable $GRAMPSI18N. So you could also for intance do something like this and avoid the make install step: (if you are using csh or tcsh the syntax would be a little different)

[user@localhost /home/user/trunk]$ mkdir -p po/en_GB/LC_MESSAGES
[user@localhost /home/user/trunk]$ cp po/ po/en_GB/LC_MESSAGES/
[user@localhost /home/user/trunk]$ cd src
[user@localhost /home/user/trunk/src]$ GRAMPSI18N=$PWD/../po LANG=en_GB.UTF-8 python
Just testing your translation

If you don't want to compile all translations, you may use msgfmt utility on /po directory:

msgfmt your_lang.po 

this will create a file, a compiled version of your .po file. Rename to and put it on your translation path (see above).

Hard to Translate Phrases

Some things are just hard to translate. Below are a few of the more difficult items, along with some suggestions on how to handle them.

LDS Terminology

The Church of Jesus Christ of Latter Day Saints (a.k.a. Mormons) maintains a lot of genealogy data. In the United States, they are probably the non-government organization with the most detailed records available. Genealogical research is important to the Mormon church. They are responsible for defining the GEDCOM format.

The LDS Church has some specific terminology that can present difficulty in translating. There are two approaches to handling the information.

  1. If the LDS Church has a presence in your country, contact the LDS Temple in your area and ask them what the correct terminology is in your native language
  2. If the LDS Church does not have a presence in your country, it would probably be safe to simply not translate the phrases.

These terms include:

  1. LDS Ordinance names:
    • Sealed to Parents
    • Sealed to Spouse
    • LDS Baptism
    • Endowment
  2. LDS Status names for Ordinances:
    • Child
    • Cleared
    • Completed
    • Infant
    • Pre-1970
    • Qualified
    • Stillborn
    • Submitted
    • Uncleared
    • BIC (Born In the Covenant)
    • DNS (Do Not Submit)
    • Canceled
    • DNS/CAN (Do Not Submit/Previous sealing cancelled)

Advanced issues

Format line parameters

Format line parameters such as %s and %d should not be translated. The order of these parameters should not be changed. Examples:


   Long widowhood: %s was a widow %d years.

Translation (using Backward English as an example :-):

   Gnol doohwodiw: %s saw a wodiw %d sraey.

Named format line parameters such as %(something)s and %(something)d also should not be translated. Feel free to change the order of named parameters to correctly phrase the message in your language. Also, use hints provided by the names. Examples:


   Baptized before birth: %(male_name)s
           born %(byear)d, baptized %(bapyear)d.

Translation into Backward English:

   Dezitpab erofeb htrib: %(byear)d
           nrob %(male_name)s, dezitpab %(bapyear)d.

In the above example, the verb "born" should be in masculine form (if verbs in your language have gender, that is), since the person born is apparently a male.

Sometimes those %(something)s are positioned in a text without spaces, like in the example below:


   This person was baptised%(endnotes)s.

Translation into Backward English:

   Siht nosrep saw desitpab%(endnotes)s.

Translation context

In some cases, two different concepts can be expressed by the same word in English and yet require different translations. For example, the title of the book and the nobility title of the person are expressed by the same Title word. However, in other languages different words are needed to describe the book title and the person's title.

To mitigate such problems, a context can be added to the translation string. A context-enabled string has a vertical line separating the context from the string:


The correct translation should not include either the context or the separator. The context is to give the translator idea of what the string means. However, both the context and the separator must not be in the translated string, so in backward english the above is translated into


Plural forms

There was requests for plural forms support.

First, translators need to check if information is available on .po header. (See samples)

  1. msgid contains the singular string in english
  2. msgid_plural contains the plural string in english
  3. msgstr[0] contains the singular translated version (for 1 and sometimes 0, set on header)
  4. msgstr[1] contains the plural version (for 1 + 1 = 2 )
  5. msgstr[2] contains the plural form (for 2 + 1 = 3)
  • For language with one form (singular=plural, Plural-Forms: nplurals=1; plural=0), like Chinese, Hungarian or Turkish:
msgid "%d second"
msgstr_plural "%d seconds"
msgstr [0] "%d 秒"
  • For language with one plural form (Plural-Forms: nplurals=2; plural=n != 1;), like english:
msgid "%d hour"
msgstr_plural "%d hours"
msgstr [0] "%d hour"
msgstr [1] "%d hours"
  • For language with more plural forms (like Czech):
msgid "%d second"
msgstr_plural "%d seconds"
msgstr [0] "%d sekunda"
msgstr [1] "%d sekundy"
msgstr [2] "%d sekund"

As a final check, please do ensure that the following command does not throw any errors:

msgfmt -c filename.po

Translating mnemonics

Mnemonics are accelerator keys you find in labels, accessible by pressing the ALT key together with the mnemonic. You see then in the translated text with a low line, eg '_Help' is shown as 'Help' with a line under the H, and can be put to focus/selected by pressing ALT+h.

It is nice if mnemonics on a screen are unique, but it is not required. If you use twice the same mnemonic, the user must press repeatedly the accelerator to switch between the different entries. However, note the following rule: "If duplication of access keys in a window is unavoidable, you should still refrain from duplicating the access keys for any of these buttons that appear in the same window: OK, Cancel, Close, Apply or Help."

So you should check in your language what the mnemonic key is for those buttons, and avoid using the same in translated text

Warning: some fonts family will not properly display mnemonics on "g", "j", "p", "q" or "y" as these print the letter over the line under it making it very hard to distinguish the small line. Please avoid to use mnemonics key bindings on these letters. Also try to avoid i and l, as people have difficulty distinguishing between those.

Capital letters are no problem though, underlining eg G will work just fine as the letter does not write over the line.

Translating relationships

Translating relationships is not done within the .po files, except for occasional father and mother strings here and there in the interfaces and reports. Complete translation of all relationships for the language/culture is done inside a relationship calculator plugin.

In short, the need for a plugin comes from the impossibility to translate "first cousin twice removed" in languages such as, e.g., German or Russian. See the Relationship Calculator page for details on why and how to create such a plugin.

Translating dates

Handling date translation is not entirely done within the .po files. Complete handling of date translation for each language/culture is done inside a dedicated date handler module.

The need for a separate module comes from the requirements to handle culture-specific parsing and displaying of dates. For example, the month and day order is different between most European countries and the US. Also, each language has its own set of acceptable modifier and qualifiers for the date: things like "from X to Y" or "between X and Y" may have different word order. Same with "around", "calculated", "estimated". Add to this calendar names, and you have a compelling need for a dedicated module. See the Date Handler page for details on why and how to create such a module.

Translating man pages

You can also translated the man pages into your own language.

For the development (trunk) version you can find the required starting files under the directory (/trunk)/data/man. You will find the files


First off all you must make a directory for your language under data/man.

  cd data/man

and do

  mkdir xx

where xx is your languagecode (fr for French, sv for Swedish, etc.) You should use SVN. See the introduction to SVN. Then do

  svn add xx
  svn commit -m "xx dir for man pages" xx

This will add the xx dir under svn revision control and upload the new dir. Next step is to copy the and from data/man to your new directory. Translate all relevant strings in the data/man/xx/ file. Change the file data/man/xx/

  • add the line mandir = @mandir@/xx
  • change the line && CONFIG_FILES=data/man/xx/$@ $(SHELL)

Next step: change the file data/man/Makefile:

  • add xx to the line SUBDIRS = fr nl sv

The final step is to alter the file :

  • add data/man/xx/Makefile to the line AC_CONFIG_FILES([

Because you added new files, SVN requires that you set the correct propset for those files. Two things are to be done.

  svn propset svn:mime-type text/plain xx/ xx/
  svn propset svn:eol-type native xx/ xx/

You could also in the config file of subversion ( HOMEDIR/.subversion/config) enable the auto-prop feature (enable-auto-props = yes) and uncomment the relevant lines in the [auto-props] section. All changes must be committed and do not forget to change the ChangeLog file.

You should see no errors when you run the




This last step must be done only in the data/man/xx directory. If not, your normal gramps installation will be overwritten. And this step must be done as superuser(su)

 sudo make install

This will put the gramps.1.gz file into /usr/local/share/man/xx/man1 directory. You could also use a prefix. Then you do:

 sudo make --prefix=/usr/share install

To see the result of your work, do:

  man -L xx gramps

Translating wiki manual

To have the link working in GRAMPS, you need to have or edit the file to contain your language. On line 30 of that file, you see:

   'nl' : '/nl',

This maps a language code to the extension used on the wiki, so to add french, change this too:

   'nl' : '/nl',
   'fr':  '/fr',
  • Every 'manual|...' entry in the gramp.pot file refers to a section in the manual, so make sure to use good section headings so this does not change too much over time.

Note that reports/tools link to a section in the page with the same name as the report name in GRAMPS.

  • You should be able to edit directly on wiki or using tools like txt2po. Also previous gettext file for the manual and Translation Memory may help you to upgrade deprecated/old gettext files.

Translating third-party plugins

As Third-party Plugins are not officially part of GRAMPS and are not supported by the GRAMPS Developers but give users more tools to work with your genealogy data in GRAMPS, we can translate them !

Trying to avoid duplicate strings which could generate conflicts, here an additional template. We should be able to copy/paste references at the end of main translation file for supporting translation on third-party plugins. 粗体文字