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

Translation coverage/progress bars in GUI #44

Open
mokou opened this issue May 1, 2015 · 2 comments
Open

Translation coverage/progress bars in GUI #44

mokou opened this issue May 1, 2015 · 2 comments

Comments

@mokou
Copy link
Contributor

mokou commented May 1, 2015

When we get a GUI and we have thpatch 2.0 non-mediawiki edition, display the progress bars based on the information served from thpatch.net

@nmlgc
Copy link
Contributor

nmlgc commented May 1, 2015

Basically, you would simply count the number of "translation units" in every file for both the base patch (the Japanese translation in most cases) and the patch in question, then merge both into one file.

Here's some basic code I wrote a year ago to do just that, so this would only need three more things:

  • The possibility to override the expected value for a specific file. Useful for translations that do not want to cover a specific area, or that don't replace all content (British English comes to mind).
  • A nice way of visualizing these values on both Touhou Patch Center and the future GUI. Something like percentage bars arranged in a hierarchical tree view for all the games and their directories to show accurate numbers for every level. And, of course, localized labels for the file names to have nicer descriptions of content ("st01a.msg.jdiff" → "Stage 1 [Reimu A]").

@nmlgc nmlgc changed the title Progress bars in GUI Translation coverage/progress bars in GUI Dec 7, 2016
@nmlgc
Copy link
Contributor

nmlgc commented Jul 20, 2017

Updated the code to actually work. To use it:

  • Make sure you downloaded the Japanese patch, or any other patch with 100% coverage, for the game(s) you want to test.
  • Calculate the base values:
python progress.py path/to/thpatch/lang_ja
  • Calculate the values of the patch you want to test (lang_fr in this example):
python progress.py --base path/to/thpatch/lang_ja path/to/thpatch/lang_fr
  • Running the script creates a file named stats.js in the root directory of the patch you run it on.

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

2 participants