i18n of bzr
Alexander Belchenko
bialix at ukr.net
Mon Nov 16 18:04:50 GMT 2009
John Arbash Meinel пишет:
>
> ....
>> 2) There is "wrong" design decision in bzr itself to put help for
>> commands in the class docstrings. This decision today is main
>> show-stopper for localizing these helps. Docstrings should be converted
>> to plain strings first, i.e. major API break of commands required. This
>> is a lot of work.
>> Furthermore it affects most of existing plugins.
>
> ^- I'll note that we did something similar with exception strings
> (switching from __doc__ to _fmt = ) and it wasn't terribly traumatic.
> Just needs someone who cares enough to do so for commands.
There is one small difference. For error messages you have forced to change this because of Python
2.5/2.6 compatibility reasons. And this is very internal thing.
In the case of command help it's optional change and because such change affects many plugins one
should do it in backward compatible way with deprecation warnings perhaps.
> Though I'll note that the actually documentation for commands comes from
> running the 'Command.help()' function. This is because stuff like
> dynamic registries, see-also, etc all lead to a lot more than can be put
> into a static __doc__ string.
True.
> I think we build the man page, etc, by enumerating all known commands
> and then grabbing their help strings.
>
> I really don't have a great answer for what you would want for
> translations. Just doing the __doc__ strings would probably get you
> reasonably far, though.
Well, there needs to be added localization of help for options to make the help almost complete.
More information about the bazaar
mailing list