diff options
author | 2021-02-22 10:12:15 +0800 | |
---|---|---|
committer | 2021-02-24 13:03:38 +0800 | |
commit | 9911b9e917cd9ddbe9bbcbd5a975335b46b4c1c0 (patch) | |
tree | dceea69d122c3119115da7f510b6615c8c95897a /gen_strings.py | |
parent | 8f4e416217095c198885fb3cf8323be7d5369b3d (diff) |
Add the title string on progress dialog in PermissionActivity
Add the string and remove unused codes.
Fix: 160189362
Test: manual. Add the screenshots on b/160189362
Change-Id: I5b3a783da920c94942209304b1dc282361fa3836
Diffstat (limited to 'gen_strings.py')
-rwxr-xr-x | gen_strings.py | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/gen_strings.py b/gen_strings.py index 99bba8a34..a3d98be50 100755 --- a/gen_strings.py +++ b/gen_strings.py @@ -31,12 +31,6 @@ for verb in verbs: if verb == "write": verblabel = "modify" - verblabelcaps = verblabel[0].upper() + verblabel[1:] - if verb == "trash": - verblabelcaps = "Move to trash" - if verb == "untrash": - verblabelcaps = "Move out of trash" - print ''' <!-- ========================= %s STRINGS ========================= --> ''' % (verb.upper()) @@ -49,6 +43,13 @@ for verb in verbs: <item quantity="other">Allow <xliff:g id="app_name" example="Gmail">^1</xliff:g> to move <xliff:g id="count" example="42">^2</xliff:g> ${datalabel}s to trash?</item> </plurals> ''').substitute(vars()).strip("\n") + print Template(''' +<!-- Progress dialog message after user allows $verb permission to the $data item [CHAR LIMIT=128] --> +<plurals name="permission_progress_${verb}_${data}"> + <item quantity="one">Moving $datalabel to trash…</item> + <item quantity="other">Moving <xliff:g id="count" example="42">^1</xliff:g> ${datalabel}s to trash…</item> +</plurals> +''').substitute(vars()).strip("\n") elif verb == "untrash": print Template(''' @@ -58,6 +59,13 @@ for verb in verbs: <item quantity="other">Allow <xliff:g id="app_name" example="Gmail">^1</xliff:g> to move <xliff:g id="count" example="42">^2</xliff:g> ${datalabel}s out of trash?</item> </plurals> ''').substitute(vars()).strip("\n") + print Template(''' +<!-- Progress dialog message after user allows $verb permission to the $data item [CHAR LIMIT=128] --> +<plurals name="permission_progress_${verb}_${data}"> + <item quantity="one">Moving $datalabel out of trash…</item> + <item quantity="other">Moving <xliff:g id="count" example="42">^1</xliff:g> ${datalabel}s out of trash…</item> +</plurals> +''').substitute(vars()).strip("\n") else: print Template(''' @@ -67,6 +75,17 @@ for verb in verbs: <item quantity="other">Allow <xliff:g id="app_name" example="Gmail">^1</xliff:g> to $verblabel <xliff:g id="count" example="42">^2</xliff:g> ${datalabel}s?</item> </plurals> ''').substitute(vars()).strip("\n") + if verb == "write": + actionLabel = "Modifying" + else: + actionLabel = "Deleting" + print Template(''' +<!-- Progress dialog message after user allows $verb permission to the $data item [CHAR LIMIT=128] --> +<plurals name="permission_progress_${verb}_${data}"> + <item quantity="one">$actionLabel $datalabel…</item> + <item quantity="other">$actionLabel <xliff:g id="count" example="42">^1</xliff:g> ${datalabel}s…</item> +</plurals> +''').substitute(vars()).strip("\n") print ''' <!-- ========================= END AUTO-GENERATED BY gen_strings.py ========================= --> |