Discussion:
translating fossil
(too old to reply)
john francis lee
2013-02-06 12:53:38 UTC
Permalink
Hi,

I've downloaded fossil and am very impressed. I have several projects in
mind, not involving computer software but political software : citizen
drafted legislation.

I need to translate the fossil interface. I have cloned the repository
and taken a quick look at the code structure. I didn't find any .pot or
.po files.

I suppose I can just start reading the code and proceeding on my own.

Does anyone have any advice for me?

Thanks alot.
--
john francis lee
246/3 Moo 22
Thanon Kaew Wai
Mueang Chiangrai 57000
Thailand
Stephan Beal
2013-02-06 14:30:23 UTC
Permalink
I need to translate the fossil interface. I have cloned the repository and
taken a quick look at the code structure. I didn't find any .pot or .po
files.
I suppose I can just start reading the code and proceeding on my own.
Does anyone have any advice for me?
Don't do it - it will lead only to pain and suffering! 99.9% of the text is
hard coded in C. Translating it would require modifying a large number of
files, replacing huge numbers of strings _and_ potentially
breaking/debugging/rewriting lots of printf-style formatting. Fossil was
not built with i18n in mind and the code is not at all structured in way
which will support translation.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Richard Hipp
2013-02-06 14:40:27 UTC
Permalink
Post by Stephan Beal
Post by john francis lee
I need to translate the fossil interface. I have cloned the repository
and taken a quick look at the code structure. I didn't find any .pot or .po
files.
I suppose I can just start reading the code and proceeding on my own.
Does anyone have any advice for me?
Don't do it - it will lead only to pain and suffering! 99.9% of the text
is hard coded in C. Translating it would require modifying a large number
of files, replacing huge numbers of strings _and_ potentially
breaking/debugging/rewriting lots of printf-style formatting. Fossil was
not built with i18n in mind and the code is not at all structured in way
which will support translation.
I wonder if just key parts of Fossil could be translated?

Certainly the administrative pages are huge piles of English-language text
intermixed with C code, and it would be very difficult and disruptive to
try and separate the two.

But some things, like Menu options, might be amenable to translation, no?

I agree with Stephen that a full translation of Fossil is not really
practical as it is roughly equivalent to rewriting the whole program. But
perhaps non-English speakers would appreciate at least seeing some key
navigation cues translated into their native tongue. And perhaps such a
half-translation could be accomplished without much disruption. Just
wondering....
Post by Stephan Beal
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
--
D. Richard Hipp
***@sqlite.org
john francis lee
2013-02-06 14:45:42 UTC
Permalink
Post by john francis lee
I need to translate the fossil interface. I have cloned the
repository and taken a quick look at the code structure. I didn't
find any .pot or .po files.
I suppose I can just start reading the code and proceeding on my own.
Does anyone have any advice for me?
Don't do it - it will lead only to pain and suffering! 99.9% of the
text is hard coded in C. Translating it would require modifying a
large number of files, replacing huge numbers of strings _and_
potentially breaking/debugging/rewriting lots of printf-style
formatting. Fossil was not built with i18n in mind and the code is not
at all structured in way which will support translation.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Well, I asked for it, didn't I?
--
john francis lee
246/3 Moo 22
Thanon Kaew Wai
Mueang Chiangrai 57000
Thailand
Stephan Beal
2013-02-06 14:46:58 UTC
Permalink
Post by john francis lee
Well, I asked for it, didn't I?
PS: the JSON API was developed with this more in mind, and uses result
codes instead of natural language to convey information (insofar as
possible/feasible). When building a custom HTML interface on top of the
JSON API it is possible to write the UI in whatever natural language you
like. There are some proof-of-concept demos here:

http://fossil.wanderinghorse.net/repos/fwiki/editor/

The vast majority of the text which appears in those demos is in the
HTML/JS code, and does not come directly from fossil.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Александр Орефков
2013-02-07 05:25:44 UTC
Permalink
I try some little translation user's web ui to Russian for my web-site.
Its really hard and dirty work :(
Some text I can translate by modifying header and footer, but other ui
was rewriting in sources by many

#ifdef LANG_RU
...
#elif LANG_EN
...
#endif

and add -DLANG_RU in Makefile

Many problems with merge my changes and main trunk.
And translated not all UI, only basically user's pages.

My repo live on http://snegopat.ru/fossil/
branch orefkovs-change

WBR, Alexander Orefkov.
Александр Орефков
2013-02-07 05:33:51 UTC
Permalink
Imho, need more develop json interface to enable construction of a
quick and flexible UI
Stephan Beal
2013-02-07 10:38:06 UTC
Permalink
Post by Александр Орефков
#ifdef LANG_RU
...
#elif LANG_EN
This approach breaks badly if one of us changes printf-style formatting in
the output and you do not modify the RU version. Such changes can cause
anything from garbled output to segfaults, depending on the compiler and
environment. This approach to translating fossil can only lead to pain and
suffering long-term.

"Some day" we'll get around to starting work on Fossil v2, which will
"almost certainly" have a library interface (as opposed to monolithic app),
at which point translations become much more feasible.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Александр Орефков
2013-02-07 11:18:07 UTC
Permalink
Post by Stephan Beal
Post by Александр Орефков
#ifdef LANG_RU
...
#elif LANG_EN
This approach breaks badly if one of us changes printf-style formatting in
the output and you do not modify the RU version. Such changes can cause
anything from garbled output to segfaults, depending on the compiler and
environment. This approach to translating fossil can only lead to pain and
suffering long-term.
"Some day" we'll get around to starting work on Fossil v2, which will
"almost certainly" have a library interface (as opposed to monolithic app),
at which point translations become much more feasible.
Yes, I know all of it :(
And looking forward to improve JSON API.
For example, "json timeline" not allow me get all kind of events, only
one of chekins, wiki, branch, tickets...
And more on...
Stephan Beal
2013-02-07 11:37:16 UTC
Permalink
Post by Александр Орефков
For example, "json timeline" not allow me get all kind of events, only
one of chekins, wiki, branch, tickets...
The main reasons for that are because the result format and underlying
logic both get more complex if it has to handle multiple types in one run.
The timeline (a single command) is already the most complex part of the
JSON API, with far more code than any other JSON command set (see
src/json_*.c). It's even bigger than the code for the whole set of wiki
commands (create, diff, get, list, preview, save).
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Continue reading on narkive:
Loading...