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
diff --git a/gen_strings.py b/gen_strings.py
index 99bba8a..a3d98be 100755
--- a/gen_strings.py
+++ b/gen_strings.py
@@ -31,12 +31,6 @@
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 @@
<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 @@
<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 @@
<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 ========================= -->