1
edit
Changes
m
== Want to help??? ==
* Our project can benefit from anyone who is knowledgeable in Python regular expressions. Feel free to contact us if you would like to contribute to the project in this way.
* We have a problem when matching a pattern inside of the DTDs, look below:
re.sub(r'([Cc])olor', r'\1olour', instring)
Changes every appearance of 'Color' or 'color' with 'Colour' and 'colour' (the Canadian wa)
Therefore a line like:
* <!ENTITY colorsDialog.title "Colors">
becomes like this:
* <!ENTITY coloursDialog.title "Colours">
WE DON'T WANT colo'''u'''rsDialog.title!!!
A better regular expression could avoid this but we are not good yet with RegExps (check anlaysis on RegExprs on next section)
* We would like to walk into subfolders and make changes in each subfolder; any good python example?
== Project Leader(s) ==
*[[User:Rueen|Rueen Fiez]] (rueen) [http://rueenfiez.wordpress.com Rueen's blog]
*[[User:Vlam6|Vincent Lam]] (vlam6) [http://vlam6.wordpress.com Vince's blog]
*[[User:Armenzg|Armen Zambrano]] (armenzg) [http://armenzg.blogspot.com Armen's blog]
Some formatting and taking up the want to help section
== Want to help??? - Project Contributor(s)==
* <font color='red'><strong>I would like to apply to a string multiple regular expressions substitutions. I have seen something like re.compile(bla bla bla). Could I collect a set of regular expressions in an array an iterate through it applying the substitutions to a string?? or something like that?</strong></font>
* <font color='green'><strong>We want to find out where our tool should be located inside the source tree</strong></font>
== Project Leader(s) ==
*[[User:Rueen|Rueen Fiez]] (rueen) [http://rueenfiez.wordpress.com Rueen's blog]
*[[User:Vlam6|Vincent Lam]] (vlam6) [http://vlam6.wordpress.com Vince's blog]
*[[User:Armenzg|Armen Zambrano]] (armenzg) [http://armenzg.blogspot.com Armen's blog]
== Project Name ==
''automated localization tool'' - This tool, given a locale and a set of rules, create a build of the same language but different region (e.g. en-IN from en-GB)
== Project Description ==
* Determine what our Python based system will "do" in 0.1 release
== Releases ===== Tool's 0.2 Release Functionality & Features ===
* '''INSTRUCTIONS''': ''TBD''
* '''Tool - 0.2 release ZIP file''': (''***Tentative release***'') [http://zenit.senecac.on.ca/wiki/imgs/Automated_Build_Tool.zip Automated Localization Build Tool (0.2)]
#Add more "rules", for now we are testing by changing ''color'' --> ''colour'' ('''may go to 0.3''')
=== Tool's 0.1 Release Functionality & Features ===
* '''INSTRUCTIONS''': [http://matrix.senecac.on.ca/~azambran/mozilla/instructions0.1.txt TXT file]
* '''Tool - 0.1 release ZIP file''': [https://bugzilla.mozilla.org/attachment.cgi?id=284789 Automated Localization Build Tool (0.1)]
#Changes the word "color" to "colour" in every DTD file and have it saved ('''Done''')
== Project Details ==
* [http://mxr.mozilla.org/mozilla/source/tools/l10n/l10n.py mozilla/tools/l10n/l10n.py] might give you an idea of what it takes to '''copy existing data over to a new location'''
* To get the l10n tools type: '''$> cvs -z3 -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/tools/l10n mozilla/testing/tests/l10n'''
* Some notes from trying to get en-GB ([http://armenzg.blogspot.com/2007/10/session-6-trying-to-build-en-gb.html read more]):
>> Customize -> Customise
==== DTD regular expression analysis ====
* An analysis of regular expression, specific to DTDs (from Parser.py)
self.key = re.compile('<!ENTITY\s+([\w\.]+)\s+(\"(?:[^\"]*\")|(?:\'[^\']*)\')\s*>', re.S)
"<!ENTITY colorsDialog.title "Colors">"
==== Related regular expressions theory ====
* (...) what is inside the parentheses are a group - the contents of a group can be retrieved after a match has been performed, and can be matched later in the string with the ''\number'' special sequence
* (?...) - This is an '''extension notation''' - Extensions usually do not create a new group; (?P<name>...) is the only exception to this rule. Following are the currently supported extensions.
* List of supported extensions: (?iLmsux), (?:...), (?P<name>...), (?P=name), (?#...), (?=...), (?!...), (?<=...), (?<!...), (?(id/name)yes-pattern|no-pattern)
* \number - Matches the contents of the group of the same number. Groups are numbered starting from 1.
== Project news ==
* Oct. 23, 2007 - Added 0.2 Release Functionality & Features section. Team meeting held (6 hours) - our tool is now able to, given a localization directory (or any directory for that matter), walk through all sub-directories and files and make changes based on our translation rules. We've also determined a few other things to do before our 0.2 release and even brainstormed 0.3 ideas (incorporating l10n's setup.py script into our tool like Axel suggested).
* Oct. 25, 2007 - Meeting with Michal; She explained us the different tools that out there created by the community and by next week will gives us more information on which direction to follow
== Bugs ==
* [https://bugzilla.mozilla.org/show_bug.cgi?id=392945#c8 Bug 392945 (fx20-en-IN) – add en-IN locale]
== Project ContributorOld want to help ==* <strike> We have a problem when matching a pattern inside of the DTDs, look below:re.sub(r'([Cc])olor', r'\1olour', instring)Changes every appearance of 'Color' or 'color' with 'Colour' and 'colour' (the Canadian wa)Therefore a line like:<!ENTITY colorsDialog.title "Colors">becomes like this:<!ENTITY '''colours'''Dialog.title "Colours">WE DON'T WANT colo'''u'''rsDialog.title!!!A better regular expression could avoid this but we are not good yet with RegExps (scheck anlaysis on RegExprs on next section) </strike>'''SOLVED:''' re.sub(r'<font color='red'>(.*)</font>([Cc])olor', r'\1<font color='red'>\2</font>olour', instring) * <strike>We would like to walk into subfolders and make changes in each subfolder; any good python example? </strike> '''SOLVED:''' Already works on 0.2 release