Skip to content

Commit

Permalink
Clarify translation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
khalim19 committed Dec 30, 2019
1 parent d031422 commit 4f9e52e
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions TRANSLATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,47 @@ If you want to provide translations for Export Layers, it is recommended to use
How do I translate the plug-in?
-------------------------------

First, make sure you use the `gimp-plugin-export-layers.pot` file for the latest plug-in version.
Either use the .pot file in the `export_layers/locale` folder (inside the folder with the installed plug-in), or, if in doubt, [download the latest version](https://github.com/khalim19/gimp-plugin-export-layers/blob/master/export_layers/locale/gimp-plugin-export-layers.pot).


### Poedit

The following steps apply if you want to use Poedit.


#### Creating a New Translation

To create a new translation for your language:

1. Open Poedit, select `File → New from POT/PO file...` and select the .pot file in the `export_layers/locale` folder.
1. Open Poedit, select `File → New from POT/PO file...` and select the `gimp-plugin-export-layers.pot` file in the `export_layers/locale` folder.
2. Set the language of the translation.
3. Translate the strings (by filling in the `Translation` text field for each string).
4. If desired, go to `Catalog → Properties...` and edit the translation file properties.
If you don't do this, warning messages may pop up when saving, but they should be harmless.
5. When done, save the .po file.
5. When done, save your .po file.

If you spotted some translation errors in the .po file or the plug-in is updated since the last translation was made, you may need to update the translation:

1. Open the .po file, select `Catalog → Update from POT file...` and find the .pot file.
#### Updating an Existing Translation

If you spotted some translation errors in your .po file or the plug-in was updated since the last translation was made, you may need to update the translation:

1. Open your .po file, select `Catalog → Update from POT file...` and select the `gimp-plugin-export-layers.pot` file for the latest plug-in version.
2. Update the translated strings.
In case the plug-in was updated, update is necessary if:
* new strings were defined in the .pot file,
* existing strings in the .pot file were modified and thus the translated strings may no longer be up-to-date.
These strings have a so-called "fuzzy" translation and have a different color than other strings.
If you don't correct the fuzzy strings, they will show up untranslated in the plug-in.
Make sure to check for:
* new strings,
* existing strings that were updated in the plug-in.
Such strings may no longer be up-to-date and have a so-called "fuzzy" translation (and have a different color than other strings).
Fuzzy strings that are not corrected will show up in the plug-in untranslated.


### Terminal

If you don't want to use Poedit, you may use the terminal on Linux (or a Unix-like environment for Windows, such as Cygwin).


#### Creating a New Translation

To create a new translation for your language:

1. Make sure that the `gettext` package is installed in your system.
Expand All @@ -61,6 +74,9 @@ To create a new translation for your language:

4. Open the .po file in a text editor and translate each string in the `msgid` field to a string in the corresponding `msgstr` field.


#### Updating an Existing Translation

If you spotted some translation errors in the .po file or the plug-in is updated since the last translation was made, you may need to update the translation:

1. Run the following commands:
Expand All @@ -71,12 +87,12 @@ If you spotted some translation errors in the .po file or the plug-in is updated
The old .po file is preserved and has the `.po.old` file extension.

2. Open the .po file in a text editor and update the translated strings.
In case the plug-in was updated, translation update is necessary if:
* new strings were defined in the .pot file,
* existing strings in the .pot file were modified and thus the translated strings may no longer be up-to-date.
These strings have a so-called "fuzzy" translation.
Above each of these strings is a `, fuzzy` comment.
Once you updated the translated string, make sure to remove the `, fuzzy` comment, otherwise the string will show up untranslated in the plug-in.
Make sure to check for:
* new strings,
* existing strings that were updated in the plug-in.
Such strings may no longer be up-to-date and have a so-called "fuzzy" translation.
Fuzzy strings are marked with a `, fuzzy` comment above them.
Once you update the translated string, make sure to remove the `, fuzzy` comment, otherwise the string will show up untranslated in the plug-in.


OK, I have finished the translation. What next?
Expand Down

0 comments on commit 4f9e52e

Please sign in to comment.