Closed
Bug 1116745
Opened 10 years ago
Closed 10 years ago
mozharness apk description script: Update only a single locale
Categories
(Marketing :: Copy, task)
Marketing
Copy
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
Details
Attachments
(1 file, 1 obsolete file)
5.24 KB,
patch
|
bhearsum
:
review+
|
Details | Diff | Splinter Review |
For now, the script will update all locales.
We want to be able to update only a single (and specified) locale.
Assignee | ||
Comment 1•10 years ago
|
||
I also took the liberty to update the code to manage better urlopen failure with better error messages.
Let me know if you prefer a separate patch for this.
Attachment #8544701 -
Flags: review?(bhearsum)
Comment 2•10 years ago
|
||
Comment on attachment 8544701 [details] [diff] [review]
force-locale.diff
Review of attachment 8544701 [details] [diff] [review]:
-----------------------------------------------------------------
::: scripts/update_apk_description.py
@@ +52,5 @@
> }],
> + [["--force-locale"], {
> + "dest": "force_locale",
> + "help": "Force a specific locale (instead of all)",
> + "default": "all"
A better idiom for this is to set a default, and check for existence. Eg:
if self.config.get("force_locale"):
# use it
else:
# get the full list
Is there ever going to be a need to specify multiple locales here? If so, it might be better to deal with that now - it shouldn't be too difficult.
@@ +119,5 @@
> + if force_locale != "all":
> + # The user wants to update only a single locale. Let him do that.
> + # Return an array of one element
> + return [force_locale]
> + else:
This method's job is to get the full list of locales - I think it would be better to account for force_locale in update_desc. Eg, an "if self.config.get("force_locale")" block around https://github.com/mozilla/build-mozharness/blob/master/scripts/update_apk_description.py#L145.
Attachment #8544701 -
Flags: review?(bhearsum) → feedback+
Assignee | ||
Comment 3•10 years ago
|
||
Right, much better this way! Thanks for the feedback.
> Is there ever going to be a need to specify multiple locales here?
I don't see a use case for this (yet?). This feature is for cases like bug 1111015 (Enable Ukrainian for Description Page on Google Play)
Attachment #8544701 -
Attachment is obsolete: true
Attachment #8545274 -
Flags: review?(bhearsum)
Updated•10 years ago
|
Attachment #8545274 -
Flags: review?(bhearsum) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Merged:
https://hg.mozilla.org/build/mozharness/rev/7fed494a6a8d
I also removed some useless print:
https://hg.mozilla.org/build/mozharness/rev/0ab6a26619f1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 5•10 years ago
|
||
In production: https://hg.mozilla.org/build/mozharness/rev/7fed494a6a8d
You need to log in
before you can comment on or make changes to this bug.
Description
•