transifex / transifex-old-core

Translation workflow & crowdsourcing for agile teams. Older, open-source codebase of Transifex.com
https://www.transifex.com/
GNU General Public License v2.0
5 stars 5 forks source link

Add badges for README #319

Open patcon opened 10 years ago

patcon commented 10 years ago

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 commented 10 years ago

:+1:

vBm commented 9 years ago

:+1:

diegobz commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

lots0logs commented 8 years ago

:+1:

tikismoke commented 8 years ago

:+1:

luzpaz commented 8 years ago

any movement on this issue?

jens-maus commented 8 years ago

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 commented 7 years ago

+1

greatislander commented 6 years ago

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

nelson6e65 commented 6 years ago

Interesting, @greatislander

strophy commented 5 years ago

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 commented 5 years ago

Link for example image is broken. Updated one:

new tag

FranklinYu commented 5 years ago

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 commented 5 years ago

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

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

FranklinYu commented 5 years ago

@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 commented 5 years ago

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

I get 12-characters-play|38% badge

A redirect to https://img.shields.io/badge/endpoint.svg?url=https%3A%2F%2Ftransifex.quelltext.eu%2Fbadge%2F12-characters%2Fproject%2F12-characters-play%2Ftranslated.json

niccokunzmann commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

@FranklinYu We can discuss this in the repository, such as in https://github.com/niccokunzmann/open-transifex-api/issues/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 commented 5 years ago

@boru87 could you elaborate on this using English text? I have no idea how this related to the topic of the discussion. Also appearing here:

Asking for cleanup: https://github.com/boru87/Bitcoin-Newbie/issues/4#issue-435479639