Saturday, October 13, 2007

l10n-merge tool update

This last Friday for around six hours three fellows were trying to figure out "what are we trying to write" and on Saturday we said "man, we have something!"
In the first few hours we went over emails, python samples, etc... and then after dinner we coded a python code that reads the .dtd files from the current folder makes a regular expression substitution:
re.sub(r'([Cc])olor', r'\1olour', instring)
and saves the file with a extension .bak with the changes made

The features we want to add are:
  • More regular expressions substitutions!
    • >> color(s) -> colour(s) -- re.sub(r'([Cc])olor', r'\1olour', instring)
      >> dialogue -> dialog -- re.sub(r'([Dd])ialogue', r'\1ialog', instring)
      >> Go forward -> Go forwards -- ??, etc
      >> Minimize -> Minimise
      >> Center -> Centre
      >> Organize -> Organise
      >> Customize -> Customise
  • Read the regular expression substitutions from a file and apply them
  • Go recursively into folders with .dtd and .properties files and make the changes there too, rather than just the current folder
  • Give two parameters: where to read from and where to write the changed source - this will require a parallel creation

No comments:

Post a Comment