forked from tinygettext/tinygettext
-
Notifications
You must be signed in to change notification settings - Fork 6
/
TODO
63 lines (44 loc) · 2.1 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
tinygettext API related stuff
=============================
* translate, translate_ctxt, translate_ctxt_plural, ... could be
unified via overloading, not sure if that is a good idea. For the
same reason add_translation() could be de-overloaded, to
add_translation_ctxt, ...
`Note that an empty context string and an absent msgctxt line do not mean the same thing.'
https://www.gnu.org/software/gettext/manual/gettext.html
* iconv handling needs cleanup and more flexibility, since some
systems don't provide iconv or only through SDL
* Customizability could use grouping and documentation or other means
to make it more obvious:
- POParser::pedantic
- iconv (???)
- logging (log_callback(std::string))
* handle errors better, not with log_* stream, cases of errors:
- couldn't translate
- collision while adding translation
- failure to open file or directory
- unknown language
- iconv failure to convert charset
* ABI management/freezing. If tinygettext is to benefit other projects,
it should be able to provide a stable API (and, better, ABI).
tinygettext implementation details
----------------------------------
* with PluralForms moved into Dictionary a lot of the Langugae stuff
is pointless
* get rid of goto
* POParser can handle Big5, but needs testing.
Big5 is one byte for ASCII letters and two bytes for chinese ones,
this means some two byte characters collide with '\', some .po files
seem to escape the \ properly so that the string can be read as
usual, while others don't.
* _() -> getext() (gettext default)
N_(id) -> gettext_noop(id) (gettext default)
C_(ctxt, id) -> pgettext(ctxt, id) (Gnome does this: http://library.gnome.org/devel/glib/2.16/glib-I18N.html#Q-:CAPS)
NC_(ctxt, id) -> pgettext(ctxt, id) (Gnome does this: http://library.gnome.org/devel/glib/2.16/glib-I18N.html#Q-:CAPS)
Random Unimportant Stuff
------------------------
* support for .gmo files would be cool
tinygettext Documentation
-------------------------
* recommend a way to handle translation of speech and other data files
* document how to use tinygettext and make it work like gettext