Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate quality values in API #597

Closed
flodolo opened this issue Jan 20, 2016 · 6 comments
Closed

Truncate quality values in API #597

flodolo opened this issue Jan 20, 2016 · 6 comments
Assignees
Labels

Comments

@flodolo
Copy link
Collaborator

flodolo commented Jan 20, 2016

I don't think there's value in exposing so many decimals, e.g. source quality: 42.857142857143
https://transvision.mozfr.org/api/v1/tm/aurora/it/it/fin/?max_results=10

@pascalchevrel
Copy link
Member

The reason we don't truncate is to be fully compatible with Amagama that Pontoon also uses:
https://amagama-live.translatehouse.org/api/v1/en/cs/unit/Cancel

We can truncate but we need to check with matjaz first that it doesn't impact his code

@flodolo
Copy link
Collaborator Author

flodolo commented Jan 20, 2016

To clarify: truncate as in exposing less decimals, not truncating to integers.

Given that quality could be 100 (or 40 in the example above from Transvision), I wouldn't expect breakages.

@pascalchevrel
Copy link
Member

no problem with that, but let's check with matjaz first, I don't want anything to break on Pontoon :)

@flodolo
Copy link
Collaborator Author

flodolo commented Jan 20, 2016

@mathjazz Do you see any issue with reducing the number of decimals for quality in our API response?

@mathjazz
Copy link

r+

Pontoon uses Math.round(quality), so it displays quality wihout decimals. Thanks for asking!

@pascalchevrel pascalchevrel self-assigned this Jan 20, 2016
@pascalchevrel
Copy link
Member

Taking this one, I think 2 decimals is a good number

pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 20, 2016
pascalchevrel added a commit to pascalchevrel/transvision that referenced this issue Jan 20, 2016
pascalchevrel added a commit that referenced this issue Jan 20, 2016
…uality_value_to_2_decimals

Issue #597: round quality parameter in 'tm' API to 2 decimals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants