Difference between revisions of "Translating Gramps using Weblate"

From Gramps
Jump to: navigation, search
Line 5: Line 5:
 
Translators are advised to read the [https://docs.weblate.org/en/latest Weblate documentation].
 
Translators are advised to read the [https://docs.weblate.org/en/latest Weblate documentation].
  
== Creating an account ==
+
= Creating an account =
  
 
Registration is easy - just click on [https://hosted.weblate.org/accounts/register/ Register].
 
Registration is easy - just click on [https://hosted.weblate.org/accounts/register/ Register].
Line 13: Line 13:
 
You need to be signed in to translate, otherwise you can only make suggestions.
 
You need to be signed in to translate, otherwise you can only make suggestions.
  
== Starting a new translation ==
+
= Starting a new translation =
  
 
If your language is not currently translated, you can request that it be added.  Navigate to the "gramps" component and select the "Tools -> Start new translation" menu option.
 
If your language is not currently translated, you can request that it be added.  Navigate to the "gramps" component and select the "Tools -> Start new translation" menu option.
Line 21: Line 21:
 
A request will be sent to the administrator.
 
A request will be sent to the administrator.
  
== Workflow ==
+
= Workflow =
  
 
Any authenticated user can edit translations.  Changes are automatically submitted as a pull request to the Gramps GitHub repository.  This can take 24 hours since Weblate attempts to group changes from the same author in a process called [https://docs.weblate.org/en/latest/admin/continuous.html#lazy-commits "lazy commits"].
 
Any authenticated user can edit translations.  Changes are automatically submitted as a pull request to the Gramps GitHub repository.  This can take 24 hours since Weblate attempts to group changes from the same author in a process called [https://docs.weblate.org/en/latest/admin/continuous.html#lazy-commits "lazy commits"].
Line 28: Line 28:
  
 
A reviewer an approve translations. After a translation has been approved, it can only be changed by a reviewer or administrator, although any user can still make suggestions.
 
A reviewer an approve translations. After a translation has been approved, it can only be changed by a reviewer or administrator, although any user can still make suggestions.
 +
 +
== Bulk edit ==
 +
 +
It is possible to [https://docs.weblate.org/en/latest/user/translating.html#bulk-edit bulk edit] translations.  This can be useful if a reviewer wants to approve all translations that they have previously translated and are happy with.
 +
 +
The bulk edit toll can be found under the "Tools -> Bulk edit" menu option.  This may not be available to all users.
 +
 +
== Offline translation ==
 +
 +
Some translators prefer to work offline.  In this case, [https://docs.weblate.org/en/latest/user/files.html#downloading-and-uploading-translations downloading and uploading translations] provides an option for a translator to use their favourite translation software.
 +
 +
* Download the <code>.po</code> file using the "Files -> Download translation" menu option.
 +
 +
* Use [http://gtranslator.sourceforge.net GTtranslator] (GNOME, windows), [http://i18n.kde.org/tools/ KBabel] (KDE), [http://userbase.kde.org/Lokalize Lokalize] (KDE, windows), Emacs po-mode, [http://virtaal.translatehouse.org Virtaal] (GNU/Linux, Mac, windows), [http://www.poedit.net/ poedit] (GNU/Linux, OSX, windows), or any similar tool designed for translating <code>.po</code> files. If you do not like any of these tools, you can use any text editor to translate messages. If using vim, properly setting the "langmap" option will significantly speed up your work.
 +
 +
* Upload the <code>.po</code> file using the "Files -> Upload translation" menu option.
 +
 +
= Testing =
 +
 +
* Download the <code>.mo</code> file using the "Files -> Customize download" menu option.  Select a "gettext MO" quick download containing all strings.
 +
* Rename the download to <code>gramps.mo</code>
 +
* Locate the translations directory.  It will be something like ''/usr/share/locale/{lang}/LC_MESSAGES'', with {lang} being your language.
 +
* Copy the <code>gramps.mo</code> file into the translations sirectory after making a backup of the original.
  
 
[[Category:Translators/Categories]]
 
[[Category:Translators/Categories]]
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]

Revision as of 18:37, 28 June 2021

As of Gramps 5.2.x, Hosted Weblate for translations.

Translators are advised to read the Weblate documentation.

Creating an account

Registration is easy - just click on Register.

The E-mail and Full name fields are used to credit your contributions.

You need to be signed in to translate, otherwise you can only make suggestions.

Starting a new translation

If your language is not currently translated, you can request that it be added. Navigate to the "gramps" component and select the "Tools -> Start new translation" menu option.

Select your language, and then click the "Request new translation" button. Further details can be found in the documentation.

A request will be sent to the administrator.

Workflow

Any authenticated user can edit translations. Changes are automatically submitted as a pull request to the Gramps GitHub repository. This can take 24 hours since Weblate attempts to group changes from the same author in a process called "lazy commits".

Some translators have been designated as reviewers. A list of reviewers can be found on the Translators Portal page.

A reviewer an approve translations. After a translation has been approved, it can only be changed by a reviewer or administrator, although any user can still make suggestions.

Bulk edit

It is possible to bulk edit translations. This can be useful if a reviewer wants to approve all translations that they have previously translated and are happy with.

The bulk edit toll can be found under the "Tools -> Bulk edit" menu option. This may not be available to all users.

Offline translation

Some translators prefer to work offline. In this case, downloading and uploading translations provides an option for a translator to use their favourite translation software.

  • Download the .po file using the "Files -> Download translation" menu option.
  • Use GTtranslator (GNOME, windows), KBabel (KDE), Lokalize (KDE, windows), Emacs po-mode, Virtaal (GNU/Linux, Mac, 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. If using vim, properly setting the "langmap" option will significantly speed up your work.
  • Upload the .po file using the "Files -> Upload translation" menu option.

Testing

  • Download the .mo file using the "Files -> Customize download" menu option. Select a "gettext MO" quick download containing all strings.
  • Rename the download to gramps.mo
  • Locate the translations directory. It will be something like /usr/share/locale/{lang}/LC_MESSAGES, with {lang} being your language.
  • Copy the gramps.mo file into the translations sirectory after making a backup of the original.