redmaner / ma-xml-check Goto Github PK
View Code? Open in Web Editor NEWCode running on translators.xiaomi.eu
Code running on translators.xiaomi.eu
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 things left to do:
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
Remove full log mode (nobody uses it anyway)
Other fixes and speed enhancements
Support two check modes:
Commit a6dc1f0 has introduced a new issue, causing the auto fix function not to work as intended
Add error count in table, requires some rewrites of the script
If in the string are used two same variables, has to be added formatted="false" to the string name otherwise recompile failed...
Can be achieved by using uniq and rebuilding a file with sed
your script don't detect error : ingbrzy/ma-xml-5.0-FRENCH#57
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.
Search automatically for @Strings and mark them as untranslateable
Users started to use ' instead of ` ... please add it to grep...
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.
Check number of array items and tell if there are more or less required
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.
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>
is possible to add that to the bot ? using the strings from xiaomi to compare
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.