1 | INITIAL ANNOUNCEMENT |
---|
2 | ____________________ |
---|
3 | |
---|
4 | Hi, |
---|
5 | |
---|
6 | I created the xml-i18n-tools module on CVS based on code by me, Darin |
---|
7 | and Kenneth Christiansen. This module contains some utility scripts |
---|
8 | and assorted auto* magic for internationalizing various kinds of XML |
---|
9 | files. This supersedes the earlier scripts that Kenny distributed to |
---|
10 | be checked into each module. In addition, it has an additional merging |
---|
11 | feature, currently only for oaf files. |
---|
12 | |
---|
13 | * Here's what this package does: |
---|
14 | |
---|
15 | ** Automatically extracts translatable strings from oaf, glade, bonobo |
---|
16 | ui, nautilus theme and other XML files into the po files. |
---|
17 | |
---|
18 | ** Automatically merges translations from po files back into .oaf files |
---|
19 | (encoding to be 7-bit clean). I can also extend this merging |
---|
20 | mechanism to support other types of XML files. |
---|
21 | |
---|
22 | Having the translations directly in the XML file is critical for some |
---|
23 | file formats, and very helpful for others. When one package installs a |
---|
24 | file and a program from another package might at some time read it, |
---|
25 | you need to have the translations directly in the file, since the app |
---|
26 | reading the data file will not know which message catalog to use. |
---|
27 | |
---|
28 | The beauty of this extract and merge system is that it works through |
---|
29 | the existing po mechanism, so translators will be able to work in |
---|
30 | their normal way, and be notified of strings that change, or new |
---|
31 | strings that are added, with existing tools. |
---|
32 | |
---|
33 | I plan to enhance the system to support .desktop files, mime database |
---|
34 | files, and other files that normally embed translations. I would also |
---|
35 | be glad to add translation merging support for more XML file types if |
---|
36 | |
---|
37 | xml-i18n-tools has a script xml-i18n-toolize which copies the various |
---|
38 | scripts and does the other magic to your module, so users building |
---|
39 | from tarballs don't need xml-i18n-tools, only folks building from cvs. |
---|
40 | |
---|
41 | |
---|
42 | * xml-i18n-tools simple to use. To use it for your module you just do |
---|
43 | the following: |
---|
44 | |
---|
45 | ** Add these lines to autogen.sh, after the call to gettextize: |
---|
46 | |
---|
47 | echo "Running xml-i18n-toolize... Ignore non-fatal messages." |
---|
48 | xml-i18n-toolize --copy --force --automake |
---|
49 | |
---|
50 | ** Add this line to configure.in near the top |
---|
51 | |
---|
52 | AM_PROG_XML_I18N_TOOLS |
---|
53 | |
---|
54 | ** Add the .xml and .glade files you want translated to POTFILES.in |
---|
55 | |
---|
56 | At this point, strings marked translatable will be automatically |
---|
57 | extracted to the .po files. |
---|
58 | |
---|
59 | * To get oaf translation extraction and merging requires a few more |
---|
60 | steps: |
---|
61 | |
---|
62 | ** Rename your .oafinfo file to .oaf.in and put an underscore before |
---|
63 | every value property for string attributes |
---|
64 | |
---|
65 | ** Add the .oaf.in files to POTFILES.in |
---|
66 | |
---|
67 | ** Put lines like these in every Makefile.am that installs oafinfo |
---|
68 | files: |
---|
69 | |
---|
70 | --- start ---- |
---|
71 | |
---|
72 | oafdir = $(datadir)/oaf |
---|
73 | |
---|
74 | oaf_in_files = My_OAF_info_file.oaf.in |
---|
75 | oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) |
---|
76 | |
---|
77 | @XML_I18N_MERGE_OAF_RULE@ |
---|
78 | |
---|
79 | EXTRA_DIST=$(oaf_in_files) $(oafinfo_DATA) |
---|
80 | |
---|
81 | --- end ---- |
---|
82 | |
---|
83 | At this point, your oaf translations will be extracted and |
---|
84 | merged. Also, so long as you are renaming the .oafinfo files to |
---|
85 | .oaf.in, you should take the opportunity to rename them to the new base |
---|
86 | naming convention, with namespacing, for example: |
---|
87 | |
---|
88 | nautilus.oafinfo --> Nautilus_shell.oaf.in |
---|
89 | |
---|
90 | nautilus-rpm-view.oafinfo --> Nautilus_View_rpm.oaf.in |
---|
91 | |
---|
92 | |
---|
93 | I'm going to do all these steps for OAF, Ammonite and Nautilus |
---|
94 | shortly. I'd also plan to submit patches to do it for bonobo, |
---|
95 | gnumeric, evolution, at least, and I can help out with any other |
---|
96 | modules people want help with. |
---|
97 | |
---|
98 | Also, if the Glade, Bonobo, etc maintainers are interested in doing |
---|
99 | translation merging like OAF, I'd love to discuss a design for it. |
---|
100 | |
---|
101 | Regards, |
---|
102 | |
---|
103 | Maciej |
---|