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

Comments

Projects
None yet
3 participants
@flodolo
Contributor

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

@flodolo flodolo added the easypick label Jan 20, 2016

@pascalchevrel

This comment has been minimized.

Show comment
Hide comment
@pascalchevrel

pascalchevrel Jan 20, 2016

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

Member

pascalchevrel commented Jan 20, 2016

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

This comment has been minimized.

Show comment
Hide comment
@flodolo

flodolo Jan 20, 2016

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@pascalchevrel

pascalchevrel Jan 20, 2016

Member

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

Member

pascalchevrel commented Jan 20, 2016

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

@flodolo

This comment has been minimized.

Show comment
Hide comment
@flodolo

flodolo Jan 20, 2016

Contributor

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

Contributor

flodolo commented Jan 20, 2016

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

@mathjazz

This comment has been minimized.

Show comment
Hide comment
@mathjazz

mathjazz Jan 20, 2016

r+

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

mathjazz commented Jan 20, 2016

r+

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

@pascalchevrel pascalchevrel self-assigned this Jan 20, 2016

@pascalchevrel

This comment has been minimized.

Show comment
Hide comment
@pascalchevrel

pascalchevrel Jan 20, 2016

Member

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

Member

pascalchevrel commented Jan 20, 2016

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

Merge pull request #598 from pascalchevrel/issue597_truncate_tm_api_q…
…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