[M120 Migration] Languages pak optimization. 75/307275/3
authorManjeet <manjeet.1@partner.samsung.com>
Wed, 6 Mar 2024 12:53:39 +0000 (18:23 +0530)
committerDae-Hyun Ko <dhyuna.ko@samsung.com>
Wed, 20 Mar 2024 03:23:02 +0000 (03:23 +0000)
Removed unwanted part file and messages strings to decrease
the size of the pak files. With the patch, the size of the
pak files in /usr/lib/chromium-efl/locales/ is decreased
from 9.6 to 9.0 MB.

Reference:
https://review.tizen.org/gerrit/291192

Change-Id: I3d6d07bc452b73e2c19f675b6127baf25f452de9
Signed-off-by: Manjeet <manjeet.1@partner.samsung.com>
components/autofill_strings.grdp
components/components_strings.grd
components/omnibox_strings.grdp
components/password_manager_strings.grdp
components/policy_strings.grdp
components/version_ui_strings.grdp
tools/grit/grit_rule.gni

index 4b8118f..55754a3 100644 (file)
@@ -23,7 +23,7 @@
     </message>
   </if>
 
-  <if expr="is_android or is_ios">
+  <if expr="is_android or is_ios or not is_tizen">
     <message name="IDS_AUTOFILL_REMOVE_LOCAL_COPY_BUTTON" desc="The label of the button that removes the local copy of a Wallet Credit Card." formatter_data="android_java">
       Remove copy
     </message>
index 0ccb816..fb29e4b 100644 (file)
       <part file="autofill_payments_strings.grdp" />
       <part file="autofill_strings.grdp" />
       <part file="bookmark_bar_strings.grdp" />
+      <if expr="not is_tizen">
       <part file="bookmark_component_strings.grdp" />
+      </if>
       <part file="blocked_content_strings.grdp" />
       <part file="browsing_data_strings.grdp" />
       <part file="commerce_strings.grdp" />
       <part file="live_caption_strings.grdp" />
       <part file="components_settings_strings.grdp" />
       <part file="content_creation_strings.grdp" />
+      <if expr="not is_tizen">
       <part file="crash_strings.grdp" />
+      </if>
       <part file="dialog_strings.grdp" />
       <part file="dom_distiller_strings.grdp" />
       <part file="enterprise_strings.grdp" />
       <part file="error_page_strings.grdp" />
+      <if expr="not is_tizen">
       <part file="find_in_page_strings.grdp" />
+      <part file="history_strings.grdp" />
+      <part file="login_dialog_strings.grdp" />
+      <part file="new_or_sad_tab_strings.grdp" />
+      </if>
       <part file="flags_strings.grdp" />
       <part file="fullscreen_control_strings.grdp" />
       <part file="global_media_controls_strings.grdp" />
       <part file="heavy_ad_intervention_strings.grdp" />
-      <part file="history_strings.grdp" />
       <part file="javascript_dialogs_strings.grdp" />
-      <part file="login_dialog_strings.grdp" />
       <part file="management_strings.grdp" />
       <part file="media_message_center_strings.grdp" />
-      <part file="new_or_sad_tab_strings.grdp" />
       <part file="omnibox_strings.grdp" />
       <part file="page_info_strings.grdp" />
       <part file="paint_preview_strings.grdp" />
       <part file="ssl_errors_strings.grdp" />
       <part file="subresource_filter_strings.grdp" />
       <part file="supervised_user_strings.grdp" />
+      <if expr="not is_tizen">
       <part file="sync_ui_strings.grdp" />
+      </if>
       <part file="translate_strings.grdp" />
       <part file="tab_groups_strings.grdp" />
       <part file="undo_strings.grdp" />
         <part file="webxr_strings.grdp" />
       </if>
 
+      <if expr="not is_tizen">
       <!-- Generic terms -->
       <message name="IDS_CANCEL" desc="Used for Cancel on buttons">
         Cancel
       </message>
-      <message name="IDS_CLOSE" desc="A generic term for Close on buttons and menus.">
-        Close
-      </message>
       <message name="IDS_CLEAR" desc="A generic term for Clearing input fields." formatter_data="android_java">
         Clear
       </message>
+      </if>
+      <message name="IDS_CLOSE" desc="A generic term for Close on buttons and menus.">
+        Close
+      </message>
       <message name="IDS_DONE" desc="A generic term for Done on buttons and menus.">
         Done
       </message>
       <message name="IDS_OK" desc="Used for OK on buttons">
         OK
       </message>
+      <if expr="not is_tizen">
       <message name="IDS_RELOAD" desc="Used for Reload on buttons">
         Reload
       </message>
           Turn Off
         </message>
       </if>
-
       <message name="IDS_PLUGIN_NOT_SUPPORTED" desc="The placeholder text for an unsupported plugin.">
         This plugin is not supported
       </message>
       <message name="IDS_ACCNAME_CLOSE" desc="The accessible name for the Close button.">
         Close
       </message>
-      <message name="IDS_ACCNAME_OPEN" desc="The accessible name for the Open button.">
-        Open
-      </message>
       <message name="IDS_ACCNAME_OPEN_IN_NEW_TAB" desc="The accessible name for the Open in New Tab button.">
         Open in new tab
       </message>
       <message name="IDS_ACCNAME_TAB_LIST" desc="The accessible name for the tab strip.">
         Tab list
       </message>
+      </if>
+      <message name="IDS_ACCNAME_OPEN" desc="The accessible name for the Open button.">
+        Open
+      </message>
 
       <message name="IDS_UTILITY_PROCESS_JSON_PARSER_NAME" desc="The name of the utility process used for parsing JSON files.">
         JSON Parser
       </message>
-
+      <if expr="not is_tizen">
       <message name="IDS_SESSION_CRASHED_VIEW_RESTORE_BUTTON" desc="Title of the restore button in the session crashed view.">
         Restore
       </message>
       <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY">
         Privacy
       </message>
-
+      </if>
       <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_SAFETY_CHECK">
         Safety Check
       </message>
index 14b5b7f..bee4840 100644 (file)
@@ -32,6 +32,7 @@
       Image you copied
     </message>
   </if>
+  <if expr="not is_tizen">
   <message name="IDS_SECURE_CONNECTION_EV" desc="Short text shown in the location bar when the connection is secure with an EV cert.">
     <ph name="ORGANIZATION">$1<ex>Paypal Inc.</ex></ph> [<ph name="COUNTRY">$2<ex>US</ex></ph>]
   </message>
   <message name="IDS_OFFLINE_VERBOSE_STATE" desc="Text for the Offline Omnibox Verbose state. Displayed when the current page is loaded from a previously-downloaded cache.">
     Offline
   </message>
+  </if>
   <if expr="is_ios or is_android or enable_vr">
     <message name="IDS_OMNIBOX_EMPTY_HINT" desc="The text displayed in the omnibox when it is empty." formatter_data="android_java">
       Search or type URL
     </message>
   </if>
+  <if expr="not is_tizen">
   <message name="IDS_OMNIBOX_ADDITIONAL_TEXT_DASH_TEMPLATE" desc="The omnibox text when there is both traditional text (i.e., user text + inline autocompletion) and additional text (i.e. the default suggestion's URL when rich autocompleting a title) to display.">
     <ph name="TRADITIONAL_TEXT">$1</ph> - <ph name="ADDITIONAL_TEXT">$2</ph>
   </message>
   <message name="IDS_ACC_HEADER_HIDE_SUGGESTIONS_BUTTON" desc="Announcement for the Hide Suggestions button on section headers.">
     Hide the &quot;<ph name="SECTION">$1<ex>related to recent searches</ex></ph>&quot; section
   </message>
+  </if>
   <!-- Accessibility announcements made when suggestion sections are shown or hidden. -->
   <message name="IDS_ACC_HEADER_SECTION_SHOWN" desc="Announcement that lets the user know the suggestions section has been Shown.">
     &quot;<ph name="SECTION">$1<ex>Related to recent searches</ex></ph>&quot; section shown
index 8730f95..32d04bf 100644 (file)
@@ -75,6 +75,7 @@
       Suggest strong password…
     </message>
   </if>
+  <if expr="not is_tizen">
   <if expr="use_titlecase">
     <message name="IDS_PASSWORD_MANAGER_MANAGE_PASSWORDS" desc="The menu item in the password field drop down that opens the list of saved passwords.">
       Manage Passwords…
@@ -98,6 +99,7 @@
   <message name="IDS_PASSWORD_MANAGER_DEFAULT_EXPORT_FILENAME" desc="Chrome suggests this file name when user chooses to export their passwords saved with Chrome." formatter_data="android_java">
     Chrome Passwords
   </message>
+  </if>
   <message name="IDS_PASSWORD_MANAGER_PASSWORD_FOR_ACCOUNT" desc="Voice over text read if the user focuses a drop down entry to fill a password for a given account.">
     Password for <ph name="username">$1<ex>chef@google.com</ex></ph>
   </message>
index c75c91f..0130f34 100644 (file)
@@ -387,9 +387,11 @@ Additional details:
   <message name="IDS_POLICY_LOAD_POLICIES_DONE" desc="Screen reader message indicates policies have been loaded.">
     Policies is loaded
   </message>
+  <if expr="not is_tizen">
   <message name="IDS_EXPORT_POLICIES_JSON" desc="Label for the button that exports policies in JSON format.">
     Export to JSON
   </message>
+  </if>
   <message name="IDS_UPLOAD_REPORT" desc="Label for the button that uplaod Chrome usage report">
     Upload Report
   </message>
@@ -612,6 +614,7 @@ Additional details:
   <message name="IDS_POLICY_SOURCE_DEVICE_LOCAL_ACCOUNT_OVERRIDE" desc="Indicates that the policy is set programmatically because of an active device-local account session: managed session or Kiosk app (both for ChromeOS only). It could have overridden other sources that set this policy.">
     Device local account override
   </message>
+  <if expr="not is_tizen">
   <message name="IDS_POLICY_RISK_TAG_FULL_ADMIN_ACCESS" desc="Title of a group/tag whose policies potentially allow the administrator to access all of a user's data.">
     Full Admin Access
   </message>
@@ -639,6 +642,7 @@ Additional details:
   <message name="IDS_POLICY_HIDE_EXPANDED_STATUS" desc="Text for the link that hides the policy status. Used when the policy status is too long to be always visible.">
     Hide status
   </message>
+  </if>
   <message name="IDS_POLICY_LIST_MERGING_WRONG_POLICY_TYPE_SPECIFIED" desc="Text explaining that a policy specified to be merged as a list is not a list.">
     Warning: This policy was not merged as a list as specified by policy because it is not a list.
   </message>
index 9f236e6..89453a3 100644 (file)
@@ -1,14 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <grit-part>
+  <if expr="not is_tizen">
   <message name="IDS_VERSION_UI_TITLE" desc="Title on the about:version page">
     About Version
   </message>
+  </if>
   <message name="IDS_VERSION_UI_OFFICIAL" desc="official build on the about:version page">
     Official Build
   </message>
   <message name="IDS_VERSION_UI_UNOFFICIAL" desc="unofficial build on the about:version page">
     Developer Build
   </message>
+  <if expr="not is_tizen">
   <message name="IDS_VERSION_UI_32BIT" desc="32-bit on the chrome://version page">
     (32-bit)
   </message>
       <ph name="BEGIN_LINK">&lt;a href="os://version" id="os-link-href" aria-describedby="os-link-desc"&gt;</ph>os://version<ph name="END_LINK">&lt;/a&gt;</ph>
     </message>
   </if>
+  </if>
 </grit-part>
index 7956feb..f0e7fdf 100644 (file)
@@ -96,6 +96,7 @@ import("//tools/grit/grit_args.gni")
 _strip_resource_files = is_android && is_official_build
 _js_minifier = "//tools/grit/minify_js.py"
 _css_minifier = "//tools/grit/minimize_css.py"
+grit_defines = []
 
 grit_resource_id_target = "//tools/gritsettings:default_resource_ids"
 grit_resource_id_file =
@@ -114,6 +115,13 @@ if (is_win) {
       "//tools/gritsettings/startup_resources_win.txt"
 }
 
+if (is_tizen) {
+  grit_defines += [
+    "-D",
+    "is_tizen",
+  ]
+}
+
 template("grit") {
   if (defined(invoker.output_dir)) {
     _output_dir = invoker.output_dir
@@ -194,7 +202,7 @@ template("grit") {
              rebase_path(depfile, root_build_dir),
              "--write-only-new=1",
              "--depend-on-stamp",
-           ] + _grit_flags
+           ] + _grit_flags + grit_defines
 
     # Add brotli executable if using brotli.
     if (defined(invoker.use_brotli) && invoker.use_brotli) {