Skip to content

Commit

Permalink
[grit] Replace wrong writings of CHAR_LIMIT message attribute
Browse files Browse the repository at this point in the history
Replace writings such as CHAR-LIMIT/"CHAR LIMIT"/CHAR-LIMT with
CHAR_LIMIT (as specified by go/message-attributes).

The android2grd.py presubmit script is also updated.

Bug: 1204083
Change-Id: Ic1ade22a5149bad3ba8b6f29058326418fde975b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2690340
Auto-Submit: Victor Vianna <victorvianna@google.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#878055}
  • Loading branch information
Victor Hugo Vianna Silva authored and Chromium LUCI CQ committed Apr 30, 2021
1 parent 631c1b3 commit 823a430
Show file tree
Hide file tree
Showing 20 changed files with 390 additions and 391 deletions.
2 changes: 1 addition & 1 deletion android_webview/java/strings/android_webview_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<message name="IDS_PRIVATE_BROWSING_WARNING" desc="Warning shown when the app tries to create a private browsing WebView, which is not supported.">
This functionality is not supported in this version of Android.
</message>
<message name="IDS_LICENSE_ACTIVITY_TITLE" desc="The title of the activity that displays licenses of WebView. [CHAR-LIMIT=50]">
<message name="IDS_LICENSE_ACTIVITY_TITLE" desc="The title of the activity that displays licenses of WebView. [CHAR_LIMIT=50]">
System WebView licenses
</message>
</messages>
Expand Down
4 changes: 2 additions & 2 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -5373,7 +5373,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
Clear input
</message>
<if expr="is_android or enable_vr">
<message name="IDS_SEARCH_OR_TYPE_WEB_ADDRESS" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a website. [CHAR-LIMIT=38]" formatter_data="android_java">
<message name="IDS_SEARCH_OR_TYPE_WEB_ADDRESS" desc="Prompt to enter text into the text field that will either perform web searches or navigate to a website. [CHAR_LIMIT=38]" formatter_data="android_java">
Search or type web address
</message>
</if>
Expand Down Expand Up @@ -8820,7 +8820,7 @@ Please help our engineers fix this problem. Tell us what happened right before y
<message name="IDS_NOTIFICATION_BUTTON_CLOSE" desc="Button label to close a notification">
Close
</message>
<message name="IDS_NOTIFICATION_BUTTON_MORE" desc="Label shown on the second button of a MAC OSX system notification used to expand further options. [CHAR-LIMIT=12]">
<message name="IDS_NOTIFICATION_BUTTON_MORE" desc="Label shown on the second button of a MAC OSX system notification used to expand further options. [CHAR_LIMIT=12]">
More
</message>
<message name="IDS_NOTIFICATION_REPLY_PLACEHOLDER" desc="Placeholder text shown in the text box before any text is entered when replying directly to a notification.">
Expand Down
6 changes: 3 additions & 3 deletions chrome/app/vr_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@
<message name="IDS_VR_BUTTON_APP_REPOSITION" desc="This is the label for the app button while in reposition mode">
Finish
</message>
<message name="IDS_VR_MENU_NEW_INCOGNITO_TAB" desc="Menu item for opening a new Incognito tab that facilitates pseudononymous browsing. [CHAR-LIMIT=27]">
<message name="IDS_VR_MENU_NEW_INCOGNITO_TAB" desc="Menu item for opening a new Incognito tab that facilitates pseudononymous browsing. [CHAR_LIMIT=27]">
New Incognito tab
</message>
<message name="IDS_VR_MENU_PREFERENCES" desc="Menu item for opening browser preferences. [CHAR-LIMIT=27]">
<message name="IDS_VR_MENU_PREFERENCES" desc="Menu item for opening browser preferences. [CHAR_LIMIT=27]">
Settings
</message>
<message name="IDS_VR_MENU_CLOSE_INCOGNITO_TABS" desc="Menu item for closing all open Incognito tabs. [CHAR-LIMIT=27]">
<message name="IDS_VR_MENU_CLOSE_INCOGNITO_TABS" desc="Menu item for closing all open Incognito tabs. [CHAR_LIMIT=27]">
Close Incognito tabs
</message>
<message name="IDS_VR_TABS_BUTTON_REGULAR" desc="Text on button for selecting regular tabs">
Expand Down
508 changes: 254 additions & 254 deletions chrome/browser/ui/android/strings/android_chrome_strings.grd

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/autofill_assistant_strings.grdp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<grit-part>
<message name="IDS_AUTOFILL_ASSISTANT_PAYMENT_INFO_CONFIRM" desc="Text on the payment request primary button to confirm payment information [CHAR-LIMIT=32]">
<message name="IDS_AUTOFILL_ASSISTANT_PAYMENT_INFO_CONFIRM" desc="Text on the payment request primary button to confirm payment information [CHAR_LIMIT=32]">
Continue
</message>
<message name="IDS_AUTOFILL_ASSISTANT_DEFAULT_ERROR" desc="Text label that is shown when autofill assistant cannot help anymore, because something went wrong.">
Expand Down
4 changes: 2 additions & 2 deletions components/autofill_payments_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
<message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_DIALOG_CHECKBOX_UNCHECK_WARNING" desc="The warning text, after the user unchecks the checkbox, to indicate this card will still be saved on this device only, not to Google account.">
Saved on this device only
</message>
<message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_DIALOG_MESSAGE_OFFER" desc="The body text for a dialog that offers to migrate local cards into the cloud. [CHAR-LIMIT=NONE] [ICU Syntax]">
<message name="IDS_AUTOFILL_LOCAL_CARD_MIGRATION_DIALOG_MESSAGE_OFFER" desc="The body text for a dialog that offers to migrate local cards into the cloud. [CHAR_LIMIT=NONE] [ICU Syntax]">
{NUM_CARDS, plural,
=1 {This card and its billing address will be saved. You'll be able to use it when signed in to <ph name="USER_EMAIL">$1<ex>user@gmail.com</ex></ph>.}
other {These cards and their billing addresses will be saved. You'll be able to use them when signed in to <ph name="USER_EMAIL">$1<ex>user@gmail.com</ex></ph>.}}
Expand Down Expand Up @@ -393,7 +393,7 @@
<message name="IDS_AUTOFILL_CARD_UNMASK_NEW_CARD_LINK" desc="Text for link that prompts user to update their credit card after it may have been re-issued." formatter_data="android_java">
Update card
</message>
<message name="IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC" desc="The placeholder/label text for credit card verification code in the requestAutocomplete dialog. The text field where this is presented can be very narrow, so please prefer to translate this to the most common abbreviated form. [CHAR-LIMIT=4]" meaning="Placeholder label for a very narrow CVC field that should preferably be translated to an abbreviated form.">
<message name="IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC" desc="The placeholder/label text for credit card verification code in the requestAutocomplete dialog. The text field where this is presented can be very narrow, so please prefer to translate this to the most common abbreviated form. [CHAR_LIMIT=4]" meaning="Placeholder label for a very narrow CVC field that should preferably be translated to an abbreviated form.">
CVC
</message>

Expand Down
8 changes: 4 additions & 4 deletions components/autofill_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,17 @@
''' • '''</message>

<!-- Autofill credit card suggestion popup -->
<message name="IDS_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE_ABBR" desc="Abbreviated label for credit card expiration date. [CHAR-LIMIT=32]">
<message name="IDS_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE_ABBR" desc="Abbreviated label for credit card expiration date. [CHAR_LIMIT=32]">
Exp: <ph name="EXPIRATION_MONTH">$1<ex>06</ex></ph>/<ph name="EXPIRATION_YEAR">$2<ex>17</ex></ph>
</message>
<message name="IDS_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE_ABBR_V2" desc="Abbreviated label for credit card expiration date. Please translate the date as either YY/MM or MM/YY depending on how credit card expiration dates are more commonly presented in your locale. [CHAR-LIMIT=32]" meaning="Label for credit card expiration date for the save card dialog.">
<message name="IDS_AUTOFILL_CREDIT_CARD_EXPIRATION_DATE_ABBR_V2" desc="Abbreviated label for credit card expiration date. Please translate the date as either YY/MM or MM/YY depending on how credit card expiration dates are more commonly presented in your locale. [CHAR_LIMIT=32]" meaning="Label for credit card expiration date for the save card dialog.">
<ph name="EXPIRATION_MONTH">$1<ex>06</ex></ph>/<ph name="EXPIRATION_YEAR">$2<ex>17</ex></ph>
</message>

<message name="IDS_AUTOFILL_CREDIT_CARD_TWO_LINE_LABEL_FROM_NAME" desc="Second line label for the autofill credit card popup when the name is selected. This text will appear below the cardholder name. [CHAR-LIMIT=32]">
<message name="IDS_AUTOFILL_CREDIT_CARD_TWO_LINE_LABEL_FROM_NAME" desc="Second line label for the autofill credit card popup when the name is selected. This text will appear below the cardholder name. [CHAR_LIMIT=32]">
<ph name="CREDIT_CARD">$1<ex>Visa ••••5679</ex></ph>, expires on <ph name="EXPIRATION_DATE_ABBR">$2<ex>06/17</ex></ph>
</message>
<message name="IDS_AUTOFILL_CREDIT_CARD_TWO_LINE_LABEL_FROM_CARD_NUMBER" desc="Second line label for the autofill credit card popup when the card number is selected. This text will appear below the credit card number. [CHAR-LIMIT=32]">
<message name="IDS_AUTOFILL_CREDIT_CARD_TWO_LINE_LABEL_FROM_CARD_NUMBER" desc="Second line label for the autofill credit card popup when the card number is selected. This text will appear below the credit card number. [CHAR_LIMIT=32]">
Expires on <ph name="EXPIRATION_DATE_ABBR">$1<ex>06/17</ex></ph>
</message>

Expand Down
4 changes: 2 additions & 2 deletions components/blocked_content_strings.grdp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<grit-part>
<if expr="is_android">
<message name="IDS_POPUPS_BLOCKED_INFOBAR_BUTTON_SHOW" desc="Pop-up Blocking Show Button [CHAR-LIMIT=32]">
<message name="IDS_POPUPS_BLOCKED_INFOBAR_BUTTON_SHOW" desc="Pop-up Blocking Show Button [CHAR_LIMIT=32]">
Always show
</message>
<message name="IDS_POPUPS_BLOCKED_INFOBAR_TEXT" desc="Pop-up Blocking Title [CHAR-LIMIT=32] [ICU Syntax]">
<message name="IDS_POPUPS_BLOCKED_INFOBAR_TEXT" desc="Pop-up Blocking Title [CHAR_LIMIT=32] [ICU Syntax]">
{NUM_POPUPS,plural,=1{Pop-up blocked} other{# pop-ups blocked}}
</message>
</if>
Expand Down
Loading

0 comments on commit 823a430

Please sign in to comment.