doc/reference/libpurple/plugin_i18n.md

Thu, 21 Jul 2022 01:10:22 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 21 Jul 2022 01:10:22 -0500
changeset 41454
7cc69bde919d
parent 41165
24e2c88a7fc2
permissions
-rw-r--r--

Update pidgin for the purple_account_manager_get_(in)active deprecations

Testing Done:
Compiled and made sure the menus still functioned as expected.

Reviewed at https://reviews.imfreedom.org/r/1536/

41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
1 Title: Third Party Plugin Translation
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
2 Slug: 3rd-party-plugin-i18n
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
4 ## Third Party Plugin Translation
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
5
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
6 ### Introduction
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
7
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
8 For the purpose of this document we're going to assume that your plugin:
21828
1a1c2e5acb3f Some tweaks to grim's plugin translation documentation.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16257
diff changeset
9
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
10 * Is set up to use autotools. It may be possible to add translation support
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
11 without autotools, but we have no idea how. We may not want to know, either ;)
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
12 * Has an autogen.sh. You may have also called this bootstrap.sh or similar.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
13 * Resides in a source tree that has `configure.ac` and `Makefile.am` in the
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
14 top-level directory as well as a `src` directory in which the plugin's source
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
15 is located. A `Makefile.am` should also exist in the `src` directory.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
16
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
17 ### Steps To Follow
21828
1a1c2e5acb3f Some tweaks to grim's plugin translation documentation.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16257
diff changeset
18
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
19 For a plugin to have translation support there are a few steps that need to
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
20 followed:
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
21
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
22 * In your `autogen.sh`, add the following after your other utility checks:
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
24 ```sh
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
25 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 echo;
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
27 echo "You must have intltool installed to compile <YOUR PLUGIN NAME>";
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 echo;
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 exit;
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 }
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
31 ```
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
32
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
33 * Then before your call to aclocal add:
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
34
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
35 ```sh
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 intltoolize --force --copy
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
37 ```
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
38
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
39 * Now edit `configure.ac` and add the following:
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
40
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
41 ```m4
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 AC_PROG_INTLTOOL
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
44 GETTEXT_PACKAGE=<YOUR PLUGIN NAME>
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 AC_SUBST(GETTEXT_PACKAGE)
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 ALL_LINGUAS=""
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 AM_GLIB_GNU_GETTEXT
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
50 ```
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
51
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
52 The position of these macros in the file don't really matter, but if you
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
53 have issues either play around with it or feel free to ask one of the Pidgin
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
54 developers. Finally add `po/Makefile.in` to you `AC_OUTPUT` command.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
55
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
56 * Now create a directory named 'po'.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
57
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
58 * `cd` into the `po` directory.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
59
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
60 * Create/edit the file `POTFILES.in` in your favorite editor. Each line
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
61 should be the name of a file that could or does have strings marked for
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
62 translating (we're getting to that step). These file names should be
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
63 relative to the top directory of your plugin's source tree.
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
64
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
65 * `cd` back to the top directory of your plugin's source tree.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
66
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
67 * Open `Makefile.am` and add `po` to your `SUBDIRS` variable.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
68
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
69 * While still in the top directory of your plugin's source tree, execute
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
70 `intltool-prepare`. This will setup anything extra that intltool needs.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
71
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
72 * Fire off `autogen.sh` and when it's completed, verify that you have a
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
73 `po/POTFILES` (notice the lack of a .in). If you do, everything should be
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
74 set on the autotools side.
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
75
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
76 * Take a break, stretch your legs, smoke a cigarette, whatever, because
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
77 we're done with the autotools part.
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
78
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
79 * When you're ready, `cd` into the directory with the source files for your
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
80 plugin.
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
81
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
82 * Open the file containing the `plugin_query` function.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
83
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
84 * If you're not already, please make sure that you are including the
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
85 `config.h` file for you plugin. Note that `config.h` could be whatever
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
86 you told autohead to use with AM_CONFIG_HEADER. Also add the following:
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
87
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
88 ```c
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
89 #include <glib/gi18n-lib.h>
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
90 ```
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
91
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
92 Make sure that this include is after you include of your `config.h`,
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
93 otherwise you will break your build. Also note that if you wish to
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
94 maintain compatibility with older versions of GLib, you will need to
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
95 include additional preprocessor directives, which we won't cover here.
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
96
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
97 * This is where things get a bit goofy. libpurple is going to try to
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
98 translate our strings using the libpurple gettext package. So we have to
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
99 convert them before libpurple attempts to.
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
100
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
101 * To do this, we're going to change the entries for `name`, `summary`, and
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
102 `description` to `NULL`.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
103
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
104 * Next, locate your `plugin_load` function. Your name for this function will be
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
105 the first parameter to `GPLUGIN_NATIVE_PLUGIN_DECLARE()` plus `_load`.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
106
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
107 * Now add the following within your 'plugin_load' function:
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
108
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
109 ```c
35850
1abeda205d6c cross-win32: make dirs more flexible, add them to the config.h
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35490
diff changeset
110 bindtextdomain(GETTEXT_PACKAGE, PURPLE_LOCALEDIR);
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
113 info.name = _("<YOUR PLUGIN NAME>");
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
114 info.summary = _("<YOUR PLUGIN SUMMARY>");
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
115 info.description = _("<YOUR PLUGIN DESCRIPTION>");
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
116 ```
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
117
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
118 > Note that the `_()` is intentional, and that it is telling intltool that
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
119 > this string should be translated. There is also `N_()` which says that a
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
120 > string should only be marked for translation but should not be translated
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
121 > yet.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
122
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
123 * Go through the rest of your code and mark all the other strings for
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
124 translation with `_()`.
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
125
41165
24e2c88a7fc2 Ran codespell on the libpurple docs that were converted to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 41164
diff changeset
126 * When that's done, feel free to commit your work, create your po template
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
127 (pot file) or whatever.
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
128
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
129 * To create you po template, `cd` to `po` and execute:
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
130
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
131 ```sh
13401
fc6b025671a8 [gaim-migrate @ 15775]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 intltool-update --pot
41164
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
133 ```
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
134
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
135 * To add new translations to your plugin, all you have to do is add the
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
136 language code to the `ALL_LINGUAS` variable in your `configure.ac`. Take
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
137 note that this list of languages should be separated by a space. After
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
138 you have added the language code to `ALL_LINGUAS`, drop the `xx.po` file
d861b10105fb Convert the libpurple docs to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents: 40962
diff changeset
139 into `po`, and re-`autogen.sh`. After a full build you should now be
35490
1c4efce838f6 gtk-doc-ify C-HOWTO, plugin-i18n, plugin-ids, plugin-signals
Ankit Vani <a@nevitus.org>
parents: 21828
diff changeset
140 able to use the translation.

mercurial