Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Add badges for README #319

Open
patcon opened this issue Jul 17, 2014 · 26 comments
Open

Add badges for README #319

patcon opened this issue Jul 17, 2014 · 26 comments

Comments

@patcon
Copy link

patcon commented Jul 17, 2014

I realize that you have this widget available:
https://www.transifex.com/projects/p/seadroid/widgets/

Bt as I understand it, that's not in line with what maintainers expect of README badges.

Was thinking that it might be nice to have a badge per translation, like travis does. There is a "badges as a service" tool called shields.io that we could integrate with. It provides standard, high resolution SVG images for badges.

This is how it might look: Translate: FR - 32%

Or of course, there could be an overall badge per project, if your API provides that :)

Here's an example of an implementation:
https://github.com/badges/shields/blob/0baa3209680628f6aa701876bef475b9ed30a4b3/server.js#L204-L245

Another possible impediment is that you require authentication for all API calls, even for those against public open source projects. This would probably be the call we'd need to use:
http://docs.transifex.com/developer/api/translations

Might be able to feed img.shields.io a set of credentials to use. Not sure if there's precedent for that with others services integrated into shields. That would also likely bump against any API rate limits, should they exist.

Anyhow, food for thought. Just putting it out there :) I could provide some support, but likely wouldn't carry the whole effort, unfortunately

@cloose
Copy link

cloose commented Sep 22, 2014

👍

1 similar comment
@vBm
Copy link

vBm commented Jan 28, 2015

👍

@diegobz
Copy link
Contributor

diegobz commented Jan 29, 2015

We have some time allocated to improve the crowdsource aspect of Transifex this year and I think badges is gonna be on the table for discussion. Thanks for the info @patcon.

@lexrus
Copy link

lexrus commented Feb 13, 2015

The chart looks blurry on Retina display because of its low resolution.
Could you please double the size of the image?

screen shot 2015-02-13 at 11 21 00 am

@fpietrosanti
Copy link

We'd love to integrate that feature at our GlobaLeaks project in the wiki https://github.com/globaleaks/globaleaks/wiki

@lots0logs
Copy link

👍

1 similar comment
@tikismoke
Copy link

👍

@luzpaz
Copy link

luzpaz commented May 29, 2016

any movement on this issue?

@jens-maus
Copy link

I also would like to see that feature being integrated in transifex. This is really one of the badge types that are badly missing for many of my github projects.

@UdoKifferbrehl
Copy link

+1

@greatislander
Copy link

Made this microservice as an intermediary between the Transifex API and Shields.io, for anyone who's interested.

@nelson6e65
Copy link

Interesting, @greatislander

@strophy
Copy link

strophy commented Oct 26, 2018

This would be a really cool feature. Transifex is one of the few missing services on shields.io. Please at the least fix the low resolution of the existing widgets, they look really blurry on HiDPI screens.

@FranklinYu
Copy link

Link for example image is broken. Updated one:

new tag

@FranklinYu
Copy link

FranklinYu commented Nov 13, 2018

The API documentation page has been moved to https://docs.transifex.com/api/translations

But it downloads all the translation texts. We probably only need statistics instead: https://docs.transifex.com/api/statistics

This API should be made public if the project is public.

private API

Note that the project page (such as https://www.transifex.com/transifex/transifex/) makes an AJAX call to https://www.transifex.com/_/userspace/ajax/widgets/languages/transifex/transifex/. This is private API but we can use this as temporary solution.

@niccokunzmann
Copy link

niccokunzmann commented Jan 28, 2019

So, I added a new project, inspired by @greatislander.
Contents:

  • Open the transifex API endpoints, if you invite the user open_api to your project
  • Example usages of the API through shields dynamic badges https://img.shields.io/badge/dynamic/json.svg?url=http%3A%2F%2Ftransifex.quelltext.eu%2Forganizations%2F12-characters%2Fprojects%2F12-characters-play%2Fresources%2F%3Fmodification%3Dsummary%26language_code%3Dde&label=translated&query=%24.stats[%3F(%40.name%3D%3D%22translated%22)].percentage&colorB=green
  • Badges endpoint for shields https://transifex.quelltext.eu/badge/12-characters/project/12-characters-play/translated.svg

Source: https://github.com/niccokunzmann/open-transifex-api
Deployment: https://transifex.quelltext.eu/

@FranklinYu
Copy link

@niccokunzmann Currently the URL https://transifex.quelltext.eu/badge/12-characters/project/12-characters-play/translated.svg returns 404. Is it not yet deployed?

@nelson6e65
Copy link

nelson6e65 commented Jan 29, 2019

@niccokunzmann
Copy link

niccokunzmann commented Jan 29, 2019

Just now deployed. Please give feedback on the issue tracker if something is not working or consider editing the HTML when it can be formulated in a better way.

@FranklinYu
Copy link

@niccokunzmann That web service is currently running with niccokunzmann3 as username, so I think it works only if the user is member of the organization, right? For example https://transifex.quelltext.eu/badge/transifex/project/transifex/translated.svg won't work, even if https://www.transifex.com/transifex/transifex/ is public project.

@niccokunzmann
Copy link

@FranklinYu We can discuss this in the repository, such as in niccokunzmann/open-transifex-api#1, to keep this issue clean. The user for https://transifex.quelltext.eu is open_api who needs to be invited to use badges/open the API to the public.

@niccokunzmann
Copy link

niccokunzmann commented Apr 21, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

17 participants