[Openstack-i18n] [RFC] another message id generation proposal
Ying Chun Guo
guoyingc at cn.ibm.com
Tue Feb 11 08:41:42 UTC 2014
Peng Wu <peng.e.wu at gmail.com> wrote on 2014/02/11 14:03:21:
> Peng Wu <peng.e.wu at gmail.com>
> 2014/02/11 14:03
>
> To
>
> openstack-i18n at lists.openstack.org,
>
> cc
>
> Subject
>
> [Openstack-i18n] [RFC] another message id generation proposal
>
> Hi,
> Recently I read about the idea of REST API message and log message
> i18n proposals.
>
> I think maybe we could generate the message id by file name, method
> name and line no, like "test2.py#Main#15".
> I think this new message id is shorter and more readable than md5sum.
How to handle if the line no is changed?
I think one advantage to use message id is that the message id is easy to
track,
in different languages and in different versions (maybe).
So I would prefer to keep consistency among different versions.
Also, if the number has a project name as the prefix, it is useful too.
>
> And with this kind of information, the developer can locate the
> message as follows:
> 1. find all files with the same file name;
> 2. jump to the line no;
> 3. verify the function name and the gettext call;
> Then the developer can find the corresponding message.
>
> In the attachment, it is a small python program to print the
> information.
>
> Feel free to comment this new proposal.
>
> Thanks,
> Peng Wu
>
> Refer URL:
> https://blueprints.launchpad.net/oslo/+spec/log-messages-id
>
https://blueprints.launchpad.net/oslo/+spec/log-messages-translation-domain
>
>
> PS: I just noticed that some developers are considering to log both
> English and translated log messages, dunno whether they plan to return
> both English and translated REST API messages.
As I know, Oslo provides a way to configure the locale language used in
log files, and both (English and locale language).
I don't hear that they are going to return REST API messages in both
languages.
Regards
Daisy
>
> [attachment "test2.py" deleted by Ying Chun Guo/China/IBM]
> _______________________________________________
> Openstack-i18n mailing list
> Openstack-i18n at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-i18n/attachments/20140211/b04d0c39/attachment.html>
More information about the Openstack-i18n
mailing list