MIUIAndroid.com language repo XML checker - Automated bughunting

Discussion in 'Mi General' started by redmaner, Oct 20, 2013.

  1. redmaner

    redmanertranslators.xiaomi.eu maintainer
    Staff Member

    Jan 12, 2013
    533
    547
    180
    Male
    The Netherlands
    #1redmaner,Oct 20, 2013
    Last edited: Oct 30, 2013
    This is for our translators, for those who make our multilanguage ROMS possible every week!

    Every week the MIUIAndroid team (ingbrzy in general) spends a lot of time to solve bugs that slip in during translating.
    These bugs are mostly non closing tags (with <>), double tags or "+" before a tag (copied over during translating).

    Ingbrzy builds multilanguage roms every day to keep it clean, so we make the deadline on friday as we always do.
    Building ROMS takes time, so I made a tool that checks for the above errors for all languages in less then a minute.

    One regular repo takes about 1 - 5 seconds to check with this tool.
    We want to share this tool with our translaters so we can narrow down our small mistakes.


    Check the errors in your repository HERE

    Code: GitHub

    Supported languages
    Code:
    ar=Arabic
    pt_rBR=Brazilian-Portuguese
    bg=Bulgarian
    cs=Czech
    da=Danish
    nl=Dutch
    en=English
    fr=French
    de=German
    el=Greek
    hu=Hungarian
    in=Indonesian
    it=Italian
    ko=Korean
    nb=Norwegian
    pl=Polish
    ro=Romanian
    ru=Russian
    sk=Slovak
    es=Spanish
    sv=Swedish
    th=Thai
    tr=Turkish
    uk=Ukrainian
    vi=Vietnamese

    Understanding the log
    The log requires some explanation:

    Code:
    /home/translators.xiaomi.eu/scripts/languages/it/Italian/device/aries/FM.apk/res/values-it/strings.xml
    17: <string name="menu_save_station">Salva stazione</string> 157: <string name="menu_save_station">Salva stazione</string>
    This means there are doubles. In this case in Italian REPO: Italian/device/aries/FM.apk/res/values-it/strings.xml,
    In this file the string name menu_save_station is present on line 17 and 157. You have to remove one.

    Code:
    languages/ru/Russian/device/H958/Settings.apk/res/values-ru/strings.xml languages/ru/Russian/device/H958/Settings.apk/res/values-ru/strings.xml:2283: parser error : expected '>' ^
    This means there is a tag not closed. Search near the displayed linenumber.
    In this case near line 2283 of Russian/device/H958/Settings.apk/res/values-ru/strings.xml

    Code:
    languages/nl/Dutch/main/DownloadProvider.apk/res/values-nl/strings.xml 14:+  <string name="notification_filename_extras">" en nog %d meer"</string>
    In the final case this means there is a "+" before a tag.
    In this case on line 14 of Dutch/main/DownloadProvider.apk/res/values-nl/strings.xml
     
  2. iBotPeaches

    iBotPeachesScript Gatekeeper

    Oct 31, 2011
    3,811
    1,117
    335
    Kansas
  3. MarkHUK

    MarkHUKFounder & Sys Op
    Staff Member

    Glad this happened after we chatted! :) kudos guys!
     
  4. MarkHUK

    MarkHUKFounder & Sys Op
    Staff Member

    Could we move it to our miuiandroid.com or xiaomi.eu domain? :)
     
  5. redmaner

    redmanertranslators.xiaomi.eu maintainer
    Staff Member

    Jan 12, 2013
    533
    547
    180
    Male
    The Netherlands
  6. fengliu

    fengliuMembers

    May 19, 2014
    1
    0
    11
    where is the tool?
     
  7. redmaner

    redmanertranslators.xiaomi.eu maintainer
    Staff Member

    Jan 12, 2013
    533
    547
    180
    Male
    The Netherlands
    On github

    Verstuurd vanaf mijn Xoom met Tapatalk
     
  8. alikemali0124

    Nov 28, 2016
    2
    1
    13
    Female
    please set persian language
     
    Mohammad98 likes this.
  9. PRInCEI7

    PRInCEI7Members

    Jan 8, 2017
    32
    2
    20
    Male
    I've translated the latest version of the system MIUI 8
    I want to add the Arabic language in the next version
    Full localization rate of 99%

    MIUI 8 Arabic




    xiaomi redmi pro
     

    Attached Files:

Share Our Site