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

Revamp document completion % #65

Open
1 task
EirikBirkeland opened this issue Oct 3, 2018 · 0 comments
Open
1 task

Revamp document completion % #65

EirikBirkeland opened this issue Oct 3, 2018 · 0 comments

Comments

@EirikBirkeland
Copy link
Owner

EirikBirkeland commented Oct 3, 2018

Current "xx% complete" indication is based on number of segments. This is particularly inaccurate for some documents that contain a couple of very long segments.

  • Add a % complete view which shows % based on number of words remaining.

Easy:

const totalWords = segmentCollection.map(segment => segment.getRawText()).join(" ").split(" ").length;
const translatedWords = segmentCollection.map(segment => segment.status = "translated").join(" ").split(" ").length;

const percentageCompleted = translatedWords / totalWords * 100;
@EirikBirkeland EirikBirkeland changed the title Revamp segment completion % Revamp document completion % Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant