specify wanted app to l10n.py

RESOLVED FIXED

Status

()

Core
Localization
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Robert Kaiser, Assigned: Pike)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

11 years ago
<KaiRo> Pike: hmm, l10n.py only does a Firefox L10n, but I'd need a SeaMonkey one
<Pike> KaiRo: that's a one-line change (and a missed commandline option, file a bug?)
(Assignee)

Comment 1

11 years ago
Created attachment 271659 [details] [diff] [review]
add --app commandline support

just add a commandline option for --app

Now you can do 

python l10n.py --app=browser --app=mail foo-BAR
Attachment #271659 - Flags: review?(kairo)
(Reporter)

Comment 2

11 years ago
Comment on attachment 271659 [details] [diff] [review]
add --app commandline support

Most of this looks fine to me (though I don't really understand python) and it works for even cases with multiple app, but it fails for the default case of not defining --app at all:
------------------
robert@robert:/mnt/mozilla/src/mozilla> python tools/l10n/l10n.py bla
Traceback (most recent call last):
  File "tools/l10n/l10n.py", line 153, in <module>
    opts.app, exceptions=exceptions)
  File "tools/l10n/l10n.py", line 79, in createLocalization
    if not len(apps):
TypeError: object of type 'NoneType' has no len()
------------------

I guess you need a different way of checking for this being not specified...
Attachment #271659 - Flags: review?(kairo) → review-
(Assignee)

Comment 3

11 years ago
Created attachment 271665 [details] [diff] [review]
catch default for real

Duh. Fixed.
Attachment #271659 - Attachment is obsolete: true
Attachment #271665 - Flags: review?(kairo)
(Reporter)

Comment 4

11 years ago
Comment on attachment 271665 [details] [diff] [review]
catch default for real

Yes, this seems to work fine now. r=me
Attachment #271665 - Flags: review?(kairo) → review+
(Assignee)

Comment 5

11 years ago
Thanks for catching the bug, and the review. FIXED.

Checking in l10n.py;
/cvsroot/mozilla/tools/l10n/l10n.py,v  <--  l10n.py
new revision: 1.2; previous revision: 1.1
done
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.