Bug 1419601 - Indonesian Bahasa Indonesia "id" builds have broken new tab pages. r=k88hudson a=gchang
authorEd Lee <edilee@mozilla.com>
Wed, 29 Nov 2017 13:13:09 -0700
changeset 445068 22a20bb50c44580894278edc9a3df19e4eb1b804
parent 445067 5be79b1b3deb680b309fb99717a82c9737211ce0
child 445069 27dc691eb4a0e52b7da1d69f6b6dcf8bfbaef759
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersk88hudson, gchang
bugs1419601
milestone58.0
Bug 1419601 - Indonesian Bahasa Indonesia "id" builds have broken new tab pages. r=k88hudson a=gchang MozReview-Commit-ID: aiw1DyUzSl
.gitignore
browser/components/newtab/tests/browser/browser_packaged_as_locales.js
browser/extensions/activity-stream/install.rdf.in
browser/extensions/activity-stream/prerendered/locales/id/activity-stream-prerendered.html
browser/extensions/activity-stream/prerendered/locales/id/activity-stream-strings.js
browser/extensions/activity-stream/prerendered/locales/id/activity-stream.html
--- a/.gitignore
+++ b/.gitignore
@@ -2,17 +2,17 @@
 
 # Filenames that should be ignored wherever they appear
 *~
 *.pyc
 *.pyo
 TAGS
 tags
 ID
-!/browser/extensions/activity-stream/prerendered/id/
+!/browser/extensions/activity-stream/prerendered/locales/id/
 !/browser/extensions/screenshots/webextension/_locales/id/
 .DS_Store*
 *.pdb
 *.egg-info
 
 # Vim swap files.
 .*.sw[a-z]
 
--- a/browser/components/newtab/tests/browser/browser_packaged_as_locales.js
+++ b/browser/components/newtab/tests/browser/browser_packaged_as_locales.js
@@ -33,20 +33,27 @@ add_task(async function test_default_loc
   const url = await getUrlForLocale("de-UNKNOWN");
   Assert.equal(url, DEFAULT_URL.replace("en-US", "de"));
 });
 
 /**
  * Tests that all activity stream packaged locales can be referenced / accessed
  */
 add_task(async function test_all_packaged_locales() {
+  let gotID = false;
   const listing = await (await fetch("resource://activity-stream/prerendered/")).text();
   for (const line of listing.split("\n").slice(2)) {
     const [file, , , type] = line.split(" ").slice(1);
     if (type === "DIRECTORY") {
       const locale = file.replace("/", "");
       if (locale !== "static") {
         const url = await getUrlForLocale(locale);
         Assert[locale === "en-US" ? "equal" : "notEqual"](url, DEFAULT_URL, `can reference "${locale}" files`);
+
+        // Specially remember if we saw an ID locale packaged as it can be
+        // easily ignored by source control, e.g., .gitignore
+        gotID |= locale === "id";
       }
     }
   }
+
+  Assert.ok(gotID, `"id" locale packaged and not ignored`);
 });
--- a/browser/extensions/activity-stream/install.rdf.in
+++ b/browser/extensions/activity-stream/install.rdf.in
@@ -3,17 +3,17 @@
 #filter substitution
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
   <Description about="urn:mozilla:install-manifest">
     <em:id>activity-stream@mozilla.org</em:id>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
     <em:unpack>false</em:unpack>
-    <em:version>2017.11.03.1438-bf427ddd</em:version>
+    <em:version>2017.11.29.1212-78117350</em:version>
     <em:name>Activity Stream</em:name>
     <em:description>A rich visual history feed and a reimagined home page make it easier than ever to find exactly what you're looking for in Firefox.</em:description>
     <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
     <em:targetApplication>
       <Description>
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
         <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
new file mode 100644
--- /dev/null
+++ b/browser/extensions/activity-stream/prerendered/locales/id/activity-stream-prerendered.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html lang="id" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'unsafe-inline'; img-src http: https: data: blob:; style-src 'unsafe-inline'; child-src 'none'; object-src 'none'; report-uri https://tiles.services.mozilla.com/v4/links/activity-stream/csp">
+    <link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
+    <link rel="stylesheet" href="chrome://browser/content/contentSearchUI.css" />
+    <link rel="stylesheet" href="resource://activity-stream/css/activity-stream.css" />
+  </head>
+  <body class="activity-stream">
+    <div id="root"><div class="outer-wrapper fixed-to-top" data-reactroot="" data-reactid="1" data-react-checksum="1271924812"><main data-reactid="2"><div class="search-wrapper" data-reactid="3"><label for="newtab-search-text" class="search-label" data-reactid="4"><span class="sr-only" data-reactid="5"><span data-reactid="6">Cari di Web</span></span></label><input type="search" id="newtab-search-text" maxlength="256" placeholder="Cari di Web" title="Cari di Web" data-reactid="7"/><button id="searchSubmit" class="search-button" title="Cari" data-reactid="8"><span class="sr-only" data-reactid="9"><span data-reactid="10">Cari</span></span></button></div><div class="body-wrapper" data-reactid="11"><section class="collapsible-section top-sites animation-enabled" data-reactid="12"><div class="section-top-bar" data-reactid="13"><h3 class="section-title" data-reactid="14"><span class="click-target" data-reactid="15"><span class="icon icon-small-spacer icon-topsites" data-reactid="16"></span><span data-reactid="17">Situs Teratas</span><span class="icon icon-arrowhead-down" data-reactid="18"></span></span></h3><span class="section-info-option" data-reactid="19"><img class="info-option-icon" title="Info" aria-haspopup="true" aria-controls="info-option" aria-expanded="false" role="note" tabindex="0" data-reactid="20"/><div class="info-option" data-reactid="21"><div class="info-option-header" role="heading" data-reactid="22"><span data-reactid="23">Situs Teratas</span></div><p class="info-option-body" data-reactid="24"><span data-reactid="25">Mengakses situs web yang paling sering Anda kunjungi.</span></p><div class="info-option-manage" data-reactid="26"><button data-reactid="27"><span data-reactid="28">Preferensi Tab Baru</span></button></div></div></span></div><div class="section-body" data-reactid="29"><ul class="top-sites-list" data-reactid="30"><li class="top-site-outer placeholder" data-reactid="31"><a data-reactid="32"><div class="tile" aria-hidden="true" data-reactid="33"><span class="letter-fallback" data-reactid="34"></span><div class="screenshot" style="background-image:none;" data-reactid="35"></div></div><div class="title " data-reactid="36"><span dir="auto" data-reactid="37"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="38"><a data-reactid="39"><div class="tile" aria-hidden="true" data-reactid="40"><span class="letter-fallback" data-reactid="41"></span><div class="screenshot" style="background-image:none;" data-reactid="42"></div></div><div class="title " data-reactid="43"><span dir="auto" data-reactid="44"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="45"><a data-reactid="46"><div class="tile" aria-hidden="true" data-reactid="47"><span class="letter-fallback" data-reactid="48"></span><div class="screenshot" style="background-image:none;" data-reactid="49"></div></div><div class="title " data-reactid="50"><span dir="auto" data-reactid="51"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="52"><a data-reactid="53"><div class="tile" aria-hidden="true" data-reactid="54"><span class="letter-fallback" data-reactid="55"></span><div class="screenshot" style="background-image:none;" data-reactid="56"></div></div><div class="title " data-reactid="57"><span dir="auto" data-reactid="58"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="59"><a data-reactid="60"><div class="tile" aria-hidden="true" data-reactid="61"><span class="letter-fallback" data-reactid="62"></span><div class="screenshot" style="background-image:none;" data-reactid="63"></div></div><div class="title " data-reactid="64"><span dir="auto" data-reactid="65"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="66"><a data-reactid="67"><div class="tile" aria-hidden="true" data-reactid="68"><span class="letter-fallback" data-reactid="69"></span><div class="screenshot" style="background-image:none;" data-reactid="70"></div></div><div class="title " data-reactid="71"><span dir="auto" data-reactid="72"></span></div></a></li></ul><div class="edit-topsites-wrapper" data-reactid="73"><div class="edit-topsites-button" data-reactid="74"><button class="edit" title="Ubahsuai bagian Situs Teratas Anda" data-reactid="75"><span data-reactid="76">Sunting</span></button></div></div></div></section><div class="sections-list" data-reactid="77"><section class="collapsible-section section animation-enabled" data-reactid="78"><div class="section-top-bar" data-reactid="79"><h3 class="section-title" data-reactid="80"><span class="click-target" data-reactid="81"><span class="icon icon-small-spacer icon-pocket" data-reactid="82"></span><span data-reactid="83">Disarankan oleh Pocket</span><span class="icon icon-arrowhead-down" data-reactid="84"></span></span></h3></div><div class="section-body" data-reactid="85"><ul class="section-list" style="padding:0;" data-reactid="86"><li class="card-outer placeholder" data-reactid="87"><a data-reactid="88"><div class="card" data-reactid="89"><div class="card-details no-image" data-reactid="90"><div class="card-text no-context no-description no-host-name no-image" data-reactid="91"><h4 class="card-title" dir="auto" data-reactid="92"></h4><p class="card-description" dir="auto" data-reactid="93"></p></div><div class="card-context" data-reactid="94"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="95"><a data-reactid="96"><div class="card" data-reactid="97"><div class="card-details no-image" data-reactid="98"><div class="card-text no-context no-description no-host-name no-image" data-reactid="99"><h4 class="card-title" dir="auto" data-reactid="100"></h4><p class="card-description" dir="auto" data-reactid="101"></p></div><div class="card-context" data-reactid="102"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="103"><a data-reactid="104"><div class="card" data-reactid="105"><div class="card-details no-image" data-reactid="106"><div class="card-text no-context no-description no-host-name no-image" data-reactid="107"><h4 class="card-title" dir="auto" data-reactid="108"></h4><p class="card-description" dir="auto" data-reactid="109"></p></div><div class="card-context" data-reactid="110"></div></div></div></a></li></ul><div class="topic" data-reactid="111"><span data-reactid="112"><span data-reactid="113">Topik Populer:</span></span><ul data-reactid="114"></ul></div></div></section><section class="collapsible-section section animation-enabled" data-reactid="115"><div class="section-top-bar" data-reactid="116"><h3 class="section-title" data-reactid="117"><span class="click-target" data-reactid="118"><span class="icon icon-small-spacer icon-highlights" data-reactid="119"></span><span data-reactid="120">Sorotan</span><span class="icon icon-arrowhead-down" data-reactid="121"></span></span></h3></div><div class="section-body" data-reactid="122"><ul class="section-list" style="padding:0;" data-reactid="123"><li class="card-outer placeholder" data-reactid="124"><a data-reactid="125"><div class="card" data-reactid="126"><div class="card-details no-image" data-reactid="127"><div class="card-text no-context no-description no-host-name no-image" data-reactid="128"><h4 class="card-title" dir="auto" data-reactid="129"></h4><p class="card-description" dir="auto" data-reactid="130"></p></div><div class="card-context" data-reactid="131"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="132"><a data-reactid="133"><div class="card" data-reactid="134"><div class="card-details no-image" data-reactid="135"><div class="card-text no-context no-description no-host-name no-image" data-reactid="136"><h4 class="card-title" dir="auto" data-reactid="137"></h4><p class="card-description" dir="auto" data-reactid="138"></p></div><div class="card-context" data-reactid="139"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="140"><a data-reactid="141"><div class="card" data-reactid="142"><div class="card-details no-image" data-reactid="143"><div class="card-text no-context no-description no-host-name no-image" data-reactid="144"><h4 class="card-title" dir="auto" data-reactid="145"></h4><p class="card-description" dir="auto" data-reactid="146"></p></div><div class="card-context" data-reactid="147"></div></div></div></a></li></ul></div></section></div></div><!-- react-empty: 148 --></main></div></div>
+    <div id="snippets-container">
+      <div id="snippets"></div>
+    </div>
+    <script>
+// Don't directly load the following scripts as part of html to let the page
+// finish loading to render the content sooner.
+for (const src of [
+  "resource://activity-stream/prerendered/static/activity-stream-initial-state.js",
+  "chrome://browser/content/contentSearchUI.js",
+  "resource://activity-stream/vendor/react.js",
+  "resource://activity-stream/vendor/react-dom.js",
+  "resource://activity-stream/vendor/react-intl.js",
+  "resource://activity-stream/vendor/redux.js",
+  "resource://activity-stream/vendor/react-redux.js",
+  "resource://activity-stream/prerendered/id/activity-stream-strings.js",
+  "resource://activity-stream/data/content/activity-stream.bundle.js"
+]) {
+  // These dynamically inserted scripts by default are async, but we need them
+  // to load in the desired order (i.e., bundle last).
+  const script = document.body.appendChild(document.createElement("script"));
+  script.async = false;
+  script.src = src;
+}
+    </script>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/extensions/activity-stream/prerendered/locales/id/activity-stream-strings.js
@@ -0,0 +1,98 @@
+// Note - this is a generated file.
+window.gActivityStreamStrings = {
+  "newtab_page_title": "Tab Baru",
+  "default_label_loading": "Memuat…",
+  "header_top_sites": "Situs Teratas",
+  "header_stories": "Cerita Utama",
+  "header_highlights": "Sorotan",
+  "header_visit_again": "Kunjungi Lagi",
+  "header_bookmarks": "Markah Terbaru",
+  "header_recommended_by": "Disarankan oleh {provider}",
+  "header_bookmarks_placeholder": "Anda belum memiliki markah.",
+  "header_stories_from": "dari",
+  "type_label_visited": "Dikunjungi",
+  "type_label_bookmarked": "Dimarkahi",
+  "type_label_synced": "Disinkronkan dari perangkat lain",
+  "type_label_recommended": "Trending",
+  "type_label_open": "Buka",
+  "type_label_topic": "Topik",
+  "type_label_now": "Sekarang",
+  "menu_action_bookmark": "Markah",
+  "menu_action_remove_bookmark": "Hapus Markah",
+  "menu_action_copy_address": "Salin Alamat",
+  "menu_action_email_link": "Emailkan Tautan…",
+  "menu_action_open_new_window": "Buka di Jendela Baru",
+  "menu_action_open_private_window": "Buka di Jendela Penjelajahan Pribadi Baru",
+  "menu_action_dismiss": "Tutup",
+  "menu_action_delete": "Hapus dari Riwayat",
+  "menu_action_pin": "Semat",
+  "menu_action_unpin": "Lepas",
+  "confirm_history_delete_p1": "Yakin ingin menghapus setiap bagian dari laman ini dari riwayat Anda?",
+  "confirm_history_delete_notice_p2": "Tindakan ini tidak bisa diurungkan.",
+  "menu_action_save_to_pocket": "Simpan ke Pocket",
+  "search_for_something_with": "Cari {search_term} lewat:",
+  "search_button": "Cari",
+  "search_header": "Pencarian {search_engine_name}",
+  "search_web_placeholder": "Cari di Web",
+  "search_settings": "Ubah Pengaturan Pencarian",
+  "section_info_option": "Info",
+  "section_info_send_feedback": "Kirim Umpan Balik",
+  "section_info_privacy_notice": "Kebijakan Privasi",
+  "section_disclaimer_topstories": "The most interesting stories on the web, selected based on what you read. From Pocket, now part of Mozilla.",
+  "section_disclaimer_topstories_linktext": "Learn how it works.",
+  "section_disclaimer_topstories_buttontext": "Okay, got it",
+  "welcome_title": "Selamat datang di tab baru",
+  "welcome_body": "Firefox akan menggunakan ruang ini untuk menampilkan markah, artikel, video, dan laman yang baru-baru ini dikunjungi, yang paling relevan agar Anda bisa kembali mengunjunginya dengan mudah.",
+  "welcome_label": "Mengidentifikasi Sorotan Anda",
+  "time_label_less_than_minute": "<1 mnt",
+  "time_label_minute": "{number} mnt",
+  "time_label_hour": "{number} jam",
+  "time_label_day": "{number} hr",
+  "settings_pane_button_label": "Ubahsuai laman Tab Baru Anda",
+  "settings_pane_header": "Preferensi Tab Baru",
+  "settings_pane_body2": "Pilih apa yang Anda lihat di halaman ini.",
+  "settings_pane_search_header": "Pencarian",
+  "settings_pane_search_body": "Cari Web dari tab baru Anda.",
+  "settings_pane_topsites_header": "Situs Teratas",
+  "settings_pane_topsites_body": "Mengakses situs web yang paling sering Anda kunjungi.",
+  "settings_pane_topsites_options_showmore": "Tampilkan dua baris",
+  "settings_pane_bookmarks_header": "Markah Terbaru",
+  "settings_pane_bookmarks_body": "Markah Anda dibuat di lokasi yang praktis.",
+  "settings_pane_visit_again_header": "Kunjungi Lagi",
+  "settings_pane_visit_again_body": "Firefox akan menunjukkan bagian dari riwayat penjelajahan yang mungkin ingin Anda ingat atau kunjungi lagi.",
+  "settings_pane_highlights_header": "Sorotan",
+  "settings_pane_highlights_body2": "Temukan jalan kembali ke hal menarik yang baru saja Anda kunjungi atau dimarkah.",
+  "settings_pane_highlights_options_bookmarks": "Markah",
+  "settings_pane_highlights_options_visited": "Situs Terkunjungi",
+  "settings_pane_snippets_header": "Catatan Kecil",
+  "settings_pane_snippets_body": "Baca info pendek terbaru dari Mozilla tentang Firefox, budaya internet dan beberapa meme acak.",
+  "settings_pane_done_button": "Selesai",
+  "settings_pane_topstories_options_sponsored": "Show Sponsored Stories",
+  "edit_topsites_button_text": "Sunting",
+  "edit_topsites_button_label": "Ubahsuai bagian Situs Teratas Anda",
+  "edit_topsites_showmore_button": "Tampilkan lainnya",
+  "edit_topsites_showless_button": "Tampilkan lebih sedikit",
+  "edit_topsites_done_button": "Selesai",
+  "edit_topsites_pin_button": "Sematkan situs ini",
+  "edit_topsites_unpin_button": "Lepaskan situs ini",
+  "edit_topsites_edit_button": "Sunting situs ini",
+  "edit_topsites_dismiss_button": "Abaikan situs ini",
+  "edit_topsites_add_button": "Tambah",
+  "topsites_form_add_header": "Situs Pilihan Baru",
+  "topsites_form_edit_header": "Ubah Situs Pilihan",
+  "topsites_form_title_placeholder": "Masukkan judul",
+  "topsites_form_url_placeholder": "Ketik atau tempel URL",
+  "topsites_form_add_button": "Tambah",
+  "topsites_form_save_button": "Simpan",
+  "topsites_form_cancel_button": "Batalkan",
+  "topsites_form_url_validation": "URL valid diperlukan",
+  "pocket_read_more": "Topik Populer:",
+  "pocket_read_even_more": "Lihat Cerita Lainnya",
+  "pocket_feedback_header": "Yang terbaik dari Web, dikurasi lebih dari 25 juta orang.",
+  "pocket_description": "Temukan konten berkualitas tinggi yang mungkin Anda lewatkan dengan bantuan Pocket, yang sekarang menjadi bagian dari Mozilla.",
+  "highlights_empty_state": "Mulai menjelajah, dan kami akan menampilkan beberapa artikel bagus, video, dan halaman lain yang baru saja Anda kunjungi atau termarkah di sini.",
+  "topstories_empty_state": "Maaf Anda tercegat. Periksa lagi nanti untuk lebih banyak cerita terbaik dari {provider}. Tidak mau menunggu? Pilih topik populer untuk menemukan lebih banyak cerita hebat dari seluruh web.",
+  "manual_migration_explanation2": "Coba Firefox dengan markah, riwayat, dan sandi dari peramban lain.",
+  "manual_migration_cancel_button": "Tidak, Terima kasih",
+  "manual_migration_import_button": "Impor Sekarang"
+};
new file mode 100644
--- /dev/null
+++ b/browser/extensions/activity-stream/prerendered/locales/id/activity-stream.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<html lang="id" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'unsafe-inline'; img-src http: https: data: blob:; style-src 'unsafe-inline'; child-src 'none'; object-src 'none'; report-uri https://tiles.services.mozilla.com/v4/links/activity-stream/csp">
+    <link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
+    <link rel="stylesheet" href="chrome://browser/content/contentSearchUI.css" />
+    <link rel="stylesheet" href="resource://activity-stream/css/activity-stream.css" />
+  </head>
+  <body class="activity-stream">
+    <div id="root"></div>
+    <div id="snippets-container">
+      <div id="snippets"></div>
+    </div>
+    <script>
+// Don't directly load the following scripts as part of html to let the page
+// finish loading to render the content sooner.
+for (const src of [
+  "chrome://browser/content/contentSearchUI.js",
+  "resource://activity-stream/vendor/react.js",
+  "resource://activity-stream/vendor/react-dom.js",
+  "resource://activity-stream/vendor/react-intl.js",
+  "resource://activity-stream/vendor/redux.js",
+  "resource://activity-stream/vendor/react-redux.js",
+  "resource://activity-stream/prerendered/id/activity-stream-strings.js",
+  "resource://activity-stream/data/content/activity-stream.bundle.js"
+]) {
+  // These dynamically inserted scripts by default are async, but we need them
+  // to load in the desired order (i.e., bundle last).
+  const script = document.body.appendChild(document.createElement("script"));
+  script.async = false;
+  script.src = src;
+}
+    </script>
+  </body>
+</html>