From b95bd17191b37fec93e89c6c50b3e3be818aa67b Mon Sep 17 00:00:00 2001 From: varun Date: Tue, 16 Nov 2021 10:00:43 +0000 Subject: Update gen_strings.py based on the updated format for using plural strings. Test: Manual atest Bug: 199229956 Change-Id: I1bdb1edeebe71096b62f7496fcf8b9efca7934ff --- gen_strings.py | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'gen_strings.py') diff --git a/gen_strings.py b/gen_strings.py index a3d98be50..23b3315df 100755 --- a/gen_strings.py +++ b/gen_strings.py @@ -38,42 +38,42 @@ for verb in verbs: if verb == "trash": print Template(''' - - Allow ^1 to move this $datalabel to trash? - Allow ^1 to move ^2 ${datalabel}s to trash? - + {count, plural, + =1 {Allow ^1 to move this $datalabel to trash?} + other {Allow ^1 to move ^2 ${datalabel}s to trash?} +} ''').substitute(vars()).strip("\n") print Template(''' - - Moving $datalabel to trash… - Moving ^1 ${datalabel}s to trash… - + {count, plural, + =1 {Moving $datalabel to trash…} + other {Moving ^1 ${datalabel}s to trash…} +} ''').substitute(vars()).strip("\n") elif verb == "untrash": print Template(''' - - Allow ^1 to move this $datalabel out of trash? - Allow ^1 to move ^2 ${datalabel}s out of trash? - + {count, plural, + =1 {Allow ^1 to move this $datalabel out of trash?} + other {Allow ^1 to move ^2 ${datalabel}s out of trash?} +} ''').substitute(vars()).strip("\n") print Template(''' - - Moving $datalabel out of trash… - Moving ^1 ${datalabel}s out of trash… - + {count, plural, + =1 {Moving $datalabel out of trash…} + other {Moving ^1 ${datalabel}s out of trash…} +} ''').substitute(vars()).strip("\n") else: print Template(''' - - Allow ^1 to $verblabel this $datalabel? - Allow ^1 to $verblabel ^2 ${datalabel}s? - + {count, plural, + =1 {Allow ^1 to $verblabel this $datalabel?} + other {Allow ^1 to $verblabel ^2 ${datalabel}s?} +} ''').substitute(vars()).strip("\n") if verb == "write": actionLabel = "Modifying" @@ -81,10 +81,10 @@ for verb in verbs: actionLabel = "Deleting" print Template(''' - - $actionLabel $datalabel… - $actionLabel ^1 ${datalabel}s… - + {count, plural, + =1 {$actionLabel $datalabel…} + other {$actionLabel ^1 ${datalabel}s…} +} ''').substitute(vars()).strip("\n") print ''' -- cgit v1.2.3-59-g8ed1b