Code Monkey home page Code Monkey logo

ma-xml-check's People

Contributors

ingbrzy avatar micdu70 avatar redmaner avatar scratchbuild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ma-xml-check's Issues

Fix double caching

Cache get's created always but only removed with one function.
At the end two caches are created but not removed = script doesn't work.

Solution: only build cache for --check function

Some rough edges

Some things left to do:

  • Merge debug mode and check in one command
  • Add option to log missing parts in base translations (diff exsisting apk's with a universal list of apk's)

Do apostrophe check fully in memory

Apostrophe check is currently terrible, using 2 file writes per xml.
A rough calculation: 100 xmls x 2 files = 200 files
200 files x 20 languages = 4000 files

4000 less file writes = more speed = epic win

Improve caching by using file creation instead of dir creation

Currently the entire check process is cached, and from every individual cache a logfile is created.
For every file checked a cache directory is made. If an error occurs the error is written in a temporary logfile within it's own cache directory. This means that there are approximately 200+ empty directories created for every language every time the language is checked.

The new structure should be only files instead of directories, reducing the mkdir command drastically.
This should be possible very easily and increases the value of a cache even more when debugging must be done.

Enhance resource handling using mxcr files

Currently resources are written in xml's.
This is good to keep the overview.
Parsing xml's with a lot of data is very slow though.

Enhance the resource sync system to parse the xml's into mxcr (Ma Xml Check Resource) files.
mxcr is very fast to parse which will increase overall speed of the entire check process.

Build a seperate recource deamon, which will update mxcr files when the xml's are changed.
Detect xml changes using an unique signature file using md5sums.

Tag names aren't shown in HTML log

With the new log layout in HTML the tagnames aren't displayed anymore.
Without these tagnames it's all a bit hard to determine where the error is.

Add variable checking support ?

for example few time ago the strings

<string name="giftcard_expire">%1$s-%2$s-%3$s expired</string>
...
<string name="progress_success_pay_summary">Payment complete! :)</string>

Was changed to :

<string name="giftcard_expire">%1$s expired</string>
...
<string name="progress_success_pay_summary">%1$s MiCredits recharged,%2$s MiCredits paied</string>

many translators forgot to modify it, and still not have modified those and/or few others strings, even Mark sometimes forgot to modify them on UK miuiandroid strings

i saw miuirussia using a script that detect automatly this kind of change example :

<!-- The count of MNPS does not match! Now: 3 must: 1
    %s: 3 must: 1
    %d: 0 must: 0 -->
<!-- Original string: %1$s expired -->
<string name="giftcard_expire">%1$s-%2$s-%3$s истекло</string>
...
<!-- The count of MNPS does not match! Now: 0 must: 2
    %s: 0 must: 2
    %d: 0 must: 0 -->
<!-- Original string: %1$s MiCredits recharged,%2$s MiCredits paied -->
<string name="progress_success_pay_summary">Оплата завершена! :)</string>

https://github.com/KDGDev/miui-v5-russian-translation-for-miuiandroid/blob/7db4d887d841485aff404c96a2683b2b1786c804/Russian/main/PaymentService.apk/res/values-ru/strings.xml

is possible to add that to the bot ? using the strings from xiaomi to compare

Redesign the server check cycle

Currently translators.xiaomi.eu checks all language repositories 4 times per hour, 24 hours a day and 7 days a week.
That is 627 checks per language a week. The Dutch repository has 253 xml files, which is a total of 170016 file checks per week for the Dutch repository alone.

This check cycle is not logical. The Dutch repository get's updated probably 5 times a week. So instead of checking the Dutch repository 627 times a week, why not check it only when the repository is actually changed?

This behaviour can be achieved by letting translators.xiaomi.eu checking if the repository is changed when it was last checked. If that is the case, check the repository. If not skip it and use the old log.
This is possible for every language repository, resulting in faster checks and less server use.

5.0: Massive maintainance update

  • Multi processing
  • Creating the XML_CHECK_FULL by copying no-header logs instead of full writing
  • Values check (check if a folder is called "values" instead of "values-iso")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.