[OpenStack-I18n] stackalytics translation stats API is broken????

Alex Eng aeng at redhat.com
Mon May 16 21:36:07 UTC 2016


> I have found that API 'stats/user/%s/%s..%s'
> and API 'stats/project/%s/version/%s/contributor/%s/%s..%s' generate
> different results.

There's a slight difference between "stats/user/%s/%s..%s' and  '
stats/project/%s/version/%s/contributor/%s/%s..%s'  as Patrick explained.
To sync with what shown in the user profile page in Zanata,
'stats/user/%s/%s..%s'
 is use for Stackalytics.

To fix it, I think we can change the way how Stackalytics uses Zanata's
> API. Based on 'stats/user/%s/%s..%s' we can get 'savedDate'. So just use
> the 'savedDate' to display on Stackalytics.


Yes. Zanata does returns daily statistics based on search query(last
parameter in the api request). Depending on how you want to show in
Stackalytics, you can just manipulate the results to daily, weekly.


---------------------------------------------

Alex Eng
Senior Software Engineer
Globalisation Tools Engineering
DID: +61 3514 8262 <callto:+61+3514+8262>
Mobile: +614 2335 3457 <callto:+614+2335+3457>

Red Hat, Asia-Pacific Pty Ltd
Level 1, 193 North Quay
Brisbane 4000
Office: +61 7 3514 8100 <callto:+61+7+3514+8100>
Fax: +61 7 3514 8199 <callto:+61+7+3514+8199>
Website: www.redhat.com

On Tue, May 17, 2016 at 5:18 AM, Remo Mattei <remo at rm.ht> wrote:

> Ian,
> as you can see
>
> Launchpad Id:remo-oEmail: Remo at rm.ht
>
>
> Thanks
>
> On May 16, 2016, at 12:01, Remo Mattei <remo at rm.ht> wrote:
>
> my id is the same on launchpad and zanate
>
> which is Remo at rm.ht
>
> This should be also usable on OpenStack.
>
> Any other suggestions
>
>
> On May 16, 2016, at 04:02, Ian Y. Choi <ianyrchoi at gmail.com> wrote:
>
> Hello,
>
>
> On 5/16/16 4:33 AM, Remo Mattei wrote:
>
> Well I just checked and no there are no diff on this list but I still do
> not have any words translated.
> What needs to be done to have this fixed?
>
> What are your launchpad and Zanata ID?
> If they are different, Stackalytics will not find your translation counts.
>
> I am asking because your translated words are zero on Stackalytics, which
> may be different from
> Akihiro-san and Kato-san's case because their counts are not zero.
>
> If you are in the case I mentioned, then you need to add your user data
> into detault_data.json in the Stackalytics repository,
> similar to https://review.openstack.org/#/c/284638/1/etc/default_data.json
> .
>
> Fortunately(?), my launchpad, gerrit and Zanata IDs are all the same, so I
> do not need to add my date on this file :)
>
>
> With many thanks,
>
> /Ian
>
>
> Remo
>
> On May 15, 2016, at 10:55, Ian Y. Choi <ianyrchoi at gmail.com <
> mailto:ianyrchoi at gmail.com <ianyrchoi at gmail.com>>> wrote:
>
> Hello Remo!
>
> Your translation count on Stackalytics is zero?
> If then, I think [1] and [2] will help to solve your problem :)
>
> [1]
> http://lists.openstack.org/pipermail/openstack-dev/2016-February/087537.html
> [2]
> http://lists.openstack.org/pipermail/openstack-dev/2016-February/087659.html
>
>
> With many thanks,
>
> /Ian
>
> Remo Mattei wrote on 5/16/2016 2:22 AM:
>
> The last 2 months I translated about 400 words but stack does not even
> show any. It will be great to get this fixed.
>
> Thanks
>
> Inviato da iPhone
>
> Il giorno 15 mag 2016, alle ore 09:56, Ian Y. Choi <ianyrchoi at gmail.com <
> mailto:ianyrchoi at gmail.com <ianyrchoi at gmail.com>>> ha scritto:
>
> Hello,
>
> I might have found the problem.
>
> The problem is that there can be several 'Translated' results within a
> week,
> however, those results are saved with the same primary key.
>
> I have just proposed https://review.openstack.org/316460 .
>
> I am not sure whether 'date' field is used on other Stackalytics sources,
> but at least, generating the primary key for translation records on
> record_processor.py
> does not use 'savedDate' field, as Shengjing mentioned.
> If 'date' field is used on other Stackalytics sources, please tell me,
> then I will change the review :)
>
>
> With many thanks,
>
> /Ian
>
>
> SJ Zhu wrote on 5/16/2016 12:14 AM:
>
> On Sun, May 15, 2016 at 10:42 PM, Ian Y. Choi <ianyrchoi at gmail.com <
> mailto:ianyrchoi at gmail.com <ianyrchoi at gmail.com>>> wrote:
> I have a question, although it is not mainly related to wrong Stackalytics
> stats.
>
> I have found that API 'stats/user/%s/%s..%s'
> and API 'stats/project/%s/version/%s/contributor/%s/%s..%s' generate
> different results.
>
> For example, from Apr 1 2016 to today, my count is 34320 with the first
> API,
> but the send API generates 29490 for the same period.
>
> I do know why the two APIs generate different numbers.
> Can statistics numbers on user API and the sum of results from each project
> API be different?
>
> Hi all,
>
> Previously Stackalytics uses API
> 'stats/project/%s/version/%s/contributor/%s/%s..%s'.
> But I change it to 'stats/user/%s/%s..%s' in
> https://review.openstack.org/#/c/288871/
>
> I may find the BUG but I have no time to fix it these days. So I hope
> someone to help.
>
> Stackalytics will get the results every week. And
> 'stats/user/%s/%s..%s' will return
> everyday's count. However Stackalytics seems not to sum a week's work.
>
> To fix it, I think we can change the way how Stackalytics uses
> Zanata's API. Based on
> 'stats/user/%s/%s..%s' we can get 'savedDate'. So just use the
> 'savedDate' to display
> on Stackalytics. I haven't read the code carefully but I think the
> change is possible.
> What's more we can debug the wrong results on Stackalytics more
> conveniently.
>
> But there's another question. How can we fix the old results on
> Stackalytics?
>
>
> _______________________________________________
> OpenStack-I18n mailing list
> OpenStack-I18n at lists.openstack.org <
> mailto:OpenStack-I18n at lists.openstack.org
> <OpenStack-I18n at lists.openstack.org>>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
>
>
>
>
>
> _______________________________________________
> OpenStack-I18n mailing list
> OpenStack-I18n at lists.openstack.org <
> mailto:OpenStack-I18n at lists.openstack.org
> <OpenStack-I18n at lists.openstack.org>>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
>
>
>
>
>
>
>
>
>
> _______________________________________________
> OpenStack-I18n mailing list
> OpenStack-I18n at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
>
> !DSPAM:573a19236031948371752!
>
>
>
> _______________________________________________
> 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/20160517/c9a30bc3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail
Type: image/png
Size: 399 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-i18n/attachments/20160517/c9a30bc3/attachment-0001.png>


More information about the OpenStack-I18n mailing list