New upstream snapshot.
Debian Janitor
2 years ago
7 | 7 | Maintainer: Tobias Mueller |
8 | 8 | Maintainer-email: tobiasmue@gnome.org |
9 | 9 | License: BSD |
10 | Description: # BabelGladeExtractor | |
11 | ||
12 | This package contains message catalog extractors for the following | |
13 | formats, extending [Babel][babel] so it can handle them. | |
14 | ||
15 | * The new XML format used by [Glade][glade] 3.8 and above, properly | |
16 | known as the [GtkBuilder UI Definitions][uixml] format; | |
17 | ||
18 | * The older "GladeXML" format used by libglade and older versions of | |
19 | Glade; | |
20 | ||
21 | * The GNOME [AppData XML][appdataxml] dialect, because it's similar; | |
22 | ||
23 | * FreeDesktop.org [Desktop Entry][desktopfile] files. | |
24 | ||
25 | ## Getting started | |
26 | ||
27 | To make these formats translatable, install this package using pip: | |
28 | ||
29 | ```shell | |
30 | pip3 install BabelGladeExtractor | |
31 | ``` | |
32 | ||
33 | Then in your own projects, map some source and data files to the simple | |
34 | extractor names "glade" and "desktop" that are provided by this package. | |
35 | In your `setup.py`, add a section like | |
36 | ||
37 | ```ini | |
38 | [extract_messages] | |
39 | mapping_file = babel.cfg | |
40 | output_file = subdir/myproject.pot | |
41 | input_dirs = . | |
42 | ``` | |
43 | ||
44 | Next, create a separate `babel.cfg` file, and add sections to it for | |
45 | each format you want to translate. | |
46 | ||
47 | ```ini | |
48 | [glade: **.ui] | |
49 | ||
50 | [desktop: **.desktop] | |
51 | ||
52 | ``` | |
53 | ||
54 | You can then use Babel's [setuptools integration][babelsetuptools] or | |
55 | its [command line interface][babelcli] for your routine i18n lifecycle | |
56 | tasks. | |
57 | ||
58 | ```shell | |
59 | python3 setup.py extract_messages | |
60 | ``` | |
61 | ||
62 | There's a lot more to it than this, naturally. See Babel's extensive | |
63 | [Working with Message Catalogs][babelpo] documentation for a detailed | |
64 | explanation of how to get translatable strings into your Python code. | |
65 | ||
66 | In Glade 3.22, when you are editing a string property in a sidebar, | |
67 | click the edit icon on the right hand side of the text entry. In the | |
68 | dialog that pops up, enter the text in the main text box, and make sure | |
69 | that the Translatable checkbox is ticked. You can also add some helpful | |
70 | [context][pocontext] or comments for your translators if you need to | |
71 | give them a hint. BabelGladeExtractor will handle the corresponding XML | |
72 | attributes appropriately when it extracts strings for translation. | |
73 | ||
74 | [babel]: http://babel.pocoo.org/ | |
75 | [glade]: https://glade.gnome.org/ | |
76 | [uixml]: https://developer.gnome.org/gtk3/stable/GtkBuilder.html#BUILDER-UI | |
77 | [appdataxml]: https://wiki.gnome.org/Initiatives/GnomeGoals/AppDataGnomeSoftware | |
78 | [desktopfile]: https://specifications.freedesktop.org/desktop-entry-spec/ | |
79 | [babelsetuptools]: http://babel.pocoo.org/en/latest/setup.html | |
80 | [babelcli]: http://babel.pocoo.org/en/latest/cmdline.html | |
81 | [babelpo]: http://babel.pocoo.org/en/latest/messages.html | |
82 | [pocontext]: https://www.gnu.org/software/gettext/manual/html_node/Contexts.html#Contexts | |
83 | ||
84 | 10 | Keywords: PyGTK,PyGObject,Glade,GtkBuilder,gettext,Babel,I18n,L10n |
85 | 11 | Platform: UNKNOWN |
86 | 12 | Description-Content-Type: text/markdown |
13 | License-File: LICENSE | |
14 | ||
15 | # BabelGladeExtractor | |
16 | ||
17 | This package contains message catalog extractors for the following | |
18 | formats, extending [Babel][babel] so it can handle them. | |
19 | ||
20 | * The new XML format used by [Glade][glade] 3.8 and above, properly | |
21 | known as the [GtkBuilder UI Definitions][uixml] format; | |
22 | ||
23 | * The older "GladeXML" format used by libglade and older versions of | |
24 | Glade; | |
25 | ||
26 | * The GNOME [AppData XML][appdataxml] dialect, because it's similar; | |
27 | ||
28 | * FreeDesktop.org [Desktop Entry][desktopfile] files. | |
29 | ||
30 | ## Getting started | |
31 | ||
32 | To make these formats translatable, install this package using pip: | |
33 | ||
34 | ```shell | |
35 | pip3 install BabelGladeExtractor | |
36 | ``` | |
37 | ||
38 | Then in your own projects, map some source and data files to the simple | |
39 | extractor names "glade" and "desktop" that are provided by this package. | |
40 | In your `setup.py`, add a section like | |
41 | ||
42 | ```ini | |
43 | [extract_messages] | |
44 | mapping_file = babel.cfg | |
45 | output_file = subdir/myproject.pot | |
46 | input_dirs = . | |
47 | ``` | |
48 | ||
49 | Next, create a separate `babel.cfg` file, and add sections to it for | |
50 | each format you want to translate. | |
51 | ||
52 | ```ini | |
53 | [glade: **.ui] | |
54 | ||
55 | [desktop: **.desktop] | |
56 | ||
57 | ``` | |
58 | ||
59 | You can then use Babel's [setuptools integration][babelsetuptools] or | |
60 | its [command line interface][babelcli] for your routine i18n lifecycle | |
61 | tasks. | |
62 | ||
63 | ```shell | |
64 | python3 setup.py extract_messages | |
65 | ``` | |
66 | ||
67 | There's a lot more to it than this, naturally. See Babel's extensive | |
68 | [Working with Message Catalogs][babelpo] documentation for a detailed | |
69 | explanation of how to get translatable strings into your Python code. | |
70 | ||
71 | In Glade 3.22, when you are editing a string property in a sidebar, | |
72 | click the edit icon on the right hand side of the text entry. In the | |
73 | dialog that pops up, enter the text in the main text box, and make sure | |
74 | that the Translatable checkbox is ticked. You can also add some helpful | |
75 | [context][pocontext] or comments for your translators if you need to | |
76 | give them a hint. BabelGladeExtractor will handle the corresponding XML | |
77 | attributes appropriately when it extracts strings for translation. | |
78 | ||
79 | [babel]: http://babel.pocoo.org/ | |
80 | [glade]: https://glade.gnome.org/ | |
81 | [uixml]: https://developer.gnome.org/gtk3/stable/GtkBuilder.html#BUILDER-UI | |
82 | [appdataxml]: https://wiki.gnome.org/Initiatives/GnomeGoals/AppDataGnomeSoftware | |
83 | [desktopfile]: https://specifications.freedesktop.org/desktop-entry-spec/ | |
84 | [babelsetuptools]: http://babel.pocoo.org/en/latest/setup.html | |
85 | [babelcli]: http://babel.pocoo.org/en/latest/cmdline.html | |
86 | [babelpo]: http://babel.pocoo.org/en/latest/messages.html | |
87 | [pocontext]: https://www.gnu.org/software/gettext/manual/html_node/Contexts.html#Contexts | |
88 | ||
89 |
0 | Copyright (C) 2007 Unfinished Software, UfSoft.org | |
1 | All rights reserved. | |
2 | ||
3 | Redistribution and use in source and binary forms, with or without | |
4 | modification, are permitted provided that the following conditions | |
5 | are met: | |
6 | ||
7 | 1. Redistributions of source code must retain the above copyright | |
8 | notice, this list of conditions and the following disclaimer. | |
9 | 2. Redistributions in binary form must reproduce the above copyright | |
10 | notice, this list of conditions and the following disclaimer in | |
11 | the documentation and/or other materials provided with the | |
12 | distribution. | |
13 | 3. The name of the author may not be used to endorse or promote | |
14 | products derived from this software without specific prior | |
15 | written permission. | |
16 | ||
17 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS | |
18 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
20 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | |
21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | |
23 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | |
25 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
26 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN | |
27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.⏎ |
7 | 7 | Maintainer: Tobias Mueller |
8 | 8 | Maintainer-email: tobiasmue@gnome.org |
9 | 9 | License: BSD |
10 | Description: # BabelGladeExtractor | |
11 | ||
12 | This package contains message catalog extractors for the following | |
13 | formats, extending [Babel][babel] so it can handle them. | |
14 | ||
15 | * The new XML format used by [Glade][glade] 3.8 and above, properly | |
16 | known as the [GtkBuilder UI Definitions][uixml] format; | |
17 | ||
18 | * The older "GladeXML" format used by libglade and older versions of | |
19 | Glade; | |
20 | ||
21 | * The GNOME [AppData XML][appdataxml] dialect, because it's similar; | |
22 | ||
23 | * FreeDesktop.org [Desktop Entry][desktopfile] files. | |
24 | ||
25 | ## Getting started | |
26 | ||
27 | To make these formats translatable, install this package using pip: | |
28 | ||
29 | ```shell | |
30 | pip3 install BabelGladeExtractor | |
31 | ``` | |
32 | ||
33 | Then in your own projects, map some source and data files to the simple | |
34 | extractor names "glade" and "desktop" that are provided by this package. | |
35 | In your `setup.py`, add a section like | |
36 | ||
37 | ```ini | |
38 | [extract_messages] | |
39 | mapping_file = babel.cfg | |
40 | output_file = subdir/myproject.pot | |
41 | input_dirs = . | |
42 | ``` | |
43 | ||
44 | Next, create a separate `babel.cfg` file, and add sections to it for | |
45 | each format you want to translate. | |
46 | ||
47 | ```ini | |
48 | [glade: **.ui] | |
49 | ||
50 | [desktop: **.desktop] | |
51 | ||
52 | ``` | |
53 | ||
54 | You can then use Babel's [setuptools integration][babelsetuptools] or | |
55 | its [command line interface][babelcli] for your routine i18n lifecycle | |
56 | tasks. | |
57 | ||
58 | ```shell | |
59 | python3 setup.py extract_messages | |
60 | ``` | |
61 | ||
62 | There's a lot more to it than this, naturally. See Babel's extensive | |
63 | [Working with Message Catalogs][babelpo] documentation for a detailed | |
64 | explanation of how to get translatable strings into your Python code. | |
65 | ||
66 | In Glade 3.22, when you are editing a string property in a sidebar, | |
67 | click the edit icon on the right hand side of the text entry. In the | |
68 | dialog that pops up, enter the text in the main text box, and make sure | |
69 | that the Translatable checkbox is ticked. You can also add some helpful | |
70 | [context][pocontext] or comments for your translators if you need to | |
71 | give them a hint. BabelGladeExtractor will handle the corresponding XML | |
72 | attributes appropriately when it extracts strings for translation. | |
73 | ||
74 | [babel]: http://babel.pocoo.org/ | |
75 | [glade]: https://glade.gnome.org/ | |
76 | [uixml]: https://developer.gnome.org/gtk3/stable/GtkBuilder.html#BUILDER-UI | |
77 | [appdataxml]: https://wiki.gnome.org/Initiatives/GnomeGoals/AppDataGnomeSoftware | |
78 | [desktopfile]: https://specifications.freedesktop.org/desktop-entry-spec/ | |
79 | [babelsetuptools]: http://babel.pocoo.org/en/latest/setup.html | |
80 | [babelcli]: http://babel.pocoo.org/en/latest/cmdline.html | |
81 | [babelpo]: http://babel.pocoo.org/en/latest/messages.html | |
82 | [pocontext]: https://www.gnu.org/software/gettext/manual/html_node/Contexts.html#Contexts | |
83 | ||
84 | 10 | Keywords: PyGTK,PyGObject,Glade,GtkBuilder,gettext,Babel,I18n,L10n |
85 | 11 | Platform: UNKNOWN |
86 | 12 | Description-Content-Type: text/markdown |
13 | License-File: LICENSE | |
14 | ||
15 | # BabelGladeExtractor | |
16 | ||
17 | This package contains message catalog extractors for the following | |
18 | formats, extending [Babel][babel] so it can handle them. | |
19 | ||
20 | * The new XML format used by [Glade][glade] 3.8 and above, properly | |
21 | known as the [GtkBuilder UI Definitions][uixml] format; | |
22 | ||
23 | * The older "GladeXML" format used by libglade and older versions of | |
24 | Glade; | |
25 | ||
26 | * The GNOME [AppData XML][appdataxml] dialect, because it's similar; | |
27 | ||
28 | * FreeDesktop.org [Desktop Entry][desktopfile] files. | |
29 | ||
30 | ## Getting started | |
31 | ||
32 | To make these formats translatable, install this package using pip: | |
33 | ||
34 | ```shell | |
35 | pip3 install BabelGladeExtractor | |
36 | ``` | |
37 | ||
38 | Then in your own projects, map some source and data files to the simple | |
39 | extractor names "glade" and "desktop" that are provided by this package. | |
40 | In your `setup.py`, add a section like | |
41 | ||
42 | ```ini | |
43 | [extract_messages] | |
44 | mapping_file = babel.cfg | |
45 | output_file = subdir/myproject.pot | |
46 | input_dirs = . | |
47 | ``` | |
48 | ||
49 | Next, create a separate `babel.cfg` file, and add sections to it for | |
50 | each format you want to translate. | |
51 | ||
52 | ```ini | |
53 | [glade: **.ui] | |
54 | ||
55 | [desktop: **.desktop] | |
56 | ||
57 | ``` | |
58 | ||
59 | You can then use Babel's [setuptools integration][babelsetuptools] or | |
60 | its [command line interface][babelcli] for your routine i18n lifecycle | |
61 | tasks. | |
62 | ||
63 | ```shell | |
64 | python3 setup.py extract_messages | |
65 | ``` | |
66 | ||
67 | There's a lot more to it than this, naturally. See Babel's extensive | |
68 | [Working with Message Catalogs][babelpo] documentation for a detailed | |
69 | explanation of how to get translatable strings into your Python code. | |
70 | ||
71 | In Glade 3.22, when you are editing a string property in a sidebar, | |
72 | click the edit icon on the right hand side of the text entry. In the | |
73 | dialog that pops up, enter the text in the main text box, and make sure | |
74 | that the Translatable checkbox is ticked. You can also add some helpful | |
75 | [context][pocontext] or comments for your translators if you need to | |
76 | give them a hint. BabelGladeExtractor will handle the corresponding XML | |
77 | attributes appropriately when it extracts strings for translation. | |
78 | ||
79 | [babel]: http://babel.pocoo.org/ | |
80 | [glade]: https://glade.gnome.org/ | |
81 | [uixml]: https://developer.gnome.org/gtk3/stable/GtkBuilder.html#BUILDER-UI | |
82 | [appdataxml]: https://wiki.gnome.org/Initiatives/GnomeGoals/AppDataGnomeSoftware | |
83 | [desktopfile]: https://specifications.freedesktop.org/desktop-entry-spec/ | |
84 | [babelsetuptools]: http://babel.pocoo.org/en/latest/setup.html | |
85 | [babelcli]: http://babel.pocoo.org/en/latest/cmdline.html | |
86 | [babelpo]: http://babel.pocoo.org/en/latest/messages.html | |
87 | [pocontext]: https://www.gnu.org/software/gettext/manual/html_node/Contexts.html#Contexts | |
88 | ||
89 |